Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into vmtrace
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 17 Jan 2013 13:03:10 +0000 (14:03 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 17 Jan 2013 13:03:10 +0000 (14:03 +0100)
Conflicts:
buildtools/Cmake/DefinePackages.cmake
include/surf/simgrid_dtd.h
include/xbt/graphxml.h
src/instr/instr_config.c
src/instr/instr_private.h
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/surf/simgrid_dtd.c
src/xbt/graphxml.c

333 files changed:
.gitignore
CMakeLists.txt
COPYING
ChangeLog
INSTALL
NEWS
README
README.coding
README.git
TODO
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Distrib.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/GenerateDevGuide.cmake [deleted file]
buildtools/Cmake/GenerateDoc.cmake
buildtools/Cmake/GenerateRefGuide.cmake [deleted file]
buildtools/Cmake/GenerateUserGuide.cmake [deleted file]
buildtools/Cmake/MakeExe.cmake
buildtools/Cmake/MakeLib.cmake
buildtools/Cmake/Modules/FindF2c.cmake
buildtools/Cmake/Modules/FindValgrind.cmake
buildtools/Cmake/Option.cmake
buildtools/Cmake/Scripts/generate_memcheck_tests.pl
buildtools/Cmake/src/internal_config.h.in
buildtools/Cmake/test_prog/prog_gnu_dynlinker.c [new file with mode: 0644]
buildtools/jenkins/ctest2junit.xsl [new file with mode: 0755]
buildtools/pipol/Nightly_memCheck.sh
configure
doc/Doxyfile.in
doc/Layout.xml [moved from doc/user_guide/doxygen/UserGuideDoxygenLayout.xml with 95% similarity]
doc/SimgridDoxygenLayout.xml [deleted file]
doc/dev_guide/doxygen/DevGuideDoxyfile.in [deleted file]
doc/dev_guide/doxygen/DevGuideDoxygenLayout.xml [deleted file]
doc/dev_guide/doxygen/cmake.doc [deleted file]
doc/dev_guide/doxygen/header.html [deleted file]
doc/dev_guide/doxygen/index.doc [deleted file]
doc/dev_guide/doxygen/stylesheet.css [deleted file]
doc/doxygen/FAQ.doc [moved from doc/FAQ.doc with 93% similarity]
doc/doxygen/advanced.doc [new file with mode: 0644]
doc/doxygen/bindings.doc [moved from doc/user_guide/doxygen/bindings.doc with 100% similarity]
doc/doxygen/contributing.doc [new file with mode: 0644]
doc/doxygen/deployment.doc [moved from doc/user_guide/doxygen/deployment.doc with 100% similarity]
doc/doxygen/footer.html [moved from doc/dev_guide/doxygen/footer.html with 100% similarity]
doc/doxygen/getting_started.doc [new file with mode: 0644]
doc/doxygen/header.html [moved from doc/ref_guide/doxygen/header.html with 81% similarity]
doc/doxygen/help.doc [new file with mode: 0644]
doc/doxygen/index-API.doc [new file with mode: 0644]
doc/doxygen/index.doc [new file with mode: 0644]
doc/doxygen/inside_autotests.doc [moved from doc/dev_guide/doxygen/xps.doc with 84% similarity]
doc/doxygen/inside_cmake.doc [new file with mode: 0644]
doc/doxygen/inside_doxygen.doc [new file with mode: 0644]
doc/doxygen/inside_extending.doc [moved from doc/dev_guide/doxygen/simgrid.doc with 98% similarity]
doc/doxygen/inside_release.doc [moved from doc/dev_guide/doxygen/release.doc with 70% similarity]
doc/doxygen/install.doc [new file with mode: 0644]
doc/doxygen/internals.doc [moved from doc/user_guide/doxygen/index.doc with 54% similarity]
doc/doxygen/introduction.doc [new file with mode: 0644]
doc/doxygen/module-msg.doc [moved from doc/ref_guide/doxygen/module-msg.doc with 94% similarity]
doc/doxygen/module-sd.doc [moved from doc/ref_guide/doxygen/module-sd.doc with 100% similarity]
doc/doxygen/module-simix.doc [moved from doc/ref_guide/doxygen/module-simix.doc with 95% similarity]
doc/doxygen/module-surf.doc [moved from doc/ref_guide/doxygen/module-surf.doc with 100% similarity]
doc/doxygen/module-trace.doc [moved from doc/ref_guide/doxygen/module-trace.doc with 100% similarity]
doc/doxygen/module-xbt.doc [moved from doc/ref_guide/doxygen/module-xbt.doc with 97% similarity]
doc/doxygen/modules.doc [moved from doc/ref_guide/doxygen/modules.doc with 89% similarity]
doc/doxygen/options.doc [moved from doc/user_guide/doxygen/options.doc with 97% similarity]
doc/doxygen/platform.doc [moved from doc/user_guide/doxygen/platform.doc with 59% similarity]
doc/doxygen/pls.doc [moved from doc/user_guide/doxygen/pls.doc with 98% similarity]
doc/doxygen/simgrid_modules.map [new file with mode: 0644]
doc/doxygen/stylesheet.css [moved from doc/user_guide/doxygen/stylesheet.css with 100% similarity]
doc/doxygen/tracing.doc [moved from doc/user_guide/doxygen/tracing.doc with 100% similarity]
doc/doxygen/use.doc [moved from doc/user_guide/doxygen/use.doc with 95% similarity]
doc/index.doc [deleted file]
doc/ref_guide/doxygen/RefGuideDoxyfile.in [deleted file]
doc/ref_guide/doxygen/RefGuideDoxygenLayout.xml [deleted file]
doc/ref_guide/doxygen/footer.html [deleted file]
doc/ref_guide/doxygen/main.doc [deleted file]
doc/ref_guide/doxygen/stylesheet.css [deleted file]
doc/shared/fig/simgrid_modules.fig
doc/user_guide/doxygen/UserGuideDoxyfile.in [deleted file]
doc/user_guide/doxygen/examples.doc [deleted file]
doc/user_guide/doxygen/footer.html [deleted file]
doc/user_guide/doxygen/header.html [deleted file]
doc/user_guide/doxygen/install.doc [deleted file]
doc/webcruft/README [deleted file]
doc/webcruft/output.goal.pdf [moved from doc/dev_guide/doxygen/output.goal.pdf with 100% similarity]
doc/webcruft/simgrid-101.pdf [deleted file]
doc/webcruft/simgrid-101_001.png [deleted file]
doc/webcruft/simgrid-101_002.png [deleted file]
doc/webcruft/simgrid-101_003.png [deleted file]
doc/webcruft/simgrid-101_004.png [deleted file]
doc/webcruft/simgrid-101_005.png [deleted file]
doc/webcruft/simgrid-101_006.png [deleted file]
doc/webcruft/simgrid-101_007.png [deleted file]
doc/webcruft/simgrid-101_008.png [deleted file]
doc/webcruft/simgrid-101_009.png [deleted file]
doc/webcruft/simgrid-101_010.png [deleted file]
doc/webcruft/simgrid-101_011.png [deleted file]
doc/webcruft/simgrid-101_012.png [deleted file]
doc/webcruft/simgrid-101_013.png [deleted file]
doc/webcruft/simgrid-101_014.png [deleted file]
doc/webcruft/simgrid-101_015.png [deleted file]
doc/webcruft/simgrid-101_016.png [deleted file]
doc/webcruft/simgrid-101_017.png [deleted file]
doc/webcruft/simgrid-101_018.png [deleted file]
doc/webcruft/simgrid-101_019.png [deleted file]
doc/webcruft/simgrid-101_020.png [deleted file]
doc/webcruft/simgrid-101_021.png [deleted file]
doc/webcruft/simgrid-101_022.png [deleted file]
doc/webcruft/simgrid-101_023.png [deleted file]
doc/webcruft/simgrid-101_024.png [deleted file]
doc/webcruft/simgrid-101_025.png [deleted file]
doc/webcruft/simgrid-101_026.png [deleted file]
doc/webcruft/simgrid-101_027.png [deleted file]
doc/webcruft/simgrid-101_028.png [deleted file]
doc/webcruft/simgrid-101_029.png [deleted file]
doc/webcruft/simgrid-101_030.png [deleted file]
examples/lua/console/deploy.lua
examples/lua/console/master.lua
examples/lua/console/master_slave_bypass.lua
examples/lua/console/master_slave_bypass.tesh
examples/lua/console/platform.lua
examples/lua/console/slave.lua
examples/lua/masterslave/master_slave.lua
examples/msg/actions/actions.c
examples/msg/bittorrent/bittorrent_platfgen.c
examples/msg/bourassa_state.trace
examples/msg/chainsend/CMakeLists.txt [new file with mode: 0644]
examples/msg/chainsend/README [new file with mode: 0644]
examples/msg/chainsend/broadcaster.c [new file with mode: 0644]
examples/msg/chainsend/broadcaster.h [new file with mode: 0644]
examples/msg/chainsend/chainsend.c [new file with mode: 0644]
examples/msg/chainsend/chainsend.tesh [new file with mode: 0644]
examples/msg/chainsend/common.c [new file with mode: 0644]
examples/msg/chainsend/common.h [new file with mode: 0644]
examples/msg/chainsend/deployment_chainsend.xml [new file with mode: 0644]
examples/msg/chainsend/deployment_tesh.xml [new file with mode: 0644]
examples/msg/chainsend/generate_deployment_file.rb [new file with mode: 0755]
examples/msg/chainsend/iterator.c [new file with mode: 0644]
examples/msg/chainsend/iterator.h [new file with mode: 0644]
examples/msg/chainsend/messages.c [new file with mode: 0644]
examples/msg/chainsend/messages.h [new file with mode: 0644]
examples/msg/chainsend/peer.c [new file with mode: 0644]
examples/msg/chainsend/peer.h [new file with mode: 0644]
examples/msg/chainsend/platform_chainsend.xml [new file with mode: 0644]
examples/msg/ginette_state.trace
examples/msg/jupiter_state.trace
examples/msg/link3_state.trace
examples/msg/link4_state.trace
examples/msg/link5_state.trace
examples/msg/masterslave/CMakeLists.txt
examples/msg/masterslave/masterslave_bypass.c
examples/msg/masterslave/masterslave_cluster.c
examples/msg/masterslave/masterslave_console.c [deleted file]
examples/msg/masterslave/masterslave_console.tesh [deleted file]
examples/msg/masterslave/masterslave_failure_platfgen.c
examples/msg/masterslave/masterslave_platfgen.c
examples/msg/masterslave/platform_script.lua [deleted file]
examples/msg/mc/CMakeLists.txt
examples/msg/mc/bugged1.tesh
examples/msg/mc/bugged1_liveness.tesh
examples/msg/mc/bugged2.tesh [deleted file]
examples/msg/mc/chord/chord_neverjoin.tesh
examples/msg/mc/test/snapshot_comparison1.c
examples/msg/mc/test/snapshot_comparison1.tesh
examples/msg/mc/test/snapshot_comparison2.c
examples/msg/mc/test/snapshot_comparison2.tesh
examples/msg/mc/test/snapshot_comparison3.c
examples/msg/mc/test/snapshot_comparison3.tesh
examples/msg/mc/test/snapshot_comparison4.c
examples/msg/mc/test/snapshot_comparison4.tesh
examples/msg/mc/test/snapshot_comparison5.c
examples/msg/mc/test/snapshot_comparison5.tesh
examples/msg/parallel_task/parallel_task.tesh
examples/msg/tracing/trace_platform.tesh
examples/simdag/CMakeLists.txt
examples/simdag/dot/dot_test.c
examples/simdag/dot/simulate_dot.c
examples/simdag/goal/goal_test.c
examples/simdag/jupiter_power.trace [new file with mode: 0644]
examples/simdag/link1_avail.trace [new file with mode: 0644]
examples/simdag/sd_avail.c [new file with mode: 0644]
examples/simdag/sd_test2.c
examples/simdag/test_simdag_avail.tesh [new file with mode: 0644]
examples/simdag/test_simdag_tracing.tesh
examples/simdag/two_hosts.xml [new file with mode: 0644]
examples/smpi/CMakeLists.txt
examples/smpi/MM/Summa.c
examples/smpi/replay/actions_allReduce.txt [new file with mode: 0644]
examples/smpi/replay/actions_barrier.txt [new file with mode: 0644]
examples/smpi/replay/actions_bcast.txt
examples/smpi/replay/actions_with_isend.txt [new file with mode: 0644]
examples/smpi/replay/one_trace [deleted file]
examples/smpi/replay/smpi_replay.tesh
examples/smpi/tracing/smpi_traced.tesh
include/msg/msg.h
include/simgrid/modelchecker.h
include/simgrid/platf.h
include/simgrid/simix.h
include/smpi/mpif.h
include/smpi/smpi.h
include/smpi/smpi_main.h
include/surf/simgrid_dtd.h
include/xbt/config.h
include/xbt/cunit.h
include/xbt/ex.h
include/xbt/graph.h
include/xbt/graphxml.h
include/xbt/mallocator.h
src/bindings/lua/lua_platf.c
src/bindings/lua/simgrid_lua.c
src/include/instr/instr_interface.h [new file with mode: 0644]
src/include/mc/mc.h
src/include/simgrid/sg_config.h [new file with mode: 0644]
src/include/smpi/smpi_interface.h [new file with mode: 0644]
src/include/surf/surf.h
src/instr/instr_config.c
src/instr/instr_paje_containers.c
src/instr/instr_paje_header.c
src/instr/instr_private.h
src/instr/jedule/jedule_events.c
src/instr/jedule/jedule_platform.c
src/mc/mc_checkpoint.c
src/mc/mc_compare.c
src/mc/mc_dpor.c
src/mc/mc_global.c
src/mc/mc_liveness.c
src/mc/mc_memory.c
src/mc/mc_private.h
src/mc/mc_request.c
src/mc/mc_state.c
src/msg/instr_msg_process.c [moved from src/instr/instr_msg_process.c with 98% similarity]
src/msg/instr_msg_task.c [moved from src/instr/instr_msg_task.c with 99% similarity]
src/msg/instr_msg_vm.c [moved from src/instr/instr_msg_vm.c with 99% similarity]
src/msg/msg_actions.c
src/msg/msg_config.c [deleted file]
src/msg/msg_environment.c
src/msg/msg_global.c
src/msg/msg_private.h
src/msg/msg_task.c
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/simdag/private.h
src/simdag/sd_dotloader.c
src/simdag/sd_global.c
src/simdag/sd_task.c
src/simgrid/sg_config.c [moved from src/surf/surf_config.c with 62% similarity]
src/simix/smx_context.c
src/simix/smx_context_sysv.c
src/simix/smx_deployment.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_io.c
src/simix/smx_io_private.h
src/simix/smx_network.c
src/simix/smx_network_private.h
src/simix/smx_process.c
src/simix/smx_process_private.h
src/simix/smx_smurf.c
src/simix/smx_smurf_private.h
src/simix/smx_synchro.c
src/simix/smx_synchro_private.h
src/simix/smx_user.c
src/smpi/instr_smpi.c [moved from src/instr/instr_smpi.c with 99% similarity]
src/smpi/private.h
src/smpi/smpi_base.c
src/smpi/smpi_bench.c
src/smpi/smpi_f77.c
src/smpi/smpi_global.c
src/smpi/smpi_mpi_dt.c
src/smpi/smpi_pmpi.c
src/smpi/smpi_replay.c
src/smpi/smpicc.in
src/smpi/smpif2c.in
src/smpi/smpif90.in [new file with mode: 0644]
src/smpi/smpiff.in
src/smpi/smpirun.in
src/surf/cpu_cas01.c
src/surf/cpu_ti.c
src/surf/instr_routing.c [moved from src/instr/instr_routing.c with 99% similarity]
src/surf/instr_surf.c [moved from src/instr/instr_surf.c with 100% similarity]
src/surf/maxmin.c
src/surf/network.c
src/surf/network_gtnets.c
src/surf/sg_platf.c
src/surf/simgrid_dtd.c
src/surf/storage.c
src/surf/surf.c
src/surf/surf_private.h
src/surf/surf_routing.c
src/surf/surf_routing_generic.c
src/surf/surfxml_parse.c
src/surf/trace_mgr.c
src/surf/workstation.c
src/surf/workstation_ptask_L07.c
src/xbt/RngStream.c
src/xbt/backtrace_linux.c
src/xbt/config.c
src/xbt/ex.c
src/xbt/graph.c
src/xbt/graph_private.h
src/xbt/graphxml.c
src/xbt/heap.c
src/xbt/log.c
src/xbt/mallocator.c
src/xbt/mallocator_private.h
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm.c
src/xbt/mmalloc/mm_diff.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/mmalloc/mm_module.c
src/xbt/mmalloc/mmalloc.c
src/xbt/mmalloc/mmprivate.h
src/xbt/snprintf.c
src/xbt/xbt_log_layout_format.c
src/xbt/xbt_main.c
src/xbt/xbt_str.c
src/xbt/xbt_strbuff.c
teshsuite/msg/get_sender.c
teshsuite/smpi/hvector_test.c
teshsuite/smpi/mpich-test/pt2pt/runtests
teshsuite/smpi/mpich-test/pt2pt/sendcplx.std [moved from teshsuite/smpi/mpich-test/pt2pt/sendcplx.stdo with 100% similarity]
teshsuite/smpi/mpich-test/pt2pt/sndrcv.c
teshsuite/smpi/mpich-test/pt2pt/structlb.c
teshsuite/smpi/mpich-test/pt2pt/testtypes.c
teshsuite/smpi/mpich-test/pt2pt/typelb.c
teshsuite/smpi/vector_test.c
teshsuite/xbt/mmalloc_32.tesh
teshsuite/xbt/mmalloc_64.tesh
testsuite/surf/surf_usage.c
testsuite/surf/surf_usage2.c
tools/doxygen/xbt_log_extract_hierarchy.pl

index 99e7567..c611ce7 100644 (file)
@@ -102,31 +102,9 @@ doc/dev_guide/html
 doc/dev_guide/latex
 doc/index.php
 doc/simgrid.tag
-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
-doc/ref_guide/doxygen/RefGuideDoxyfile
-doc/user_guide/doxygen/UserGuideDoxyfile
-doc/dev_guide/doxygen/DevGuideDoxyfile
-doc/ref_guide/doxygen/logcategories.doc
-doc/user_guide/doxygen/logcategories.doc
-doc/dev_guide/doxygen/logcategories.doc
-doc/ref_guide/doxygen/simgrid_modules.map
-doc/user_guide/doxygen/simgrid_modules.map
-doc/dev_guide/doxygen/simgrid_modules.map
+doc/doxygen/logcategories.doc
 doc/index-API.doc
-doc/ref_guide/doxygen/index-API.doc
-doc/user_guide/doxygen/index-API.doc
-doc/dev_guide/doxygen/index-API.doc
 doc/simgrid_modules.map
-doc/logcategories.doc
-doc/shared/doxygen/simgridrefguide.tag
-doc/shared/doxygen/simgriduserguide.tag
-doc/shared/doxygen/simgriddevguide.tag
 
 ################################################
 ### Specific of project 
@@ -181,6 +159,7 @@ examples/msg/mc/test/snapshot_comparison_liveness2
 examples/msg/mc/test/snapshot_comparison_liveness3
 examples/msg/mc/test/snapshot_comparison_liveness4
 examples/msg/mc/test/snapshot_comparison_liveness5
+examples/msg/chainsend/chainsend
 examples/msg/chord/chord
 examples/msg/chord/chord_stateful
 examples/msg/chord/deployments
@@ -245,7 +224,7 @@ examples/msg/pmm/msg_pmm
 examples/smpi/toto.txt
 examples/smpi/MM/MM_mpi
 examples/smpi/smpi_replay
-examples/smpi/replay
+examples/smpi/replay/one_trace
 examples/smpi/bcbench
 examples/smpi/first
 examples/smpi/mvmul
index 2ed2fea..4945197 100644 (file)
@@ -1,4 +1,12 @@
 cmake_minimum_required(VERSION 2.6)
+
+IF(CMAKE_BUILD_TYPE STREQUAL "ModelChecker")
+  SET(enable_coverage ON)
+  SET(enable_model-checking ON)
+  SET(enable_lua ON)
+  SET(enable_compile_optimization OFF)
+ENDIF()
+
 ### Need to set rc ccompiler before enable language
 if(WIN32)
   SET(CMAKE_RC_COMPILER "windres")
diff --git a/COPYING b/COPYING
index 01cdd37..98b0223 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -63,7 +63,7 @@ The file src/xbt/snprintf.c contains this license text:
  *   If not, I'll be glad to provide one.
  *
  */
+
 =========================================================================
 
 The exception handling mecanism (mainly living in src/xbt/ex.c and
@@ -103,7 +103,7 @@ from the iksemel one (http://code.google.com/p/iksemel/). Both the
 original and the current version of this code is distributed under the
 LGPL v2.1 license.
 
-========================================================================= 
+=========================================================================
 
 The xbt/mmalloc module was adapted from the mmalloc module of gdb.
 Both the simgrid version and the original version is distributed under
@@ -138,19 +138,19 @@ Their copyright is the following:
  *
  *      You should have received a copy of the GNU Lesser General Public
  *      License along with SimGrid in the file LICENSE-LGPL-2.1;
- *      if not, write to the Free Software Foundation, Inc., 
+ *      if not, write to the Free Software Foundation, Inc.,
  *      51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  */
+
 =========================================================================
 
-Some examples for SMPI were borowed from an IBM test suite. 
+Some examples for SMPI were borowed from an IBM test suite.
 Their copyright is the following:
 /**
  * MESSAGE PASSING INTERFACE TEST CASE SUITE
  *
  * Copyright IBM Corp. 1995
- * 
+ *
  * IBM Corp. hereby grants a non-exclusive license to use, copy, modify, and
  *distribute this software for any purpose and without fee provided that the
  *above copyright notice and the following paragraphs appear in all copies.
@@ -169,15 +169,15 @@ Their copyright is the following:
  * ENHANCEMENTS, OR MODIFICATIONS.
  * ***************************************************************************
  **/
+
 List of files:
  examples/smpi/scatter.c
  examples/smpi/reduce.c
  examples/smpi/allreduce.c
  examples/smpi/alltoall2.c
 
-========================================================================= 
+
+=========================================================================
 
 examples/smpi/alltoallv.c was borowed from the MPICH2 test files. It
 can be found for example in mpich2 1.2.1.1 under the name
@@ -238,8 +238,8 @@ purpose and non-infringement.
 <-------------------- end of MPICH2 COPYRIGHT file -------------------->
 
 
-========================================================================= 
+=========================================================================
+
 
 The directory examples/smpi/NAS contains a tweaked version of the
 NAS Parallel Benchmark Team. The original software were retrieved from
index a33847d..65d338f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,32 +3,53 @@ SimGrid (3.9) NOT RELEASED; urgency=low
  The Grasgory release: GRAS is really dead now.
 
  GRAS:
- * If you use GRAS, you should stay at SimGrid 3.7 or something since
-   it was not really maintained with the latest versions of SimGrid as
-   nobody stepped in to take the maintainership over.
+ * If you use GRAS, you should stay at SimGrid 3.5 (at most) since it
+   was considered as experimental and badly maintained since then.
  * Keeping it was thus a trap to our potential users, that could take
-   it instead of MSG or SMPI by mistake. GRAS also induces a lot of XBT
-   code (for portability sake), that must be maintained too.
+   it instead of MSG or SMPI by mistake despite is pity state.
+ * GRAS seems to have very few users (if any), and no one volunteered
+   to maintain it further. It also induces a lot of XBT code (for
+   portability sake), that must be maintained too.
  * For all these reasons, we killed GRAS. If someone wants to revive it
    in the future, don't cry, our git history still remembers of GRAS.
 
+ Documentation:
+ * Major overhaul. Merge our documentation again as time proved that
+   spliting it was really not helping our users.
+ * Further improve the developer documentation to help newcommers
+   hacking on SimGrid itself. The user documentation (and in
+   particular, the beginner documentation) is still in a sorry state.
+
  SMPI:
  * Now works on Windows too!
  * Much more extensive test suite, from MPICH
 
+SIMDAG:
+ * Bug fix: let task be scheduled when the last dependency to be solved is a 
+   control dependency
+
  MSG:
  * New function: MSG_process_get_number()
+ * Old function documented: MSG_config()
 
  SURF:
- * Change the default value of the TCP_gamma constant (maximal size of TCP 
-   congestion window) to a more realistic 4MiB value. If you notice changes in 
-   your simulation results, you can fall back to the previous 20k tiny window 
+ * Change the default value of the TCP_gamma constant (maximal size of TCP
+   congestion window) to a more realistic 4MiB value. If you notice changes in
+   your simulation results, you can fall back to the previous 20k tiny window
    by adding --cfg=network/TCP_gamma:20000 on command line.
+ * Bug fix about the way periodic availability/state traces are handled.
+ * Bug fix: use default values at start when first event in availability/state 
+   trace is not at time 0.
+   
+ PLATFORM:
+ * remove the "new_" part of function name sg_platf_new_trace_connect
+   (resulting in sg_platf_trace_connect), since it does not create
+   anything new
 
  XBT:
  * Kill synchronized dynars, and xbt_dynar_dopar(). We cannot think of a
    usecase where it's really mandatory, and maintaining it was a pain in
-   our codebase.   
+   our codebase.
  * New: xbt_fifo_search(), search an item with a user-provided
    comparison function instead of dumb pointer comparison.
 
diff --git a/INSTALL b/INSTALL
index 8410aeb..4953f2b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -32,7 +32,7 @@ not only SimGrid related.
 $ make
 
 (3) Test it (optional)
-$ make check 
+$ make check
 $ ctest
 
 (4) Install it
@@ -41,7 +41,7 @@ $ make install
 
 Dependencies
 ============
-SimGrid archives do not have any firm dependencies. 
+SimGrid archives do not have any firm dependencies.
 
 If you want to compile, you must have installed perl and cmake version 2.6 or
 above.
diff --git a/NEWS b/NEWS
index aef1cd3..c8220be 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,9 @@ __   _____ _ __ ___(_) ___  _ __   |___ // _ \
 
 The "Grasgory" release. Major changes:
 
- * Gras was completely removed from this version 
+ * Gras was completely removed from this version.
+ * Documentation reorganization to ease browsing it.
                     _               _____  ___   _
 __   _____ _ __ ___(_) ___  _ __   |___ / ( _ ) / |
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ / _ \ | |
diff --git a/README b/README
index e48307f..4b05068 100644 (file)
--- a/README
+++ b/README
@@ -1,18 +1,20 @@
 
 
-Welcome to the SimGrid project! 
+Welcome to the SimGrid project!
 
 Up-to-date documentation about installation and how to use SimGrid is available
-online at http://simgrid.gforge.inria.fr/ and the documentation for the version
-you downloaded is available in the doc/ directory. Check doc/index.html for more
-information.
+online at http://simgrid.gforge.inria.fr/ 
 
-In case of trouble, you can additionnally try to have a look to our user
-mailing-list ( http://lists.gforge.inria.fr/mailman/listinfo/simgrid-user ) or
-post us a mail.
+The documentation is also included in the archive you downloaded: Check
+doc/html/index.html for more information.
+
+In any case, you may want to subscribe to the user mailing list 
+(http://lists.gforge.inria.fr/mailman/listinfo/simgrid-user). There,
+you can find answers to your questions, or simply discuss with people
+doing the same kind of research than you do, in an active and friendly
+community.
 
 Thanks for downloading our software,
 
 Cheers,
-
 Da SimGrid Team.
index 481dfe9..a2ea54f 100644 (file)
@@ -16,19 +16,19 @@ having all of them in the same package makes the installation easier
 for end-users. Moreover, it enables to share the compilation chain and
 eases the development.
 
-The tree is not splited on projects, but on file finality:
+The tree is not split on projects, but on file finality:
  include/            -> all *public* headers
  include/xbt/*.h     -> one file per module
 
  src/include -> another location for protected headers. Used by SURF, and
                 other should be converted, since this is the Right Thing.
 
- testsuite/ -> The more test the better. 
+ testsuite/ -> The more test the better.
                Same organization than src/ and include/
                Tests are allowed to load some headers of the module they test.
               All tests should be listed in run_test.in so that they get
-               run on 'make check'. 
-                 
+               run on 'make check'.
+
  examples/ -> Supposed to be copy/pastable by the user, so keep it clear and
                 avoid any kind of trick. In particular, do only include the
                 public headers here.
@@ -52,25 +52,25 @@ FIXME: this list of arguments is still to be discussed, maybe
 *****************************************************
 
 It may sound strange, but the type naming convention was source of intense
-discution between da SimGrid posse members. The convention we came to may not
+discussion between da SimGrid posse members. The convention we came to may not
 be the best solution, but it has the merit to exist and leave everyone work.
 So please stick to it.
 
-  - ???_t is a valid type (builded with typedef)
+  - ???_t is a valid type (built with typedef)
   - s_toto_t is a structure (access to fields with .)
   - s_toto   is a structure needing 'struct' keyword to be used
   - e_toto_t is an enum
   - u_toto_t is an union
   - u_toto   is an union needing 'union' keyword to be used
   -   toto_t is an 'object' (struct*)
-  
+
 Please to not call toto_t something else than an 'object' (ie, something you
 have to call _new and _free on it).
 
-Exemple:
+Example:
   typedef struct s_toto {} s_toto_t, *toto_t;
   typedef enum {} e_toto_t;
-  
+
 Moreover, only toto_t (and e_toto_t) are public. The rest (mainly s_toto_t)
 is private.
 
@@ -86,21 +86,26 @@ MALLOC:
  Don't use it, or you'll have to check the result (and do some dirty stuff
  on AIX). Use xbt_malloc (or even better, xbt_new) instead.
 
-SIZE_T
+SIZE_T (FIXME: obsolete?)
  If possible, avoid size_t and use unsigned long instead. If not,
  #include <sys/types.h> in all files manipulating size_t
  do cast it to unsigned long before printing (and use %lu)
-PRINTF pointer difference
+
+PRINTF pointer difference (FIXME: advertise %td instead?)
  printf ("diff = %ld\n", (long) (pointer2 - pointer1));
-  
 
-**             
+INLINE functions
+ The definition of a inline function must be visible when it is used.
+ As such, an inline function should be defined (an not only declared)
+ in header file (.h) with attributes 'static XBT_INLINE'.  It should
+ not be defined in source file (.c).
+
+**
 ** Commenting the source: doxygen
 **
 ****************************************************
 
-The global structure of the documentation is in doc/modules.doc 
+The global structure of the documentation is in doc/modules.doc
 
 The structure of each module (xbt, msg, etc) is in doc/module-<module>.doc
 
@@ -113,26 +118,26 @@ users can see the intended order).
 The documentation of each type and macro are also in the public header since
 this is were they live.
 
-The documentation of each function must be in the C file were it lives. 
+The documentation of each function must be in the C file were it lives.
 
 Any public element (function, type and macro) must have a @brief part.
 
 **
-** XBT virtualization mecanism (FIXME:this section is deprecated)
+** XBT virtualization mechanism (FIXME: this section is deprecated)
 **
 ****************************************************
 
-There is some functionnalities that we want to virtualize in XBT. We
+There is some functionalities that we want to virtualize in XBT. We
 want xbt_time to give the simulated clock when running on top of the
 simulator, and the host clock when running on a real system. This
 could be placed in GRAS (and was, historically), but there is some
-reason to lower it down to XBT. 
+reason to lower it down to XBT.
 
 Here is the used naming scheme:
 
-  - xbt_<module>_<func>(): functions working both in SG and RL  
+  - xbt_<module>_<func>(): functions working both in SG and RL
   - xbt_os_<module>_<func>(): RL functions usable even in simulator
-    
+
     That way, in libsimgrid, we still can use native functions if we
     want to. It may for example be useful to get the real time when
     implementing the simulator. Think of the SIGINT handler, which
@@ -142,17 +147,17 @@ Here is the used naming scheme:
 Here is the file layout:
 
   - xbt_rl_<module>.c: native implementation (xbt_<module>_<func>()).
-    Simply call the corresponding xbt_os_<module>_<func>.     
+    Simply call the corresponding xbt_os_<module>_<func>.
     Part only of libgras.so
-    
+
   - xbt_sg_<module>.c: SIMIX implementation xbt_<module>_<func>()).
-    Simply call the corresponding SIMIX implementation. 
+    Simply call the corresponding SIMIX implementation.
     Part only of libsimgrid.so
-    
+
   - xbt_os_<module>.c: body of the functions implementing natively the
     stuff (xbt_os_<module>_<func>()).
     Part of both libgras.so and libsimgrid.so
-    
+
 Since there is almost nothing in xbt_rl_module.c and xbt_sg_module.c,
 it'd be better to use symbol aliasing here (to declare in the object
 code that the same function have two names), but I'm still
@@ -163,8 +168,25 @@ investigating the portability of the thing to windows.
 * SimGrid Hacker Survival Guide (FIXME: should be betterly placed)
 ********************************
 
+* Before pushing any change, don't forget to check if the compilation
+  passes with compiler optimizations and warnings turned on:
+      cmake -Denable_compile_optimizations=ON \
+            -Denable_compile_warnings=ON
+
+* If you want to debug memory allocation problems, here are a few hints:
+  - disable compiler optimizations, to have better backtraces;
+  - disable the mallocators, or it will be hard to match malloc's with
+    free's;
+  - disable model checking, unless your problem lies in the model
+    checker part of SimGrid (MC brings its own malloc implementation,
+    which valgrind doesn't understand).
+  All this is configured with:
+      cmake -Denable_model-checking=OFF \
+            -Denable_mallocators=OFF \
+            -Denable_compile_optimizations=OFF
+
 * If you break the logs (for example while hacking in the dynars), you
   want to define XBT_LOG_MAYDAY at the beginning of log.h. It will
-  desactivate the whole logging mecanism, switching to printfs
+  deactivate the whole logging mechanism, switching to printfs
   instead. SimGrid becomes incredibly verbose when doing so, but it
-  you let you fixing the dynars.
\ No newline at end of file
+  you let you fixing the dynars.
index 7e11c81..837fc11 100644 (file)
@@ -1,7 +1,7 @@
 Using Git for SimGrid
 =====================
 
-SimGrid developement tree is now managed with Git. 
+SimGrid developement tree is now managed with Git.
 So, you need to use Git to :
 
 - follow the last development of SimGrid
@@ -61,7 +61,7 @@ Several rules must be repected as much as possible :
 - each commit should contain only one logical modification
 - this modification must be described in the log message. The first line of the
   log is a summary, the second line should be empty, the next lines can
-  describe more precisely the modifications. 
+  describe more precisely the modifications.
 
 
 Your first line of commit message can begin with a [flag] telling which global
diff --git a/TODO b/TODO
index 84ce366..6239595 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,14 @@
 
+###
+### Urgent stuff:
+###
+
+* Have a proper todo file
+
+
+
+
+
 
 
 
@@ -24,16 +34,6 @@ char *bprintf(const char*fmt, ...) _XBT_GNUC_PRINTF(1,2);
 ### Planned
 ###
 
-*
-* Infrastructure
-****************
-
-[build chain]
-  * Check the gcc version on powerpc. We disabled -floop-optimize on powerpc,
-    but versions above 3.4.0 should be ok.
-  * check whether we have better than jmp_buf to implement exceptions, and
-    use it (may need to generate a public .h, as glib does)
-
 *
 * XBT
 *****
index f530f1b..215ef12 100644 (file)
@@ -7,6 +7,7 @@ if(enable_smpi AND NOT WIN32)
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff" OUTPUT_VARIABLE "OKITOKI")
+  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
 endif()
 
@@ -100,6 +101,7 @@ if(NOT enable_memcheck)
   # MSG examples
   ADD_TEST(msg-file                             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh)
   ADD_TEST(msg-start-kill-time                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/start_kill_time/start_kill_time.tesh)
+  ADD_TEST(msg-chainsend                        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chainsend --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/chainsend --cd ${CMAKE_HOME_DIRECTORY}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/chainsend/chainsend.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)
@@ -237,6 +239,7 @@ if(NOT enable_memcheck)
   ADD_TEST(simdag-test-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-typed-tasks              ${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_typed_tasks.tesh)
   ADD_TEST(simdag-test-fail                     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_fail.tesh)
+  ADD_TEST(simdag-test-avail                     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_avail.tesh)
   ADD_TEST(simdag-test-comm-throttling          ${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_comm_throttling.tesh)
   ADD_TEST(simdag-test-dax                      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax.tesh)
   ADD_TEST(simdag-test-dax-cycle                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag/dax --cd ${CMAKE_BINARY_DIR}/examples/simdag/dax ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax/simple_dax_with_cycle.tesh)
@@ -283,8 +286,12 @@ if(NOT enable_memcheck)
 
   if(HAVE_NS3)
     ADD_TEST(msg-ns3-thread                     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --setenv srcdir=${CMAKE_HOME_DIRECTORY} --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} --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} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+    if(CONTEXT_UCONTEXT)
+      ADD_TEST(msg-ns3-ucontext                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+    endif()
+    if(HAVE_RAWCTX)
+      ADD_TEST(msg-ns3-raw                        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+    endif()
   endif()
 
   IF(HAVE_TRACING)
@@ -306,7 +313,6 @@ if(NOT enable_memcheck)
     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)
     ADD_TEST(lua-chord                          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/chord chord.tesh)
     ADD_TEST(lua-bittorrent                     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/bittorrent bittorrent.tesh)
     ADD_TEST(lua-kademlia                       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/kademlia kademlia.tesh)
@@ -315,15 +321,12 @@ if(NOT enable_memcheck)
     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")
-    set_tests_properties(lua-msg-masterslave-console    PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
     set_tests_properties(lua-chord                      PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
     set_tests_properties(lua-bittorrent                 PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
     set_tests_properties(lua-kademlia                   PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
     set_tests_properties(simdag-test-lua                PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
   endif()
 
-  # END TESH TESTS
-
   if(enable_smpi)
     # smpi examples
     ADD_TEST(smpi-bcast-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
@@ -334,7 +337,16 @@ if(NOT enable_memcheck)
     ADD_TEST(smpi-struct-thread                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
     ADD_TEST(smpi-pt2pt-thread                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
     ADD_TEST(smpi-compute-thread                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
-
+    if(CONTEXT_UCONTEXT)
+      ADD_TEST(smpi-bcast-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
+      ADD_TEST(smpi-reduce-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
+      ADD_TEST(smpi-vector-ucontex              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector.tesh)
+      ADD_TEST(smpi-hvector-ucontex             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hvector.tesh)
+      ADD_TEST(smpi-indexed-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed.tesh)
+      ADD_TEST(smpi-struct-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
+      ADD_TEST(smpi-pt2pt-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
+      ADD_TEST(smpi-compute-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
+    endif()
     if(HAVE_RAWCTX)
       ADD_TEST(smpi-bcast-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
       ADD_TEST(smpi-reduce-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
@@ -344,51 +356,45 @@ if(NOT enable_memcheck)
       ADD_TEST(smpi-struct-raw                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
       ADD_TEST(smpi-pt2pt-raw                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
       ADD_TEST(smpi-compute-raw                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
+    endif()
+    if(HAVE_TRACING)
+      ADD_TEST(smpi-tracing-ptp                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
+      ADD_TEST(smpi-replay                      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh)
+    endif()
+  endif()
+
+  # END TESH TESTS
+
+  if(enable_smpi)
+    if(HAVE_RAWCTX)
       ADD_TEST(smpi-mpich-env-raw               ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/env ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/env/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/env -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C})
       ADD_TEST(smpi-mpich-pt2pt-raw             ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/pt2pt ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/pt2pt/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/pt2pt -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C})
       ADD_TEST(smpi-mpich-context-raw           ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/context ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/context/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/context -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C})
       ADD_TEST(smpi-mpich-profile-raw           ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/profile  ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/profile/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/profile -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C} )
-      ADD_TEST(smpi-mpich-coll-raw              ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/coll ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/coll/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/coll -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C})       
+      ADD_TEST(smpi-mpich-coll-raw              ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich-test/coll ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/coll/runtests -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich-test/coll -basedir=${CMAKE_BINARY_DIR}/smpi_script/ -fort=${SMPI_F2C})
       set_tests_properties(smpi-mpich-env-raw smpi-mpich-context-raw  smpi-mpich-pt2pt-raw smpi-mpich-coll-raw smpi-mpich-profile-raw PROPERTIES PASS_REGULAR_EXPRESSION "-- No differences found; test successful")
-    
-    
-    endif()
-    if(CONTEXT_UCONTEXT)
-      ADD_TEST(smpi-bcast-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast.tesh)
-      ADD_TEST(smpi-reduce-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/reduce.tesh)
-      ADD_TEST(smpi-vector-ucontex              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/vector.tesh)
-      ADD_TEST(smpi-hvector-ucontex             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hvector.tesh)
-      ADD_TEST(smpi-indexed-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/indexed.tesh)
-      ADD_TEST(smpi-struct-ucontext             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
-      ADD_TEST(smpi-pt2pt-ucontext              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
-      ADD_TEST(smpi-compute-ucontext            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
-    endif()
-    if(HAVE_TRACING)
-      ADD_TEST(smpi-tracing-ptp                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
-      ADD_TEST(smpi-replay                      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh)
     endif()
   endif()
 
   # examples/msg/mc
   if(HAVE_MC)
     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(CONTEXT_UCONTEXT)
       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)
-      ADD_TEST(mc-bugged1-liveness-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_liveness.tesh)
-      ADD_TEST(mc-chord-neverjoin-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/chord chord_neverjoin.tesh)
-      ADD_TEST(mc-test-snapshot-comparison1     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison1.tesh)
-      ADD_TEST(mc-test-snapshot-comparison2     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot-comparison2.tesh)
-      ADD_TEST(mc-test-snapshot-comparison3     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison3.tesh)
-      ADD_TEST(mc-test-snapshot-comparison4     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison4.tesh)
-      ADD_TEST(mc-test-snapshot-comparison5     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison5.tesh)
+      if(PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...)
+        ADD_TEST(mc-bugged1-liveness-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_liveness.tesh)
+        ADD_TEST(mc-chord-neverjoin-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/chord --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/chord chord_neverjoin.tesh)
+        ADD_TEST(mc-test-snapshot-comparison1     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison1.tesh)
+        ADD_TEST(mc-test-snapshot-comparison2     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison2.tesh)
+        ADD_TEST(mc-test-snapshot-comparison3     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison3.tesh)
+        ADD_TEST(mc-test-snapshot-comparison4     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison4.tesh)
+        ADD_TEST(mc-test-snapshot-comparison5     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc/test --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/test snapshot_comparison5.tesh)
+      endif()
     endif()
     if(HAVE_RAWCTX)
       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()
   endif()
@@ -401,7 +407,6 @@ if(NOT enable_memcheck)
   if(release)
     if(HAVE_MC)
       set_tests_properties(mc-bugged1-thread PROPERTIES WILL_FAIL true)
-      set_tests_properties(mc-bugged2-thread PROPERTIES WILL_FAIL true)
       set_tests_properties(mc-centralized-thread PROPERTIES WILL_FAIL true)
       if(CONTEXT_UCONTEXT)
         set_tests_properties(mc-centralized-ucontext PROPERTIES WILL_FAIL true)
index 1d637be..abcd9c9 100644 (file)
@@ -52,7 +52,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390")
 ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
   message(STATUS "System processor: sh")
 
-ELSE() #PROCESSOR NOT fIND
+ELSE() #PROCESSOR NOT FOUND
   message(STATUS "PROCESSOR NOT FOUND: ${CMAKE_SYSTEM_PROCESSOR}")
 
 ENDIF()
@@ -118,7 +118,6 @@ CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
 CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
 CHECK_INCLUDE_FILE("sys/sysctl.h" HAVE_SYS_SYSCTL_H)
 CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H)
-CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
 CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
 CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
 CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
@@ -215,6 +214,40 @@ endif()
 CHECK_TYPE_SIZE(int SIZEOF_INT)
 CHECK_TYPE_SIZE(void* SIZEOF_VOIDP)
 
+#--------------------------------------------------------------------------------------------------
+### Check for GNU dynamic linker
+CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
+if (HAVE_DLFCN_H)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c -ldl -o test_gnu_ld
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      OUTPUT_VARIABLE HAVE_GNU_LD_compil
+    )
+    if(HAVE_GNU_LD_compil)
+      set(HAVE_GNU_LD 0)
+      message(STATUS "Warning: test program toward GNU ld failed to compile:")
+      message(STATUS "${HAVE_GNU_LD_comp_output}")
+    else()
+
+      execute_process(COMMAND ./test_gnu_ld
+          WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 
+          RESULT_VARIABLE HAVE_GNU_LD_run 
+          OUTPUT_VARIABLE var_exec
+      )
+
+      if(NOT HAVE_GNU_LD_run)
+        set(HAVE_GNU_LD 1)
+        message(STATUS "We are using GNU dynamic linker")
+      else()
+        set(HAVE_GNU_LD 0)
+        message(STATUS "Warning: error while checking for GNU ld:")
+        message(STATUS "Test output: '${var_exec}'")
+       message(STATUS "Exit status: ${HAVE_GNU_LD_run}")
+      endif()
+      file(REMOVE test_gnu_ld)
+    endif()
+endif()
+
+
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
@@ -541,7 +574,7 @@ endif()
 
 #AC_PROG_MAKE_SET
 
-#AC_PRINTF_NULL
+#AC_PRINTF_NULL FIXME: this is too ancient to survive!
 try_run(RUN_PRINTF_NULL_VAR COMPILE_PRINTF_NULL_VAR
   ${CMAKE_BINARY_DIR}
   ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_printf_null.c
@@ -757,6 +790,7 @@ configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/smpif.h.in ${CMAKE_BINARY_DI
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/bin/smpiff @ONLY)
+configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/bin/smpirun @ONLY)
 
 ### Script used when simgrid is compiling
@@ -770,6 +804,7 @@ set(libdir "${CMAKE_BINARY_DIR}/lib")
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff @ONLY)
+configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun @ONLY)
 
 set(top_builddir ${CMAKE_HOME_DIRECTORY})
@@ -778,10 +813,12 @@ if(NOT WIN32)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff)
+  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun)
 endif()
 
@@ -801,6 +838,7 @@ set(generated_files_to_clean
   ${CMAKE_BINARY_DIR}/bin/smpicc
   ${CMAKE_BINARY_DIR}/bin/smpif2c
   ${CMAKE_BINARY_DIR}/bin/smpiff
+  ${CMAKE_BINARY_DIR}/bin/smpif90
   ${CMAKE_BINARY_DIR}/bin/smpirun
   ${CMAKE_BINARY_DIR}/bin/colorize
   ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
@@ -817,7 +855,10 @@ else()
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/msg/tracing/platform.xml ${CMAKE_BINARY_DIR}/examples/msg/tracing/platform.xml COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions0.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions1.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allReduce.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_barrier.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_bcast.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_with_isend.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hostfile ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile COPYONLY)
 
   set(generated_files_to_clean
@@ -828,7 +869,10 @@ else()
     ${CMAKE_BINARY_DIR}/examples/msg/tracing/platform.xml
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_barrier.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_bcast.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_with_isend.txt
     ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile
     )
 endif()
index 0f5e390..56fd828 100644 (file)
@@ -1,9 +1,12 @@
 ### define source packages
 
 set(EXTRA_DIST
+  src/include/smpi/smpi_interface.h
+  src/include/instr/instr_interface.h
   src/include/mc/datatypes.h
   src/include/mc/mc.h
   src/include/simgrid/platf_interface.h
+  src/include/simgrid/sg_config.h
   src/include/surf/datatypes.h
   src/include/surf/maxmin.h
   src/include/surf/random_mgr.h
@@ -83,11 +86,15 @@ set(EXTRA_DIST
   src/xbt/mmalloc/mmtrace.awk
   src/xbt/mmalloc/mrealloc.c
   src/xbt/setset_private.h
+  src/win32/config.h
+  src/xbt/win32_ucontext.c
+  include/xbt/win32_ucontext.h
   tools/tesh/run_context.h
   tools/tesh/tesh.h
   )
 
 set(SMPI_SRC
+  src/smpi/instr_smpi.c
   src/smpi/smpi_base.c
   src/smpi/smpi_bench.c
   src/smpi/smpi_c99.c
@@ -181,6 +188,8 @@ set(SURF_SRC
   src/surf/cpu_cas01.c
   src/surf/cpu_ti.c
   src/surf/fair_bottleneck.c
+  src/surf/instr_routing.c
+  src/surf/instr_surf.c
   src/surf/lagrange.c
   src/surf/maxmin.c
   src/surf/network.c
@@ -191,7 +200,6 @@ set(SURF_SRC
   src/surf/storage.c
   src/surf/surf.c
   src/surf/surf_action.c
-  src/surf/surf_config.c
   src/surf/surf_model.c
   src/surf/surf_routing.c
   src/surf/surf_routing_cluster.c
@@ -226,9 +234,15 @@ set(SIMIX_SRC
   src/simix/smx_user.c
   )
 
+set(SIMGRID_SRC
+  src/simgrid/sg_config.c
+  )
+
 set(MSG_SRC
+  src/msg/instr_msg_process.c
+  src/msg/instr_msg_task.c
+  src/msg/instr_msg_vm.c
   src/msg/msg_actions.c
-  src/msg/msg_config.c
   src/msg/msg_deployment.c
   src/msg/msg_environment.c
   src/msg/msg_global.c
@@ -310,9 +324,6 @@ set(LUA_SRC
 set(TRACING_SRC
   src/instr/instr_config.c
   src/instr/instr_interface.c
-  src/instr/instr_msg_process.c
-  src/instr/instr_msg_vm.c
-  src/instr/instr_msg_task.c
   src/instr/instr_paje_containers.c
   src/instr/instr_paje_trace.c
   src/instr/instr_paje_header.c
@@ -320,9 +331,6 @@ set(TRACING_SRC
   src/instr/instr_paje_values.c
   src/instr/instr_private.h
   src/instr/instr_resource_utilization.c
-  src/instr/instr_routing.c
-  src/instr/instr_smpi.c
-  src/instr/instr_surf.c
   )
 
 set(JEDULE_SRC
@@ -454,15 +462,39 @@ endif()
 set(simgrid_sources
   ${BINDINGS_SRC}
   ${GTNETS_USED}
-  ${JEDULE_SRC}
   ${MSG_SRC}
   ${SIMDAG_SRC}
+  ${SIMGRID_SRC}
   ${SIMIX_SRC}
   ${SURF_SRC}
   ${TRACING_SRC}
   ${XBT_SRC}
   )
 
+if(${HAVE_JEDULE})
+  set(simgrid_sources
+    ${simgrid_sources}
+    ${JEDULE_SRC}
+    )
+else()
+  set(EXTRA_DIST
+    ${EXTRA_DIST}
+    ${JEDULE_SRC}
+    )
+endif()
+
+if(${HAVE_TRACING})
+  set(simgrid_sources
+    ${simgrid_sources}
+    ${TRACING_SRC}
+    )
+else()
+  set(EXTRA_DIST
+    ${EXTRA_DIST}
+    ${TRACING_SRC}
+    )
+endif()
+
 if(HAVE_MC)
   set(simgrid_sources
     ${simgrid_sources}
@@ -505,13 +537,41 @@ set(DOC_SOURCES
   doc/simix.fig
   doc/surf_nutshell.fig
   doc/Doxyfile.in
-  doc/FAQ.doc
-  doc/index.doc
-  doc/simgrid.css
-  doc/SimgridDoxygenLayout.xml
+  doc/Layout.xml
   doc/triva-graph_configuration.png
   doc/triva-graph_visualization.png
   doc/triva-time_interval.png
+  
+    doc/doxygen/footer.html
+  doc/doxygen/header.html
+  doc/doxygen/stylesheet.css
+  
+  doc/doxygen/index.doc
+  doc/doxygen/getting_started.doc  
+  doc/doxygen/introduction.doc
+  doc/doxygen/use.doc
+  doc/doxygen/bindings.doc
+  doc/doxygen/deployment.doc
+  doc/doxygen/install.doc
+  doc/doxygen/options.doc
+  doc/doxygen/platform.doc
+  doc/doxygen/pls.doc
+  doc/doxygen/tracing.doc
+  doc/doxygen/FAQ.doc
+  doc/doxygen/advanced.doc
+    doc/doxygen/inside_autotests.doc  
+    doc/doxygen/inside_cmake.doc
+    doc/doxygen/inside_extending.doc 
+    doc/doxygen/inside_release.doc
+    doc/doxygen/contributing.doc
+  doc/doxygen/modules.doc
+    doc/doxygen/module-msg.doc
+    doc/doxygen/module-sd.doc
+    doc/doxygen/module-simix.doc
+    doc/doxygen/module-surf.doc
+    doc/doxygen/module-trace.doc
+    doc/doxygen/module-xbt.doc
+
   )
 
 set(DOC_FIGS
@@ -519,123 +579,42 @@ set(DOC_FIGS
   ${CMAKE_HOME_DIRECTORY}/doc/shared/fig/simgrid_modules2.fig
   )
   
-set(DOC_SHARED_TAG
-  doc/shared/doxygen/simgriddevguide.tag
-  doc/shared/doxygen/simgridrefguide.tag
-  doc/shared/doxygen/simgriduserguide.tag
-  )
-  
 set(DOC_TOOLS
   tools/doxygen/fig2dev_postprocessor.pl
   tools/doxygen/index_create.pl
   tools/doxygen/xbt_log_extract_hierarchy.pl
   )
 
-
-set(USER_GUIDE_SOURCES
-  doc/user_guide/doxygen/footer.html
-  doc/user_guide/doxygen/header.html
-  doc/user_guide/doxygen/UserGuideDoxyfile.in
-  doc/user_guide/doxygen/UserGuideDoxygenLayout.xml
-  doc/user_guide/doxygen/bindings.doc
-  doc/user_guide/doxygen/deployment.doc
-  doc/user_guide/doxygen/examples.doc
-  doc/user_guide/doxygen/index.doc
-  doc/user_guide/doxygen/install.doc
-  doc/user_guide/doxygen/options.doc
-  doc/user_guide/doxygen/platform.doc
-  doc/user_guide/doxygen/pls.doc
-  doc/user_guide/doxygen/tracing.doc
-  doc/user_guide/doxygen/use.doc
-  doc/user_guide/doxygen/stylesheet.css
-  )
-    
-set(REF_GUIDE_SOURCES
-  doc/ref_guide/doxygen/footer.html
-  doc/ref_guide/doxygen/header.html
-  doc/ref_guide/doxygen/main.doc
-  doc/ref_guide/doxygen/module-msg.doc
-  doc/ref_guide/doxygen/module-sd.doc
-  doc/ref_guide/doxygen/module-simix.doc
-  doc/ref_guide/doxygen/module-surf.doc
-  doc/ref_guide/doxygen/module-trace.doc
-  doc/ref_guide/doxygen/module-xbt.doc
-  doc/ref_guide/doxygen/modules.doc
-  doc/ref_guide/doxygen/RefGuideDoxyfile.in
-  doc/ref_guide/doxygen/RefGuideDoxygenLayout.xml
-  doc/ref_guide/doxygen/stylesheet.css
-  )
-
-set(DEV_GUIDE_SOURCES
-  doc/dev_guide/doxygen/footer.html
-  doc/dev_guide/doxygen/header.html
-  doc/dev_guide/doxygen/index.doc
-  doc/dev_guide/doxygen/cmake.doc
-  doc/dev_guide/doxygen/simgrid.doc
-  doc/dev_guide/doxygen/xps.doc
-  doc/dev_guide/doxygen/DevGuideDoxyfile.in
-  doc/dev_guide/doxygen/DevGuideDoxygenLayout.xml
-  doc/dev_guide/doxygen/stylesheet.css
-  )
-
+# these files get copied automatically to the html documentation
 set(DOC_IMG
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/awstats_logo3.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot.jpg
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot_thn.jpg
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/poster_thumbnail.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/README
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.gif
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.icns
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.ico
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_001.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_002.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_003.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_004.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_005.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_006.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_007.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_008.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_009.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_010.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_011.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_012.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_013.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_014.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_015.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_016.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_017.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_018.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_019.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_020.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_021.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_022.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_023.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_024.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_025.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_026.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_027.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_028.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_029.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_030.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101.pdf
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.gif
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win_2011.bmp
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win.bmp
-${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
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_05.png
-${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_06.png
-)
+  ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot.jpg
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot_thn.jpg
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.gif
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.icns
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/SGicon.ico
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/awstats_logo3.png
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/output.goal.pdf
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/poster_thumbnail.png
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.gif
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win.bmp
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win_2011.bmp
+  ${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
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_05.png
+  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_06.png
+  )
 
 set(bin_files
   ${bin_files}
   src/smpi/smpicc.in
   src/smpi/smpif2c.in
   src/smpi/smpiff.in
+  src/smpi/smpif90.in
   src/smpi/smpirun.in
   )
 
@@ -643,6 +622,7 @@ set(txt_files
   ${txt_files}
   AUTHORS
   COPYING
+  README
   ChangeLog
   INSTALL
   LICENSE-LGPL-2.1
@@ -672,6 +652,7 @@ set(EXAMPLES_CMAKEFILES_TXT
   examples/msg/priority/CMakeLists.txt
   examples/msg/properties/CMakeLists.txt
   examples/msg/sendrecv/CMakeLists.txt
+  examples/msg/chainsend/CMakeLists.txt
   examples/msg/start_kill_time/CMakeLists.txt
   examples/msg/suspend/CMakeLists.txt
   examples/msg/token_ring/CMakeLists.txt
@@ -729,9 +710,6 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/Flags.cmake
   buildtools/Cmake/GenerateDoc.cmake
   buildtools/Cmake/GenerateDocWin.cmake
-  buildtools/Cmake/GenerateRefGuide.cmake
-  buildtools/Cmake/GenerateUserGuide.cmake
-  buildtools/Cmake/GenerateDevGuide.cmake
   buildtools/Cmake/MaintainerMode.cmake
   buildtools/Cmake/MakeExe.cmake
   buildtools/Cmake/MakeLib.cmake
@@ -779,6 +757,7 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/test_prog/prog_thread_storage.c
   buildtools/Cmake/test_prog/prog_va_copy.c
   buildtools/Cmake/test_prog/prog_vsnprintf.c
+  buildtools/Cmake/test_prog/prog_gnu_dynlinker.c
   )
 
 set(PLATFORMS_EXAMPLES
index c1b319c..ba1fc9c 100644 (file)
@@ -5,7 +5,6 @@
 # doc
 file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/shared/doxygen/)
 file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/)
-file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/)
 
 install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/"
   DESTINATION "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/ref_guide/html/"
@@ -43,6 +42,7 @@ endif()
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/smpicc
   ${CMAKE_BINARY_DIR}/bin/smpif2c
   ${CMAKE_BINARY_DIR}/bin/smpiff
+  ${CMAKE_BINARY_DIR}/bin/smpif90
   ${CMAKE_BINARY_DIR}/bin/smpirun
   DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
 
@@ -139,6 +139,7 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicc
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif2c
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpiff
+  COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif90
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpirun
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/tesh
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid-colorizer
@@ -190,6 +191,7 @@ set(source_to_pack
   ${NS3_SRC}
   ${RNGSTREAM_SRC}
   ${SIMDAG_SRC}
+  ${SIMGRID_SRC}
   ${SIMIX_SRC}
   ${SMPI_SRC}
   ${SURF_SRC}
@@ -206,10 +208,6 @@ set(source_to_pack
   ${DOC_IMG}
   ${DOC_SOURCES}
   ${DOC_TOOLS}
-  ${DOC_SHARED_TAG}
-  ${REF_GUIDE_SOURCES}
-  ${USER_GUIDE_SOURCES}
-  ${DEV_GUIDE_SOURCES}
   ${PLATFORMS_EXAMPLES}
   ${README_files}
   ${bin_files}
@@ -308,7 +306,7 @@ add_custom_target(distcheck
   COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
 
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Untar distrib"
-  COMMAND ${CMAKE_COMMAND} -E tar  xf ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}.tar.gz ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
+  COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}.tar.gz ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
 
   COMMAND ${CMAKE_COMMAND} -E echo "XXX create build and install subtrees"
   COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build
@@ -318,8 +316,6 @@ add_custom_target(distcheck
   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build
   ${CMAKE_COMMAND}
   -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_inst
-  -Denable_lua=ON
-  -Denable_model-checking=ON
   ..
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Build"
   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build ${CMAKE_MAKE_PROGRAM}
@@ -336,7 +332,7 @@ add_custom_target(distcheck
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Remove temp directories"
   COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
   )
-#add_dependencies(distcheck dist)
+add_dependencies(distcheck dist)
 
 #######################################
 ### Fill in the "make check" target ###
index 546551e..e8e8401 100644 (file)
@@ -17,6 +17,8 @@ if(enable_compile_warnings)
   if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
     string(REPLACE "-Wclobbered " "" warnCFLAGS "${warnCFLAGS}")
   endif()
+
+  set(CMAKE_Fortran_FLAGS "-Wall") # FIXME: Q&D hack
 endif()
 
 if(enable_compile_optimizations)
diff --git a/buildtools/Cmake/GenerateDevGuide.cmake b/buildtools/Cmake/GenerateDevGuide.cmake
deleted file mode 100644 (file)
index 71850d8..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#### Generate the html documentation
-
-if(DOXYGEN_PATH)
-
-  set(DOC_PNGS
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
-    )
-
-  configure_file(${CMAKE_HOME_DIRECTORY}/doc/dev_guide/doxygen/DevGuideDoxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/doxygen/DevGuideDoxyfile @ONLY)
-
-  ADD_CUSTOM_TARGET(dev_guide
-    COMMENT "Generating the SimGrid dev guide..."
-    DEPENDS ${DEV_GUIDE_SOURCES}
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/latex
-    COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/shared/doxygen/simgriddevguide.tag
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/doxygen/output.goal.pdf ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html/
-    )
-       
-  foreach(file ${DOC_FIGS})
-    string(REPLACE ".fig" ".png" tmp_file ${file})
-    string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/shared/fig/" "${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html/" tmp_file ${tmp_file})
-    ADD_CUSTOM_COMMAND(TARGET dev_guide
-      COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file}
-      )
-  endforeach(file ${DOC_FIGS})
-
-  foreach(file ${DOC_PNGS})
-    ADD_CUSTOM_COMMAND(TARGET dev_guide
-      COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/html/
-      )
-  endforeach(file ${DOC_PNGS})
-    
-  ADD_CUSTOM_COMMAND(TARGET dev_guide
-    COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
-    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/doxygen/ doxygen ./DevGuideDoxyfile
-
-    COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
-    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_HOME_DIRECTORY}/doc/dev_guide/doxygen/ doxygen ./DevGuideDoxyfile
-    )
-
-else()
-
-  ADD_CUSTOM_TARGET(dev_guide
-    COMMENT "Generating the SimGrid documentation..."
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET dev_guide
-    COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH     = ${DOXYGEN_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()
-
-##############################################################################"
index d70d56a..72a2e45 100644 (file)
@@ -5,6 +5,14 @@ find_path(FIG2DEV_PATH  NAMES fig2dev  PATHS NO_DEFAULT_PATHS)
 
 if(DOXYGEN_PATH)
 
+  ADD_CUSTOM_TARGET(simgrid_documentation
+    COMMENT "Generating the SimGrid documentation..."
+    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
+    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc
+    )
+
   execute_process(COMMAND ${DOXYGEN_PATH}/doxygen --version OUTPUT_VARIABLE DOXYGEN_VERSION )
   string(REGEX MATCH "^[0-9]" DOXYGEN_MAJOR_VERSION "${DOXYGEN_VERSION}")
   string(REGEX MATCH "^[0-9].[0-9]" DOXYGEN_MINOR_VERSION "${DOXYGEN_VERSION}")
@@ -13,39 +21,43 @@ if(DOXYGEN_PATH)
   string(REGEX REPLACE "^${DOXYGEN_MAJOR_VERSION}." "" DOXYGEN_MINOR_VERSION "${DOXYGEN_MINOR_VERSION}")
   message(STATUS "Doxygen version : ${DOXYGEN_MAJOR_VERSION}.${DOXYGEN_MINOR_VERSION}.${DOXYGEN_PATCH_VERSION}")
 
-  include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateUserGuide.cmake)
-  include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateRefGuide.cmake)
-  include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateDevGuide.cmake)
-
-  set(DOC_PNGS
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
+  if(DOXYGEN_MAJOR_VERSION STRLESS "2" AND DOXYGEN_MINOR_VERSION STRLESS "8")
+    ADD_CUSTOM_TARGET(error_doxygen
+      COMMAND ${CMAKE_COMMAND} -E echo "Doxygen must be at least version 1.8 to generate documentation"
+      COMMAND false
     )
 
+    add_dependencies(simgrid_documentation error_doxygen)
+  endif()
+
   configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY)
 
-  ADD_CUSTOM_TARGET(simgrid_documentation
-    COMMENT "Generating the SimGrid documentation..."
-    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
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc
-    )
+  foreach(file ${DOC_FIGS})
+    string(REPLACE ".fig" ".png" tmp_file ${file})
+    string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/shared/fig/" "${CMAKE_HOME_DIRECTORY}/doc/html/" tmp_file ${tmp_file})
+    ADD_CUSTOM_COMMAND(TARGET simgrid_documentation
+      COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file}
+      )
+  endforeach()
 
-  foreach(file ${DOC_PNGS})
+  foreach(file ${DOC_IMG})
     ADD_CUSTOM_COMMAND(
       TARGET simgrid_documentation
       COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/html/
-      )
-  endforeach(file ${DOC_PNGS})
-
-  ADD_CUSTOM_COMMAND(TARGET simgrid_documentation
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css ${CMAKE_HOME_DIRECTORY}/doc/html/
     )
+  endforeach()
 
   ADD_CUSTOM_COMMAND(TARGET simgrid_documentation
-    COMMAND ${CMAKE_COMMAND} -E echo "XX Doxygen pass"
+    COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/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
+    COMMAND ${CMAKE_COMMAND} -E echo "XX Run doxygen"
+    COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
+    COMMAND ${CMAKE_COMMAND} -E echo "XX Generate the index files"
+    COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl simgrid.tag index-API.doc     
+    COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_HOME_DIRECTORY}/doc/doxygen/logcategories.doc
+    COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/xbt_log_extract_hierarchy.pl > ${CMAKE_HOME_DIRECTORY}/doc/doxygen/logcategories.doc
+    COMMAND ${CMAKE_COMMAND} -E echo "XX Run doxygen again"
     COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
+    COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_HOME_DIRECTORY}/doc/simgrid_modules.map
     WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc
     )
 
@@ -62,18 +74,6 @@ if(DOXYGEN_PATH)
     )
   add_dependencies(pdf simgrid_documentation)
 
-  ADD_CUSTOM_TARGET(error_doxygen
-    COMMAND ${CMAKE_COMMAND} -E echo "Doxygen must be at least version 1.8 to generate documentation"
-    COMMAND false
-    )
-
-  if(DOXYGEN_MAJOR_VERSION STRLESS "2" AND DOXYGEN_MINOR_VERSION STRLESS "8")
-    add_dependencies(simgrid_documentation error_doxygen)
-  else()
-    add_dependencies(simgrid_documentation ref_guide)
-    add_dependencies(simgrid_documentation user_guide)
-    add_dependencies(simgrid_documentation dev_guide)
-  endif()
 
 endif()
 
@@ -81,31 +81,15 @@ endif()
 ### Fill in the "make sync-gforge" target ###
 #############################################
 
-### TODO: LBO: CHECK IF CORRECT
 add_custom_target(sync-gforge-doc
   COMMAND chmod g+rw -R doc/
   COMMAND chmod a+rX -R doc/
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/user_guide/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/ref_guide/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/dev_guide/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/user_guide/html/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/ref_guide/html/ || true
-  COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/dev_guide/html/ || true
+  COMMAND ssh scm.gforge.inria.fr mkdir -p /home/groups/simgrid/htdocs/simgrid/${release_version}/html/ || true
 
   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 rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times
-  doc/user_guide/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/user_guide/html/ || true
-
-  COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times
-  doc/ref_guide/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/ref_guide/html || true
-
-  COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times
-  doc/dev_guide/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/dev_guide/html || true
-
-  COMMAND scp doc/user_guide/html/simgrid_modules2.png doc/user_guide/html/simgrid_modules.png doc/webcruft/simgrid_logo_2011.png
+  COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo_2011.png
   doc/webcruft/simgrid_logo_2011_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/
   WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
   )
diff --git a/buildtools/Cmake/GenerateRefGuide.cmake b/buildtools/Cmake/GenerateRefGuide.cmake
deleted file mode 100644 (file)
index 9eb270f..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#### Generate the html documentation
-
-file(GLOB_RECURSE source_doxygen
-  "${CMAKE_HOME_DIRECTORY}/src/*.[chl]"
-  "${CMAKE_HOME_DIRECTORY}/include/*.[chl]"
-  )
-
-if(FIG2DEV_PATH)
-
-  set(DOC_PNGS
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
-    )
-
-  configure_file(${CMAKE_HOME_DIRECTORY}/doc/ref_guide/doxygen/RefGuideDoxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/doxygen/RefGuideDoxyfile @ONLY)
-
-  ADD_CUSTOM_TARGET(ref_guide
-    COMMENT "Generating the SimGrid ref guide..."
-    DEPENDS ${REF_GUIDE_SOURCES} ${DOC_FIGS} ${source_doxygen}
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html
-    COMMAND ${CMAKE_COMMAND} -E make_directory   ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET ref_guide
-    DEPENDS ${source_doxygen}
-    COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/doxygen/logcategories.doc
-    COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/xbt_log_extract_hierarchy.pl > ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/doxygen/logcategories.doc
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
-    )
-
-  foreach(file ${DOC_FIGS})
-    string(REPLACE ".fig" ".png" tmp_file ${file})
-    string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/shared/fig/" "${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/" tmp_file ${tmp_file})
-    ADD_CUSTOM_COMMAND(TARGET ref_guide
-      COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file}
-      )
-  endforeach(file ${DOC_FIGS})
-
-  foreach(file ${DOC_PNGS})
-    ADD_CUSTOM_COMMAND(TARGET ref_guide
-      COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/
-      )
-  endforeach(file ${DOC_PNGS})
-
-  ADD_CUSTOM_COMMAND(TARGET ref_guide
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css                          ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET ref_guide
-    COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/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/ref_guide/doxygen/simgrid_modules.map
-    COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
-    COMMAND ${DOXYGEN_PATH}/doxygen RefGuideDoxyfile
-    COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl ../../shared/doxygen/simgridrefguide.tag index-API.doc
-
-    COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
-    COMMAND ${DOXYGEN_PATH}/doxygen RefGuideDoxyfile
-
-    COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/dir*
-
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/doxygen
-    )
-
-else()
-
-  ADD_CUSTOM_TARGET(ref_guide
-    COMMENT "Generating the SimGrid documentation..."
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET ref_guide
-    COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH     = ${DOXYGEN_PATH}"
-    COMMAND ${CMAKE_COMMAND} -E echo "FIG2DEV_PATH     = ${FIG2DEV_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()
-
-##############################################################################"
-
-ADD_CUSTOM_TARGET(ref_guide_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(ref_guide_pdf ref_guide)
diff --git a/buildtools/Cmake/GenerateUserGuide.cmake b/buildtools/Cmake/GenerateUserGuide.cmake
deleted file mode 100644 (file)
index 41b792b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#### Generate the html documentation for the user guide.
-
-file(GLOB_RECURSE source_doxygen
-  "${CMAKE_HOME_DIRECTORY}/src/*.[chl]"
-  "${CMAKE_HOME_DIRECTORY}/include/*.[chl]"
-  )
-
-if(FIG2DEV_PATH)
-  set(DOC_PNGS
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_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
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_05.png
-    ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_06.png
-    )
-
-  configure_file(${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen/UserGuideDoxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen/UserGuideDoxyfile @ONLY)
-
-  ADD_CUSTOM_TARGET(user_guide
-    COMMENT "Generating the SimGrid user guide..."
-    DEPENDS ${USER_GUIDE_SOURCES} ${DOC_FIGS} ${source_doxygen}
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html
-    COMMAND ${CMAKE_COMMAND} -E make_directory   ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen
-    )
-
-  foreach(file ${DOC_FIGS})
-    string(REPLACE ".fig" ".png" tmp_file ${file})
-    string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/shared/fig/" "${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/" tmp_file ${tmp_file})
-    ADD_CUSTOM_COMMAND(TARGET user_guide
-      COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file}
-      )
-  endforeach(file ${DOC_FIGS})
-
-  foreach(file ${DOC_PNGS})
-    ADD_CUSTOM_COMMAND(TARGET user_guide
-      COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-      )
-  endforeach(file ${DOC_PNGS})
-
-  ADD_CUSTOM_COMMAND(TARGET user_guide
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot_thn.jpg ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot.jpg     ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/triva-graph_configuration.png        ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/triva-graph_visualization.png        ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/triva-time_interval.png        ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/AS_hierarchy.png        ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css                          ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET user_guide
-    COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/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/user_guide/doxygen/simgrid_modules.map
-    COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
-    COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
-
-    COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
-    COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
-
-    COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/dir*
-
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen
-    )
-
-else()
-
-  ADD_CUSTOM_TARGET(user_guide
-    COMMENT "Generating the SimGrid user guide..."
-    )
-
-  ADD_CUSTOM_COMMAND(TARGET user_guide
-    COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH             = ${DOXYGEN_PATH}"
-    COMMAND ${CMAKE_COMMAND} -E echo "FIG2DEV_PATH             = ${FIG2DEV_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()
-
-ADD_CUSTOM_TARGET(user_guide_pdf
-    COMMAND ${CMAKE_COMMAND} -E echo "XX First pass simgrid_user_guide.pdf"
-    COMMAND make clean
-    COMMAND make pdf || true
-    COMMAND ${CMAKE_COMMAND} -E echo "XX Second pass simgrid_user_guide.pdf"
-    COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/user_guide/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/user_guide/latex/refman.pdf ${CMAKE_HOME_DIRECTORY}/doc/latex/simgrid_documentation.pdf
-
-    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/latex/
-)
-add_dependencies(user_guide_pdf user_guide)
index 8c1c4f7..b297061 100644 (file)
@@ -35,6 +35,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/properties)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/actions)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/migration)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/chainsend)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/suspend)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/priority)
index 92ebff7..bce4151 100644 (file)
@@ -103,6 +103,10 @@ if(HAVE_MC)
   endif()
 endif()
 
+if(MMALLOC_WANT_OVERRIDE_LEGACY AND HAVE_GNU_LD)
+  SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl")
+endif()
+
 if(HAVE_NS3)
   if(${NS3_VERSION} EQUAL 310)
     SET(SIMGRID_DEP "${SIMGRID_DEP} -lns3")
index 81cffee..efe8df6 100644 (file)
@@ -69,7 +69,16 @@ else()
     message("-- Fortran for smpi is not installed (http://www.netlib.org/f2c/).")
 endif()
 
+
+#Some old versions of 64 bits systems seem to have a different size between C and Fortran Datatypes
+#Deactivate F2C with these versions, in order to avoid breaking test cases in legacy systems (as Fedora 13)
+set(COMPILER_OK 1)
+if(PROCESSOR_x86_64 AND "${CMAKE_SYSTEM}" MATCHES "Linux" AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU" AND "4.5" STRGREATER "${COMPILER_C_VERSION_MAJOR_MINOR}" )
+    set(COMPILER_OK 0)
+    message("Your C compiler is a bit old and Fortran support is quite problematic on 64 bit platforms, F2C has been deactivated")
+endif()
+
 set(SMPI_F2C 0)
-if(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB)
+if(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB AND COMPILER_OK)
   set(SMPI_F2C 1)
 endif()
index cbb044c..7f0c74a 100644 (file)
@@ -21,7 +21,7 @@ if(VALGRIND_EXE)
   if(NEW_VALGRIND_VERSION)
     message(STATUS "Valgrind version: ${NEW_VALGRIND_VERSION}")
     exec_program("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/generate_memcheck_tests.pl ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/AddTests.cmake > ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/memcheck_tests.cmake" OUTPUT_VARIABLE SHUTT)
-    set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no")
+    set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --trace-children-skip=/usr/bin/*,/bin/* --leak-check=full --show-reachable=yes --track-origins=no --read-var-info=no")
     message(STATUS "Valgrind options: ${MEMORYCHECK_COMMAND_OPTIONS}")
   else()
     set(enable_memcheck false)
index 609ae6e..a3321a0 100644 (file)
@@ -12,9 +12,10 @@ else()
 endif()
 
 set(pipol_user ${pipol_user} CACHE TYPE INTERNAL FORCE)
+mark_as_advanced(pipol_user)
 
 option(release "Whether Release Mode is activated (disable tests on experimental parts)" on)
-option(enable_compile_optimizations "" on)
+option(enable_compile_optimizations "Whether to produce efficient code for the SimGrid library" on)
 option(enable_debug "Set NDEBUG flag" on)
 
 option(enable_gtnets "Whether gtnets model is activated." off)
@@ -25,9 +26,12 @@ option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt."
 option(enable_tracing "Tracing simulations for visualization." on)
 option(enable_latency_bound_tracking "" off)
 option(enable_coverage "Enable coverage." off)
+mark_as_advanced(enable_coverage)
 option(enable_memcheck "Enable memcheck." off)
+mark_as_advanced(enable_memcheck)
 option(enable_mallocators "Enable mallocators (disable only for debugging purpose)." on)
 option(enable_print_message "Enable print message during config." off)
+mark_as_advanced(enable_print_message)
 option(enable_model-checking "Turn this on to experiment with our prototype of model-checker (hinders the simulation's performance even if turned of at runtime)" off)
 option(enable_lib_static "" off)
 option(enable_jedule "Jedule output of SimDAG." off)
@@ -43,9 +47,6 @@ endif()
 
 mark_as_advanced(HAVE_SSH)
 mark_as_advanced(HAVE_RSYNC)
-#mark_as_advanced(enable_coverage)
-#mark_as_advanced(enable_memcheck)
-#mark_as_advanced(enable_print_message)
 mark_as_advanced(BIBTEX2HTML_PATH)
 mark_as_advanced(BUILDNAME)
 mark_as_advanced(ADDR2LINE)
index b8528d9..fbbc74f 100755 (executable)
@@ -103,9 +103,13 @@ while ( defined( $line = <MAKETEST> ) ) {
             my ($count_first)  = 0;
             my ($count_second) = 0;
             open TESH_FILE, $tesh_file or die "Unable to open $tesh_file $!\n";
+            my ($input) = "";
             my ($l);
             while ( defined( $l = <TESH_FILE> ) ) {
                 chomp $l;
+                if ( $l =~ /^< (.*)$/ ) {
+                    $input = $input . $1 . "\n";
+                }
                 if ( $l =~ /^\$ (.*)$/ ) {
                     my ($command) = $1;
                     $command = var_subst($command, "srcdir", $srcdir);
@@ -123,8 +127,18 @@ while ( defined( $line = <MAKETEST> ) ) {
                     if ($config_var) {
                         $command = "$command $config_var";
                     }
+                    if ( $command =~ /^mkfile\s+(\S+)/) {
+                        my $file = $1;
+                        # don't ask me to explain why so many backslashes...
+                        $input =~ s/\\/\\\\\\\\\\\\\\\\/g;
+                        $input =~ s/\n/\\\\\\\\n/g;
+                        $input =~ s/"/\\\\\\\\042/g;
+                        $input =~ s/'/\\\\\\\\047/g;
+                        $input =~ s/%/%%/g;
+                        $command = "sh -c \"printf '$input' > $file\"";
+                    }
                     print "${indent}ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n";
-
+                    $input = "";
                     #push @test_list, "memcheck-$name_test-$count";
                     $count++;
                 }
index efbcacb..bf62388 100644 (file)
 #cmakedefine CMAKE_SYSTEM_PROCESSOR @CMAKE_SYSTEM_PROCESSOR@
 #cmakedefine HAVE_RAWCTX @HAVE_RAWCTX@
 
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@
+/* Define to 1 if you have the GNU ld library */
+#cmakedefine HAVE_GNU_LD @HAVE_GNU_LD@
 
 /* Define to 1 if you have the <errno.h> header file. */
 #cmakedefine HAVE_ERRNO_H @HAVE_ERRNO_H@
diff --git a/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c b/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c
new file mode 100644 (file)
index 0000000..43b1333
--- /dev/null
@@ -0,0 +1,32 @@
+/* prog_gnu_dynlinker.c -- check that RTLD_NEXT is defined as in GNU linker */
+/* Copyright (c) 2012. 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. */
+
+#define _GNU_SOURCE 1
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+static void * (*real_malloc) (size_t);
+
+int main(void) {
+   char *error;
+   dlerror(); // clear any previous error
+   real_malloc = (void * (*) (size_t)) dlsym(RTLD_NEXT, "malloc");
+   error = dlerror();
+   if (!error && real_malloc) {
+      char *A = real_malloc(20);
+      strcpy(A,"epic success");
+      free(A);
+      return 0; // SUCCESS
+   } else {
+      if (error)
+        printf("Error while checking for dlsym: %s\n",error);
+      else
+        printf("dlsym did not return any error, but failed to find malloc()\n");
+      return 1; // FAILED
+   }
+}
diff --git a/buildtools/jenkins/ctest2junit.xsl b/buildtools/jenkins/ctest2junit.xsl
new file mode 100755 (executable)
index 0000000..9c57627
--- /dev/null
@@ -0,0 +1,119 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="xml" indent="yes"/>
+
+       <xsl:template match="/Site">
+               <testsuite>
+                       <xsl:variable name="BuildName"><xsl:value-of select="@BuildName"/></xsl:variable>
+                       <xsl:variable name="BuildStamp"><xsl:value-of select="@BuildStamp"/></xsl:variable>
+                       <xsl:variable name="Name"><xsl:value-of select="@Name"/></xsl:variable>
+                       <xsl:variable name="Generator"><xsl:value-of select="@Generator"/></xsl:variable>
+                       <xsl:variable name="CompilerName"><xsl:value-of select="@CompilerName"/></xsl:variable>
+                       <xsl:variable name="OSName"><xsl:value-of select="@OSName"/></xsl:variable>
+                       <xsl:variable name="Hostname"><xsl:value-of select="@Hostname"/></xsl:variable>
+                       <xsl:variable name="OSRelease"><xsl:value-of select="@OSRelease"/></xsl:variable>
+                       <xsl:variable name="OSVersion"><xsl:value-of select="@OSVersion"/></xsl:variable>
+                       <xsl:variable name="OSPlatform"><xsl:value-of select="@OSPlatform"/></xsl:variable>
+                       <xsl:variable name="Is64Bits"><xsl:value-of select="@Is64Bits"/></xsl:variable>
+                       <xsl:variable name="VendorString"><xsl:value-of select="@VendorString"/></xsl:variable>
+                       <xsl:variable name="VendorID"><xsl:value-of select="@VendorID"/></xsl:variable>
+                       <xsl:variable name="FamilyID"><xsl:value-of select="@FamilyID"/></xsl:variable>
+                       <xsl:variable name="ModelID"><xsl:value-of select="@ModelID"/></xsl:variable>
+                       <xsl:variable name="ProcessorCacheSize"><xsl:value-of select="@ProcessorCacheSize"/></xsl:variable>
+                       <xsl:variable name="NumberOfLogicalCPU"><xsl:value-of select="@NumberOfLogicalCPU"/></xsl:variable>
+                       <xsl:variable name="NumberOfPhysicalCPU"><xsl:value-of select="@NumberOfPhysicalCPU"/></xsl:variable>
+                       <xsl:variable name="TotalVirtualMemory"><xsl:value-of select="@TotalVirtualMemory"/></xsl:variable>
+                       <xsl:variable name="TotalPhysicalMemory"><xsl:value-of select="@TotalPhysicalMemory"/></xsl:variable>
+                       <xsl:variable name="LogicalProcessorsPerPhysical"><xsl:value-of select="@LogicalProcessorsPerPhysical"/></xsl:variable>
+                       <xsl:variable name="ProcessorClockFrequency"><xsl:value-of select="@ProcessorClockFrequency"/></xsl:variable>
+                       <properties>
+                               <property name="BuildName" value="{$BuildName}" />
+                               <property name="BuildStamp" value="{$BuildStamp}" />
+                               <property name="Name" value="{$Name}" />
+                               <property name="Generator" value="{$Generator}" />
+                               <property name="CompilerName" value="{$CompilerName}" />
+                               <property name="OSName" value="{$OSName}" />
+                               <property name="Hostname" value="{$Hostname}" />
+                               <property name="OSRelease" value="{$OSRelease}" />
+                               <property name="OSVersion" value="{$OSVersion}" />
+                               <property name="OSPlatform" value="{$OSPlatform}" />
+                               <property name="Is64Bits" value="{$Is64Bits}" />
+                               <property name="VendorString" value="{$VendorString}" />
+                               <property name="VendorID" value="{$VendorID}" />
+                               <property name="FamilyID" value="{$FamilyID}" />
+                               <property name="ModelID" value="{$ModelID}" />
+                               <property name="ProcessorCacheSize" value="{$ProcessorCacheSize}" />
+                               <property name="NumberOfLogicalCPU" value="{$NumberOfLogicalCPU}" />
+                               <property name="NumberOfPhysicalCPU" value="{$NumberOfPhysicalCPU}" />
+                               <property name="TotalVirtualMemory" value="{$TotalVirtualMemory}" />
+                               <property name="TotalPhysicalMemory" value="{$TotalPhysicalMemory}" />
+                               <property name="LogicalProcessorsPerPhysical" value="{$LogicalProcessorsPerPhysical}" />
+                               <property name="ProcessorClockFrequency" value="{$ProcessorClockFrequency}" />
+                       </properties>
+                       <xsl:apply-templates select="Testing/Test"/>
+                       
+                       <system-out>
+                               BuildName: <xsl:value-of select="$BuildName" />
+                               BuildStamp: <xsl:value-of select="$BuildStamp" />
+                               Name: <xsl:value-of select="$Name" />
+                               Generator: <xsl:value-of select="$Generator" />
+                               CompilerName: <xsl:value-of select="$CompilerName" />
+                               OSName: <xsl:value-of select="$OSName" />
+                               Hostname: <xsl:value-of select="$Hostname" />
+                               OSRelease: <xsl:value-of select="$OSRelease" />
+                               OSVersion: <xsl:value-of select="$OSVersion" />
+                               OSPlatform: <xsl:value-of select="$OSPlatform" />
+                               Is64Bits: <xsl:value-of select="$Is64Bits" />
+                               VendorString: <xsl:value-of select="$VendorString" />
+                               VendorID: <xsl:value-of select="$VendorID" />
+                               FamilyID: <xsl:value-of select="$FamilyID" />
+                               ModelID: <xsl:value-of select="$ModelID" />
+                               ProcessorCacheSize: <xsl:value-of select="$ProcessorCacheSize" />
+                               NumberOfLogicalCPU: <xsl:value-of select="$NumberOfLogicalCPU" />
+                               NumberOfPhysicalCPU: <xsl:value-of select="$NumberOfPhysicalCPU" />
+                               TotalVirtualMemory: <xsl:value-of select="$TotalVirtualMemory" />
+                               TotalPhysicalMemory: <xsl:value-of select="$TotalPhysicalMemory" />
+                               LogicalProcessorsPerPhysical: <xsl:value-of select="$LogicalProcessorsPerPhysical" />
+                               ProcessorClockFrequency: <xsl:value-of select="$ProcessorClockFrequency" />
+                       </system-out>
+               </testsuite>
+       </xsl:template>
+
+    <xsl:template match="Testing/Test">
+        <xsl:variable name="testcasename"><xsl:value-of select= "Name"/></xsl:variable>
+               <xsl:variable name="exectime">
+                       <xsl:for-each select="Results/NamedMeasurement">
+                               <xsl:if test="@name = 'Execution Time'">
+                                       <xsl:value-of select="."/>
+                               </xsl:if>
+                       </xsl:for-each>
+               </xsl:variable>
+               
+                       <testcase name="{$testcasename}" classname="TestSuite" time="{$exectime}">
+            <xsl:if test="@Status = 'passed'">
+            </xsl:if>
+            <xsl:if test="@Status = 'failed'">
+                               <xsl:variable name="failtype">
+                                       <xsl:for-each select="Results/NamedMeasurement">
+                                               <xsl:if test="@name = 'Exit Code'">
+                                                       <xsl:value-of select="."/>
+                                               </xsl:if>
+                                       </xsl:for-each>
+                               </xsl:variable>
+                               <xsl:variable name="failcode">
+                                       <xsl:for-each select="Results/NamedMeasurement">
+                                               <xsl:if test="@name = 'Exit Value'">
+                                                       <xsl:value-of select="."/>
+                                               </xsl:if>
+                                       </xsl:for-each>
+                               </xsl:variable>
+                <error message="{$failtype} ({$failcode})"><xsl:value-of select="Results/Measurement/Value/text()" /></error>
+            </xsl:if>
+            <xsl:if test="@Status = 'notrun'">
+                <skipped><xsl:value-of select="Results/Measurement/Value/text()" /></skipped>
+            </xsl:if>
+           <system-out><xsl:value-of select="Results/Measurement/Value/text()" /></system-out>
+        </testcase>
+    </xsl:template>
+
+</xsl:stylesheet>
+
index ccf05a4..00ff108 100755 (executable)
@@ -30,8 +30,8 @@ fi
 #mem-check
 cmake \
 -Denable_lua=off \
--Denable_tracing=off \
--Denable_smpi=off \
+-Denable_tracing=on \
+-Denable_smpi=on \
 -Denable_compile_optimizations=off \
 -Denable_compile_warnings=on \
 -Denable_lib_static=off \
index 4666fe6..ca32ca4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,11 @@
-#! /bin/bash
+#! /bin/sh
 
-echo "THIS COMMAND IS NOT AVAILABLE!"
-echo "Since v3.4 we use cmake. Now use:"
-echo -e "\tcmake -DCMAKE_INSTALL_PREFIX=<where_you_want> .\n\tmake\n\tmake install"
+cat <<EOT
+THIS COMMAND IS NOT AVAILABLE!
+Since v3.4 we use cmake. Now use:
+        cmake -DCMAKE_INSTALL_PREFIX=<where_you_want> .
+        make
+        make install
+EOT
+
+exit 1
index 38f7f6f..f6d0b20 100644 (file)
@@ -41,7 +41,7 @@ PROJECT_NUMBER         = @release_version@
 # 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          = "Scalable simulation of distributed systems"
+PROJECT_BRIEF          = "Versatile Simulation of Distributed Systems"
 
 # 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
@@ -515,7 +515,7 @@ STRICT_PROTO_MATCHING  = NO
 # disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
-GENERATE_TODOLIST      = YES
+GENERATE_TODOLIST      = NO
 
 # The GENERATE_TESTLIST tag can be used to enable (YES) or
 # disable (NO) the test list. This list is created by putting \test
@@ -527,7 +527,7 @@ GENERATE_TESTLIST      = YES
 # disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
-GENERATE_BUGLIST       = YES
+GENERATE_BUGLIST       = NO
 
 # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
 # disable (NO) the deprecated list. This list is created by putting
@@ -586,7 +586,7 @@ FILE_VERSION_FILTER    =
 # You can optionally specify a file name after the option, if omitted
 # DoxygenLayout.xml will be used as the name of the layout file.
 
-LAYOUT_FILE            = SimgridDoxygenLayout.xml
+LAYOUT_FILE            = Layout.xml
 
 # The CITE_BIB_FILES tag can be used to specify one or more bib files
 # containing the references data. This must be a list of .bib files. The
@@ -617,7 +617,7 @@ WARNINGS               = YES
 # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
-WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_UNDOCUMENTED   = NO
 
 # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
 # potential errors in the documentation, such as not documenting some
@@ -632,7 +632,7 @@ WARN_IF_DOC_ERROR      = YES
 # wrong or incomplete parameter documentation, but not about the absence of
 # documentation.
 
-WARN_NO_PARAMDOC       = NO
+WARN_NO_PARAMDOC       = YES
 
 # The WARN_FORMAT tag determines the format of the warning messages that
 # doxygen can produce. The string should contain the $file, $line, and $text
@@ -658,9 +658,82 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = index.doc \
-                         FAQ.doc
-                         
+INPUT                  = doxygen/index.doc \
+                         doxygen/getting_started.doc \
+                         doxygen/introduction.doc \
+                         doxygen/install.doc \
+                         doxygen/use.doc \   
+                           doxygen/platform.doc \
+                           doxygen/deployment.doc \
+                           doxygen/options.doc \
+                           doxygen/help.doc \
+                        doxygen/advanced.doc \
+                           doxygen/pls.doc \
+                           doxygen/bindings.doc \
+                          doxygen/internals.doc \
+                            doxygen/inside_doxygen.doc \
+                            doxygen/inside_extending.doc \
+                            doxygen/inside_cmake.doc \
+                            doxygen/inside_autotests.doc \
+                            doxygen/inside_release.doc \
+                          doxygen/contributing.doc \
+                         doxygen/tracing.doc \
+                        doxygen/FAQ.doc \
+                        doxygen/modules.doc \
+                           doxygen/module-xbt.doc \
+                           doxygen/module-msg.doc \
+                           doxygen/module-sd.doc \
+                           doxygen/module-surf.doc \
+                           doxygen/module-simix.doc \
+                           doxygen/module-trace.doc \
+                           index-API.doc \
+                         @top_srcdir@/doc/doxygen/logcategories.doc \
+                         @top_srcdir@/src/instr/ \
+                         @top_srcdir@/include/ \
+                         @top_srcdir@/include/msg \
+                         @top_srcdir@/include/xbt \
+                         @top_srcdir@/include/simdag \
+                         @top_srcdir@/include/simgrid \
+                         @top_srcdir@/src/include/surf \
+                         @top_srcdir@/src/xbt/ \
+                         @top_srcdir@/src/surf/ \
+                         @top_srcdir@/src/msg/ \
+                         @top_srcdir@/src/simdag \
+                         @top_srcdir@/src/simix
+
+
+###################################################
+##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
+###################################################
+
+INPUT +=                 @top_srcdir@/examples/msg/sendrecv/sendrecv.c \
+                         @top_srcdir@/examples/msg/masterslave/masterslave_forwarder.c \
+                         @top_srcdir@/examples/msg/masterslave/masterslave_console.c \
+                         @top_srcdir@/examples/msg/migration \
+                         @top_srcdir@/examples/msg/suspend \
+                         @top_srcdir@/examples/msg/properties \
+                         @top_srcdir@/examples/msg/parallel_task \
+                         @top_srcdir@/examples/msg/priority \
+                         @top_srcdir@/examples/msg/icomms/peer.c \
+                         @top_srcdir@/examples/msg/icomms/peer2.c \
+                         @top_srcdir@/examples/msg/icomms/peer3.c \
+                         @top_srcdir@/examples/msg/tracing/simple.c \
+                         @top_srcdir@/examples/msg/tracing/ms.c \
+                         @top_srcdir@/examples/msg/tracing/categories.c \
+                         @top_srcdir@/examples/msg/tracing/procmig.c \
+                         @top_srcdir@/examples/msg/tracing/trace_platform.c \
+                         @top_srcdir@/examples/msg/tracing/user_variables.c \
+                         @top_srcdir@/examples/msg/tracing/link_user_variables.c \
+                         @top_srcdir@/examples/msg/tracing/link_srcdst_user_variables.c \
+                         @top_srcdir@/examples/msg/ns3 \
+                         @top_srcdir@/examples/msg/gtnets \
+                         @top_srcdir@/examples/msg/io \
+                         @top_srcdir@/examples/msg/gpu \
+                         @top_srcdir@/examples/msg/actions \
+                         @top_srcdir@/examples/msg/token_ring \
+                         @top_srcdir@/examples/msg/pmm \
+                         @top_srcdir@/examples/msg/chord
+
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
 # also the default input encoding. Doxygen uses libiconv (or the iconv built
@@ -743,7 +816,8 @@ EXAMPLE_RECURSIVE      = YES
 # directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = @top_srcdir@/doc
+IMAGE_PATH             = @top_srcdir@/doc \
+                         @top_srcdir@/doc/webcruft
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should
 # invoke to filter for each input file. Doxygen will invoke the filter program
@@ -892,13 +966,13 @@ HTML_FILE_EXTENSION    = .html
 # have to redo this when upgrading to a newer version of doxygen or when
 # changing the value of configuration settings such as GENERATE_TREEVIEW!
 
-HTML_HEADER            =
+HTML_HEADER            = doxygen/header.html 
 
 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
 # each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            = doxygen/footer.html
 
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
 # style sheet that is used by each HTML page. It can be used to
@@ -907,7 +981,7 @@ HTML_FOOTER            =
 # the style sheet file to the HTML output directory, so don't put your own
 # style sheet in the HTML output directory as well, or it will be erased!
 
-HTML_STYLESHEET        =
+HTML_STYLESHEET        = doxygen/stylesheet.css
 
 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the HTML output directory. Note
@@ -1123,7 +1197,7 @@ ECLIPSE_DOC_ID         = org.doxygen.Project
 # navigation tree you can set this option to NO if you already set
 # GENERATE_TREEVIEW to YES.
 
-DISABLE_INDEX          = NO
+DISABLE_INDEX          = YES
 
 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
 # structure should be generated to display hierarchical information.
@@ -1135,7 +1209,7 @@ DISABLE_INDEX          = NO
 # Since the tree basically has the same information as the tab index you
 # could consider to set DISABLE_INDEX to NO when enabling this option.
 
-GENERATE_TREEVIEW      = NO
+GENERATE_TREEVIEW      = YES
 
 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
 # (range [0,1..20]) that doxygen will group on one line in the generated HTML
@@ -1205,7 +1279,7 @@ MATHJAX_EXTENSIONS     =
 # typically be disabled. For large projects the javascript based search engine
 # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
 
-SEARCHENGINE           = NO
+SEARCHENGINE           = YES
 
 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
 # implemented using a PHP enabled web server instead of at the web client
@@ -1301,7 +1375,7 @@ LATEX_BATCHMODE        = NO
 # include the index chapters (such as File Index, Compound Index, etc.)
 # in the output.
 
-LATEX_HIDE_INDICES     = NO
+LATEX_HIDE_INDICES     = YES
 
 # If LATEX_SOURCE_CODE is set to YES then doxygen will include
 # source code with syntax highlighting in the LaTeX output.
@@ -1556,9 +1630,7 @@ SKIP_FUNCTION_MACROS   = YES
 # NOT include the path). If a tag file is not located in the directory in which
 # doxygen is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = shared/doxygen/simgridrefguide.tag=ref_guide/html/ \ 
-                         shared/doxygen/simgriduserguide.tag=user_guide/html/ \
-                         shared/doxygen/simgriddevguide.tag=dev_guide/html/
+TAGFILES               = 
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
similarity index 95%
rename from doc/user_guide/doxygen/UserGuideDoxygenLayout.xml
rename to doc/Layout.xml
index db4ab88..17001e6 100644 (file)
@@ -1,6 +1,8 @@
 <doxygenlayout version="1.0">
   <!-- Navigation index tabs for HTML output -->
   <navindex>
+    <tab type="mainpage" visible="yes" title="" />
+  
     <tab type="pages" visible="no" title="Table Of Content" intro="Complete pages list">
       <tab type="pages" visible="yes" title="Table Of Content" intro="Complete pages list"/>
     </tab>
@@ -19,8 +21,9 @@
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
     <tab type="modules" visible="no" title="" intro="">
-      <tab type="modules" visible="yes" title="Examples description" intro="In the example directory of SimGrid, you'll find usefull examples. Here's a description of the most important of them."/>
-    </tab>     
+      <tab type="modules" visible="yes" title="APIs Reference"
+           intro="Here is the hierarchical view of all SimGrid modules. You can reduce the amount of detail with the 'detail level' setting, on the right."/>
+    </tab>
   </navindex>
 
   <!-- Layout definition for a class page -->
diff --git a/doc/SimgridDoxygenLayout.xml b/doc/SimgridDoxygenLayout.xml
deleted file mode 100644 (file)
index c671239..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-<doxygenlayout version="1.0">
-  <!-- Navigation index tabs for HTML output -->
-  <navindex>
-    <tab type="mainpage" visible="yes" title="Home"/>
-    <tab type="user" url="../ref_guide/html/index.html" title="Reference Manual"/>
-    <tab type="user" url="../user_guide/html/index.html" title="User Guide"/>
-    <tab type="user" url="../dev_guide/html/index.html" title="Developer Guide"/>
-    <tab type="user" url="http://simgrid.gforge.inria.fr/tutorials" title="Tutorials"/>
-    <tab type="user" url="https://gforge.inria.fr/projects/simgrid" title="Forge"/>
-    <tab type="user" url="http://simgrid.gforge.inria.fr/" title="Website"/>
-    <tab type="examples" visible="no" title="" intro=""/>  
-    
-    <tab type="pages" visible="yes" title="" intro=""/>
-    <tab type="modules" visible="yes" title="" intro=""/>
-    <tab type="namespaces" visible="yes" title="">
-      <tab type="namespacelist" visible="yes" title="" intro=""/>
-      <tab type="namespacemembers" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="classes" visible="yes" title="">
-      <tab type="classlist" visible="yes" title="" intro=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
-      <tab type="hierarchy" visible="yes" title="" intro=""/>
-      <tab type="classmembers" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="files" visible="yes" title="">
-      <tab type="filelist" visible="yes" title="" intro=""/>
-      <tab type="globals" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="examples" visible="yes" title="" intro=""/>  
-  </navindex>
-
-  <!-- Layout definition for a class page -->
-  <class>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <inheritancegraph visible="$CLASS_GRAPH"/>
-    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
-    <allmemberslink visible="yes"/>
-    <memberdecl>
-      <nestedclasses visible="yes" title=""/>
-      <publictypes title=""/>
-      <publicslots title=""/>
-      <signals title=""/>
-      <publicmethods title=""/>
-      <publicstaticmethods title=""/>
-      <publicattributes title=""/>
-      <publicstaticattributes title=""/>
-      <protectedtypes title=""/>
-      <protectedslots title=""/>
-      <protectedmethods title=""/>
-      <protectedstaticmethods title=""/>
-      <protectedattributes title=""/>
-      <protectedstaticattributes title=""/>
-      <packagetypes title=""/>
-      <packagemethods title=""/>
-      <packagestaticmethods title=""/>
-      <packageattributes title=""/>
-      <packagestaticattributes title=""/>
-      <properties title=""/>
-      <events title=""/>
-      <privatetypes title=""/>
-      <privateslots title=""/>
-      <privatemethods title=""/>
-      <privatestaticmethods title=""/>
-      <privateattributes title=""/>
-      <privatestaticattributes title=""/>
-      <friends title=""/>
-      <related title="" subtitle=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <constructors title=""/>
-      <functions title=""/>
-      <related title=""/>
-      <variables title=""/>
-      <properties title=""/>
-      <events title=""/>
-    </memberdef>
-    <usedfiles visible="$SHOW_USED_FILES"/>
-    <authorsection visible="yes"/>
-  </class>
-
-  <!-- Layout definition for a namespace page -->
-  <namespace>
-    <briefdescription visible="yes"/>
-    <memberdecl>
-      <nestednamespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </namespace>
-
-  <!-- Layout definition for a file page -->
-  <file>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <includegraph visible="$INCLUDE_GRAPH"/>
-    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
-    <sourcelink visible="yes"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection/>
-  </file>
-
-  <!-- Layout definition for a group page -->
-  <group>
-    <briefdescription visible="yes"/>
-    <groupgraph visible="$GROUP_GRAPHS"/>
-    <memberdecl>
-      <nestedgroups visible="yes" title=""/>
-      <dirs visible="yes" title=""/>
-      <files visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <pagedocs/>
-      <inlineclasses title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </group>
-
-  <!-- Layout definition for a directory page -->
-  <directory>
-    <briefdescription visible="yes"/>
-    <directorygraph visible="yes"/>
-    <memberdecl>
-      <dirs visible="yes"/>
-      <files visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-  </directory>
-</doxygenlayout>
diff --git a/doc/dev_guide/doxygen/DevGuideDoxyfile.in b/doc/dev_guide/doxygen/DevGuideDoxyfile.in
deleted file mode 100644 (file)
index aa58101..0000000
+++ /dev/null
@@ -1,1810 +0,0 @@
-
-#               @WARNING@
-
-# Doxyfile 1.8.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = SimGrid
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-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          = "Scalable Simulation of Distributed Systems - Developer Guide"
-
-# 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
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           = 
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = ../
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        = @srcdir@
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-#TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-#MARKDOWN_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-#INLINE_SIMPLE_STRUCTS  = 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
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-#LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
-#EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            = DevGuideDoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
-#CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = index.doc \
-                         simgrid.doc \
-                         xps.doc \
-                         cmake.doc \
-                        release.doc
-                         
-###################################################
-##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
-###################################################
-
-INPUT += 
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           = ./
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = YES
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             = @top_srcdir@/doc
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-#  for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# style sheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = stylesheet.css
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# 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       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-#HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = YES
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-#MATHJAX_EXTENSIONS     =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-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
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = pdfpages
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# 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           =
-
-# 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         = 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           = 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
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = YES
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-#LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             = DOXYGEN \
-                         DOXYGEN_SKIP_IT \
-                         XBT_PUBLIC= \
-                         XBT_INLINE= \
-                         HAVE_TRACING \
-                         MSG_USE_DEPRECATED
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = @CMAKE_HOME_DIRECTORY@/doc/shared/doxygen/simgriddevguide.tag
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-#UML_LIMIT_NUM_FIELDS   = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = NO
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-#INTERACTIVE_SVG        = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
diff --git a/doc/dev_guide/doxygen/DevGuideDoxygenLayout.xml b/doc/dev_guide/doxygen/DevGuideDoxygenLayout.xml
deleted file mode 100644 (file)
index 589d0f1..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-<doxygenlayout version="1.0">
-  <!-- Navigation index tabs for HTML output -->
-  <navindex>
-    <tab type="mainpage" visible="yes" title=""/>
-    <tab type="pages" visible="yes" title="" intro=""/>
-    <tab type="modules" visible="yes" title="" intro=""/>
-    <tab type="namespaces" visible="yes" title="">
-      <tab type="namespacelist" visible="yes" title="" intro=""/>
-      <tab type="namespacemembers" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="classes" visible="yes" title="">
-      <tab type="classlist" visible="yes" title="" intro=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
-      <tab type="hierarchy" visible="yes" title="" intro=""/>
-      <tab type="classmembers" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="files" visible="yes" title="">
-      <tab type="filelist" visible="yes" title="" intro=""/>
-      <tab type="globals" visible="yes" title="" intro=""/>
-    </tab>
-    <tab type="examples" visible="yes" title="" intro=""/>  
-  </navindex>
-
-  <!-- Layout definition for a class page -->
-  <class>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <inheritancegraph visible="$CLASS_GRAPH"/>
-    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
-    <allmemberslink visible="yes"/>
-    <memberdecl>
-      <nestedclasses visible="yes" title=""/>
-      <publictypes title=""/>
-      <publicslots title=""/>
-      <signals title=""/>
-      <publicmethods title=""/>
-      <publicstaticmethods title=""/>
-      <publicattributes title=""/>
-      <publicstaticattributes title=""/>
-      <protectedtypes title=""/>
-      <protectedslots title=""/>
-      <protectedmethods title=""/>
-      <protectedstaticmethods title=""/>
-      <protectedattributes title=""/>
-      <protectedstaticattributes title=""/>
-      <packagetypes title=""/>
-      <packagemethods title=""/>
-      <packagestaticmethods title=""/>
-      <packageattributes title=""/>
-      <packagestaticattributes title=""/>
-      <properties title=""/>
-      <events title=""/>
-      <privatetypes title=""/>
-      <privateslots title=""/>
-      <privatemethods title=""/>
-      <privatestaticmethods title=""/>
-      <privateattributes title=""/>
-      <privatestaticattributes title=""/>
-      <friends title=""/>
-      <related title="" subtitle=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <constructors title=""/>
-      <functions title=""/>
-      <related title=""/>
-      <variables title=""/>
-      <properties title=""/>
-      <events title=""/>
-    </memberdef>
-    <usedfiles visible="$SHOW_USED_FILES"/>
-    <authorsection visible="yes"/>
-  </class>
-
-  <!-- Layout definition for a namespace page -->
-  <namespace>
-    <briefdescription visible="yes"/>
-    <memberdecl>
-      <nestednamespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </namespace>
-
-  <!-- Layout definition for a file page -->
-  <file>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <includegraph visible="$INCLUDE_GRAPH"/>
-    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
-    <sourcelink visible="yes"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <inlineclasses title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection/>
-  </file>
-
-  <!-- Layout definition for a group page -->
-  <group>
-    <briefdescription visible="yes"/>
-    <groupgraph visible="$GROUP_GRAPHS"/>
-    <memberdecl>
-      <nestedgroups visible="yes" title=""/>
-      <dirs visible="yes" title=""/>
-      <files visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <pagedocs/>
-      <inlineclasses title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </group>
-
-  <!-- Layout definition for a directory page -->
-  <directory>
-    <briefdescription visible="yes"/>
-    <directorygraph visible="yes"/>
-    <memberdecl>
-      <dirs visible="yes"/>
-      <files visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-  </directory>
-</doxygenlayout>
diff --git a/doc/dev_guide/doxygen/cmake.doc b/doc/dev_guide/doxygen/cmake.doc
deleted file mode 100644 (file)
index 8b706ce..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*! 
-\page cmake SimGrid Developer Guide - Cmake
-
-\section cmake_dev_guide_src How to add sources?
-
-If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake.
-Chose the section you are interested in and modifie it.
-
-\verbatim
-set(SMPI_SRC
-  src/smpi/smpi_base.c
-  src/smpi/smpi_bench.c
-  src/smpi/smpi_c99.c
-  src/smpi/smpi_coll.c
-  src/smpi/smpi_comm.c
-  src/smpi/smpi_global.c
-  src/smpi/smpi_group.c
-  src/smpi/smpi_mpi.c
-  src/smpi/smpi_mpi_dt.c
-  src/smpi/smpi_pmpi.c
-  src/smpi/smpi_replay.c
-  )
-\endverbatim
-
-If source file are a part of an option library (like fortran smpi source) you have to had it in the compiled sources 
-or in the EXTRA_DIST files package which is only copy in the dist. 
-\verbatim
-### If f2c is installed compiled source other-whise source is only copy in the dist 
-if(SMPI_F2C)
-  set(SMPI_SRC
-    ${SMPI_SRC}
-    src/smpi/smpi_f77.c
-    )
-else()
-  set(EXTRA_DIST
-    ${EXTRA_DIST}
-    src/smpi/smpi_f77.c
-  )
-endif()
-\endverbatim
-
-\section cmake_dev_guide_ex How to add examples?
-
-If you want make an example 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 "${CMAKE_CURRENT_BINARY_DIR}")
-
-add_executable(Hello Hello.c)
-
-### Add definitions for compile
-target_link_libraries(Hello simgrid)
-
-### You have to put all new files in the apropriated section 
-### If they are not there, they can't be on the dist package. 
-set(tesh_files
-  ${tesh_files}
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  PARENT_SCOPE
-  )
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/Hello.c
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
-set(txt_files
-  ${txt_files}
-  PARENT_SCOPE
-  )
-\endverbatim
-
-Then you have to modified :
-\li<project/directory>/buildtools/Cmake/MakeExeLib.cmake and add line:
-\verbatim
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
-\endverbatim
-
-\li <project/directory>/buildtools/Cmake/DefinePackages.cmake to add your CMakeLists to CMAKE_SOURCE_FILES:
-\verbatim
-set(CMAKE_SOURCE_FILES
-  CMakeLists.txt
-  ....
-  <path_where_is_CMakeList.txt>
-  )
-\endverbatim
-
-\section cmake_dev_guide_test How to add tests?
-To add a test in simgrid you have to modify source <project/directory>/buildtools/Cmake/AddTests.cmake. Create a new test with adding this line:
-\li With tesh
-\verbatim
-#  ADD_TEST(test-name ${CMAKE_BINARY_DIR}/bin/tesh <options> <tesh-file>)
-#  option --setenv bindir set the directory containing the binary
-#         --setenv srcdir set the directory containing the source file
-#         --cd set the working directory
-ADD_TEST(my-test-name ${CMAKE_BINARY_DIR}/bin/tesh 
-         --setenv bindir=${CMAKE_BINARY_DIR}/examples/my-test/
-         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/my-test/
-         --cd ${CMAKE_HOME_DIRECTORY}/examples/my-test/
-         ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh
-)
-\endverbatim             
-
-\li Without tesh
-\verbatim
-# ADD_TEST(NAME <name>]
-#          [WORKING_DIRECTORY dir]
-#          COMMAND <command> [arg1 [arg2 ...]])
-ADD_TEST(NAME my-test-name 
-         WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}/examples/my-test/
-         COMMAND Hello
-)
-\endverbatim 
-*/
diff --git a/doc/dev_guide/doxygen/header.html b/doc/dev_guide/doxygen/header.html
deleted file mode 100644 (file)
index 6b601d8..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<!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">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
-<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
-<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="$relpath$jquery.js"></script>
-<script type="text/javascript" src="$relpath$dynsections.js"></script>
-$treeview
-$search
-$mathjax
-<link href="stylesheet.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-
-<!--BEGIN TITLEAREA-->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <!--BEGIN PROJECT_LOGO-->
-  <td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
-  <!--END PROJECT_LOGO-->
-  <!--BEGIN PROJECT_NAME-->
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">$projectname
-   <!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
-   </div>
-   <!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
-  </td>
-  <!--END PROJECT_NAME-->
-  <!--BEGIN !PROJECT_NAME-->
-   <!--BEGIN PROJECT_BRIEF-->
-    <td style="padding-left: 0.5em;">
-    <div id="projectbrief">$projectbrief</div>
-    </td>
-   <!--END PROJECT_BRIEF-->
-  <!--END !PROJECT_NAME-->
-  <!--BEGIN DISABLE_INDEX-->
-  <!--END DISABLE_INDEX-->
- </tr>
- </tbody>
-</table>
-</div>
-<!--END TITLEAREA-->
-
-<div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="../../doc/index.html"><span>Home</span></a></li>
-      <li><a href="../../ref_guide/html/index.html"><span>Reference&nbsp;Manual</span></a></li>
-      <li><a href="../../user_guide/html/index.html"><span>User&nbsp;Guide</span></a></li>
-      <li class="current"><a href="index.html"><span>Developer&nbsp;Guide</span></a></li>
-      <li><a href="http://simgrid.gforge.inria.fr/tutorials.html"><span>Tutorials</span></a></li>
-      <li><a href="https://gforge.inria.fr/projects/simgrid"><span>Forge</span></a></li>
-      <li><a href="http://simgrid.gforge.inria.fr/"><span>Website</span></a></li>
-      <li>$searchbox</li>
-    </ul>
-  </div>
-<!-- end header part -->
diff --git a/doc/dev_guide/doxygen/index.doc b/doc/dev_guide/doxygen/index.doc
deleted file mode 100644 (file)
index 6ad77e3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*!
-@mainpage SimGrid Developer Guide
-
-<center>
-\htmlonly
-<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
-\htmlonly
-               </td>
-       </tr>
-</table>
-\endhtmlonly
-</center>
-
-Welcome to the SimGrid developer guide.
-
-<br>
-The SimGrid software package can be downloaded from
-<a href="http://simgrid.gforge.inria.fr/download.html">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="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
-mailing list</a>.
-
-
-<hr>
-\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>
-</center>
-\endhtmlonly
-
-
-*/
diff --git a/doc/dev_guide/doxygen/stylesheet.css b/doc/dev_guide/doxygen/stylesheet.css
deleted file mode 100644 (file)
index 124b725..0000000
+++ /dev/null
@@ -1,1176 +0,0 @@
-#MSearchBox {
-white-space: nowrap;
-position: absolute;
-float: none;
-display: inline;
-margin-top: 8px;
-right: 0px;
-width: 170px;
-z-index: 102;
-background-color: 
-white;
-}
-
-/* The standard CSS for doxygen */
-
-body, table, div, p, dl {
-       font: 400 14px/19px Roboto,sans-serif;
-}
-
-/* @group Heading Levels */
-
-h1 {
-       font-size: 150%;
-}
-
-.title {
-       font-size: 150%;
-       font-weight: bold;
-       margin: 10px 2px;
-}
-
-h2 {
-       border-bottom: 1px solid #879ECB;
-       color: #354C7B;
-       font-size: 150%;
-       font-weight: normal;
-       margin-top: 1.75em;
-       padding-top: 8px;
-       padding-bottom: 4px;
-       width: 100%;
-}
-
-h3 {
-       font-size: 100%;
-}
-
-h1, h2, h3, h4, h5, h6 {
-       -webkit-transition: text-shadow 0.5s linear;
-       -moz-transition: text-shadow 0.5s linear;
-       -ms-transition: text-shadow 0.5s linear;
-       -o-transition: text-shadow 0.5s linear;
-       transition: text-shadow 0.5s linear;
-       margin-right: 15px;
-}
-
-h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
-       text-shadow: 0 0 15px cyan;
-}
-
-dt {
-       font-weight: bold;
-}
-
-div.multicol {
-       -moz-column-gap: 1em;
-       -webkit-column-gap: 1em;
-       -moz-column-count: 3;
-       -webkit-column-count: 3;
-}
-
-p.startli, p.startdd, p.starttd {
-       margin-top: 2px;
-}
-
-p.endli {
-       margin-bottom: 0px;
-}
-
-p.enddd {
-       margin-bottom: 4px;
-}
-
-p.endtd {
-       margin-bottom: 2px;
-}
-
-/* @end */
-
-caption {
-       font-weight: bold;
-}
-
-span.legend {
-        font-size: 70%;
-        text-align: center;
-}
-
-h3.version {
-        font-size: 90%;
-        text-align: center;
-}
-
-div.qindex, div.navtab{
-       background-color: #EBEFF6;
-       border: 1px solid #A3B4D7;
-       text-align: center;
-}
-
-div.qindex, div.navpath {
-       width: 100%;
-       line-height: 140%;
-}
-
-div.navtab {
-       margin-right: 15px;
-}
-
-/* @group Link Styling */
-
-a {
-       color: #3D578C;
-       font-weight: normal;
-       text-decoration: none;
-}
-
-.contents a:visited {
-       color: #4665A2;
-}
-
-a:hover {
-       text-decoration: underline;
-}
-
-a.qindex {
-       font-weight: bold;
-}
-
-a.qindexHL {
-       font-weight: bold;
-       background-color: #9CAFD4;
-       color: #ffffff;
-       border: 1px double #869DCA;
-}
-
-.contents a.qindexHL:visited {
-        color: #ffffff;
-}
-
-a.el {
-       font-weight: bold;
-}
-
-a.elRef {
-}
-
-a.code, a.code:visited {
-       color: #4665A2; 
-}
-
-a.codeRef, a.codeRef:visited {
-       color: #4665A2; 
-}
-
-/* @end */
-
-dl.el {
-       margin-left: -1cm;
-}
-
-pre.fragment {
-        border: 1px solid #C4CFE5;
-        background-color: #FBFCFD;
-        padding: 4px 6px;
-        margin: 4px 8px 4px 2px;
-        overflow: auto;
-        word-wrap: break-word;
-        font-size:  9pt;
-        line-height: 125%;
-        font-family: monospace, fixed;
-        font-size: 105%;
-}
-
-div.fragment {
-        padding: 4px;
-        margin: 4px;
-       background-color: #FBFCFD;
-       border: 1px solid #C4CFE5;
-}
-
-div.line {
-       font-family: monospace, fixed;
-        font-size: 13px;
-       min-height: 13px;
-       line-height: 1.0;
-       text-wrap: unrestricted;
-       white-space: -moz-pre-wrap; /* Moz */
-       white-space: -pre-wrap;     /* Opera 4-6 */
-       white-space: -o-pre-wrap;   /* Opera 7 */
-       white-space: pre-wrap;      /* CSS3  */
-       word-wrap: break-word;      /* IE 5.5+ */
-       text-indent: -53px;
-       padding-left: 53px;
-       padding-bottom: 0px;
-       margin: 0px;
-       -webkit-transition-property: background-color, box-shadow;
-       -webkit-transition-duration: 0.5s;
-       -moz-transition-property: background-color, box-shadow;
-       -moz-transition-duration: 0.5s;
-       -ms-transition-property: background-color, box-shadow;
-       -ms-transition-duration: 0.5s;
-       -o-transition-property: background-color, box-shadow;
-       -o-transition-duration: 0.5s;
-       transition-property: background-color, box-shadow;
-       transition-duration: 0.5s;
-}
-
-div.line.glow {
-       background-color: cyan;
-       box-shadow: 0 0 10px cyan;
-}
-
-
-span.lineno {
-       padding-right: 4px;
-       text-align: right;
-       border-right: 2px solid #0F0;
-       background-color: #E8E8E8;
-        white-space: pre;
-}
-span.lineno a {
-       background-color: #D8D8D8;
-}
-
-span.lineno a:hover {
-       background-color: #C8C8C8;
-}
-
-div.ah {
-       background-color: black;
-       font-weight: bold;
-       color: #ffffff;
-       margin-bottom: 3px;
-       margin-top: 3px;
-       padding: 0.2em;
-       border: solid thin #333;
-       border-radius: 0.5em;
-       -webkit-border-radius: .5em;
-       -moz-border-radius: .5em;
-       box-shadow: 2px 2px 3px #999;
-       -webkit-box-shadow: 2px 2px 3px #999;
-       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
-       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
-}
-
-div.groupHeader {
-       margin-left: 16px;
-       margin-top: 12px;
-       font-weight: bold;
-}
-
-div.groupText {
-       margin-left: 16px;
-       font-style: italic;
-}
-
-body {
-       background-color: white;
-       color: black;
-        margin: 0;
-}
-
-div.contents {
-       margin-top: 10px;
-       margin-left: 12px;
-       margin-right: 8px;
-}
-
-td.indexkey {
-       background-color: #EBEFF6;
-       font-weight: bold;
-       border: 1px solid #C4CFE5;
-       margin: 2px 0px 2px 0;
-       padding: 2px 10px;
-        white-space: nowrap;
-        vertical-align: top;
-}
-
-td.indexvalue {
-       background-color: #EBEFF6;
-       border: 1px solid #C4CFE5;
-       padding: 2px 10px;
-       margin: 2px 0px;
-}
-
-tr.memlist {
-       background-color: #EEF1F7;
-}
-
-p.formulaDsp {
-       text-align: center;
-}
-
-img.formulaDsp {
-       
-}
-
-img.formulaInl {
-       vertical-align: middle;
-}
-
-div.center {
-       text-align: center;
-        margin-top: 0px;
-        margin-bottom: 0px;
-        padding: 0px;
-}
-
-div.center img {
-       border: 0px;
-}
-
-address.footer {
-       text-align: right;
-       padding-right: 12px;
-}
-
-img.footer {
-       border: 0px;
-       vertical-align: middle;
-}
-
-/* @group Code Colorization */
-
-span.keyword {
-       color: #008000
-}
-
-span.keywordtype {
-       color: #604020
-}
-
-span.keywordflow {
-       color: #e08000
-}
-
-span.comment {
-       color: #800000
-}
-
-span.preprocessor {
-       color: #806020
-}
-
-span.stringliteral {
-       color: #002080
-}
-
-span.charliteral {
-       color: #008080
-}
-
-span.vhdldigit { 
-       color: #ff00ff 
-}
-
-span.vhdlchar { 
-       color: #000000 
-}
-
-span.vhdlkeyword { 
-       color: #700070 
-}
-
-span.vhdllogic { 
-       color: #ff0000 
-}
-
-blockquote {
-        background-color: #F7F8FB;
-        border-left: 2px solid #9CAFD4;
-        margin: 0 24px 0 4px;
-        padding: 0 12px 0 16px;
-}
-
-/* @end */
-
-/*
-.search {
-       color: #003399;
-       font-weight: bold;
-}
-
-form.search {
-       margin-bottom: 0px;
-       margin-top: 0px;
-}
-
-input.search {
-       font-size: 75%;
-       color: #000080;
-       font-weight: normal;
-       background-color: #e8eef2;
-}
-*/
-
-td.tiny {
-       font-size: 75%;
-}
-
-.dirtab {
-       padding: 4px;
-       border-collapse: collapse;
-       border: 1px solid #A3B4D7;
-}
-
-th.dirtab {
-       background: #EBEFF6;
-       font-weight: bold;
-}
-
-hr {
-       height: 0px;
-       border: none;
-       border-top: 1px solid #4A6AAA;
-}
-
-hr.footer {
-       height: 1px;
-}
-
-/* @group Member Descriptions */
-
-table.memberdecls {
-       border-spacing: 0px;
-       padding: 0px;
-}
-
-.memberdecls td, .fieldtable tr {
-       -webkit-transition-property: background-color, box-shadow;
-       -webkit-transition-duration: 0.5s;
-       -moz-transition-property: background-color, box-shadow;
-       -moz-transition-duration: 0.5s;
-       -ms-transition-property: background-color, box-shadow;
-       -ms-transition-duration: 0.5s;
-       -o-transition-property: background-color, box-shadow;
-       -o-transition-duration: 0.5s;
-       transition-property: background-color, box-shadow;
-       transition-duration: 0.5s;
-}
-
-.memberdecls td.glow, .fieldtable tr.glow {
-       background-color: cyan;
-       box-shadow: 0 0 15px cyan;
-}
-
-.mdescLeft, .mdescRight,
-.memItemLeft, .memItemRight,
-.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
-       background-color: #F9FAFC;
-       border: none;
-       margin: 4px;
-       padding: 1px 0 0 8px;
-}
-
-.mdescLeft, .mdescRight {
-       padding: 0px 8px 4px 8px;
-       color: #555;
-}
-
-.memItemLeft, .memItemRight, .memTemplParams {
-       border-bottom: 1px solid #DEE4F0;
-}
-
-.memItemLeft, .memTemplItemLeft {
-        white-space: nowrap;
-}
-
-.memItemRight {
-       width: 100%;
-}
-
-.memTemplParams {
-       color: #4665A2;
-        white-space: nowrap;
-}
-
-/* @end */
-
-/* @group Member Details */
-
-/* Styles for detailed member documentation */
-
-.memtemplate {
-       font-size: 80%;
-       color: #4665A2;
-       font-weight: normal;
-       margin-left: 9px;
-}
-
-.memnav {
-       background-color: #EBEFF6;
-       border: 1px solid #A3B4D7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-
-.mempage {
-       width: 100%;
-}
-
-.memitem {
-       padding: 0;
-       margin-bottom: 10px;
-       margin-right: 5px;
-        -webkit-transition: box-shadow 0.5s linear;
-        -moz-transition: box-shadow 0.5s linear;
-        -ms-transition: box-shadow 0.5s linear;
-        -o-transition: box-shadow 0.5s linear;
-        transition: box-shadow 0.5s linear;
-        display: table !important;
-        width: 100%;
-}
-
-.memitem.glow {
-         box-shadow: 0 0 15px cyan;
-}
-
-.memname {
-        font-weight: bold;
-        margin-left: 6px;
-}
-
-.memname td {
-       vertical-align: bottom;
-}
-
-.memproto, dl.reflist dt {
-        border-top: 1px solid #A8B8D9;
-        border-left: 1px solid #A8B8D9;
-        border-right: 1px solid #A8B8D9;
-        padding: 6px 0px 6px 0px;
-        color: #253555;
-        font-weight: bold;
-        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #E2E8F2;
-        /* opera specific markup */
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        /* firefox specific markup */
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        -moz-border-radius-topright: 4px;
-        -moz-border-radius-topleft: 4px;
-        /* webkit specific markup */
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        -webkit-border-top-right-radius: 4px;
-        -webkit-border-top-left-radius: 4px;
-
-}
-
-.memdoc, dl.reflist dd {
-        border-bottom: 1px solid #A8B8D9;      
-        border-left: 1px solid #A8B8D9;      
-        border-right: 1px solid #A8B8D9; 
-        padding: 6px 10px 2px 10px;
-        background-color: #FBFCFD;
-        border-top-width: 0;
-        background-image:url('nav_g.png');
-        background-repeat:repeat-x;
-        background-color: #FFFFFF;
-        /* opera specific markup */
-        border-bottom-left-radius: 4px;
-        border-bottom-right-radius: 4px;
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        /* firefox specific markup */
-        -moz-border-radius-bottomleft: 4px;
-        -moz-border-radius-bottomright: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        /* webkit specific markup */
-        -webkit-border-bottom-left-radius: 4px;
-        -webkit-border-bottom-right-radius: 4px;
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-}
-
-dl.reflist dt {
-        padding: 5px;
-}
-
-dl.reflist dd {
-        margin: 0px 0px 10px 0px;
-        padding: 5px;
-}
-
-.paramkey {
-       text-align: right;
-}
-
-.paramtype {
-       white-space: nowrap;
-}
-
-.paramname {
-       color: #602020;
-       white-space: nowrap;
-}
-.paramname em {
-       font-style: normal;
-}
-.paramname code {
-        line-height: 14px;
-}
-
-.params, .retval, .exception, .tparams {
-        margin-left: 0px;
-        padding-left: 0px;
-}       
-
-.params .paramname, .retval .paramname {
-        font-weight: bold;
-        vertical-align: top;
-}
-        
-.params .paramtype {
-        font-style: italic;
-        vertical-align: top;
-}       
-        
-.params .paramdir {
-        font-family: "courier new",courier,monospace;
-        vertical-align: top;
-}
-
-table.mlabels {
-       border-spacing: 0px;
-}
-
-td.mlabels-left {
-       width: 100%;
-       padding: 0px;
-}
-
-td.mlabels-right {
-       vertical-align: bottom;
-       padding: 0px;
-       white-space: nowrap;
-}
-
-span.mlabels {
-        margin-left: 8px;
-}
-
-span.mlabel {
-        background-color: #728DC1;
-        border-top:1px solid #5373B4;
-        border-left:1px solid #5373B4;
-        border-right:1px solid #C4CFE5;
-        border-bottom:1px solid #C4CFE5;
-       text-shadow: none;
-        color: white;
-        margin-right: 4px;
-        padding: 2px 3px;
-        border-radius: 3px;
-        font-size: 7pt;
-       white-space: nowrap;
-}
-
-
-
-/* @end */
-
-/* these are for tree view when not used as main index */
-
-div.directory {
-        margin: 10px 0px;
-        border-top: 1px solid #A8B8D9;
-        border-bottom: 1px solid #A8B8D9;
-        width: 100%;
-}
-
-.directory table {
-        border-collapse:collapse;
-}
-
-.directory td {
-        margin: 0px;
-        padding: 0px;
-       vertical-align: top;
-}
-
-.directory td.entry {
-        white-space: nowrap;
-        padding-right: 6px;
-}
-
-.directory td.entry a {
-        outline:none;
-}
-
-.directory td.entry a img {
-        border: none;
-}
-
-.directory td.desc {
-        width: 100%;
-        padding-left: 6px;
-       padding-right: 6px;
-       padding-top: 3px;
-       border-left: 1px solid rgba(0,0,0,0.05);
-}
-
-.directory tr.even {
-       padding-left: 6px;
-       background-color: #F7F8FB;
-}
-
-.directory img {
-       vertical-align: -30%;
-}
-
-.directory .levels {
-        white-space: nowrap;
-        width: 100%;
-        text-align: right;
-        font-size: 9pt;
-}
-
-.directory .levels span {
-        cursor: pointer;
-        padding-left: 2px;
-        padding-right: 2px;
-       color: #3D578C;
-}
-
-div.dynheader {
-        margin-top: 8px;
-       -webkit-touch-callout: none;
-       -webkit-user-select: none;
-       -khtml-user-select: none;
-       -moz-user-select: none;
-       -ms-user-select: none;
-       user-select: none;
-}
-
-address {
-       font-style: normal;
-       color: #2A3D61;
-}
-
-table.doxtable {
-       border-collapse:collapse;
-        margin-top: 4px;
-        margin-bottom: 4px;
-}
-
-table.doxtable td, table.doxtable th {
-       border: 1px solid #2D4068;
-       padding: 3px 7px 2px;
-}
-
-table.doxtable th {
-       background-color: #374F7F;
-       color: #FFFFFF;
-       font-size: 110%;
-       padding-bottom: 4px;
-       padding-top: 5px;
-}
-
-table.fieldtable {
-        width: 100%;
-        margin-bottom: 10px;
-        border: 1px solid #A8B8D9;
-        border-spacing: 0px;
-        -moz-border-radius: 4px;
-        -webkit-border-radius: 4px;
-        border-radius: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-}
-
-.fieldtable td, .fieldtable th {
-        padding: 3px 7px 2px;
-}
-
-.fieldtable td.fieldtype, .fieldtable td.fieldname {
-        white-space: nowrap;
-        border-right: 1px solid #A8B8D9;
-        border-bottom: 1px solid #A8B8D9;
-        vertical-align: top;
-}
-
-.fieldtable td.fielddoc {
-        border-bottom: 1px solid #A8B8D9;
-        width: 100%;
-}
-
-.fieldtable tr:last-child td {
-        border-bottom: none;
-}
-
-.fieldtable th {
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #E2E8F2;
-        font-size: 90%;
-        color: #253555;
-        padding-bottom: 4px;
-        padding-top: 5px;
-        text-align:left;
-        -moz-border-radius-topleft: 4px;
-        -moz-border-radius-topright: 4px;
-        -webkit-border-top-left-radius: 4px;
-        -webkit-border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        border-top-right-radius: 4px;
-        border-bottom: 1px solid #A8B8D9;
-}
-
-
-.tabsearch {
-       top: 0px;
-       left: 10px;
-       height: 36px;
-       background-image: url('tab_b.png');
-       z-index: 101;
-       overflow: hidden;
-       font-size: 13px;
-}
-
-.navpath ul
-{
-       font-size: 11px;
-       background-image:url('tab_b.png');
-       background-repeat:repeat-x;
-       height:30px;
-       line-height:30px;
-       color:#8AA0CC;
-       border:solid 1px #C2CDE4;
-       overflow:hidden;
-       margin:0px;
-       padding:0px;
-}
-
-.navpath li
-{
-       list-style-type:none;
-       float:left;
-       padding-left:10px;
-       padding-right:15px;
-       background-image:url('bc_s.png');
-       background-repeat:no-repeat;
-       background-position:right;
-       color:#364D7C;
-}
-
-.navpath li.navelem a
-{
-       height:32px;
-       display:block;
-       text-decoration: none;
-       outline: none;
-       font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
-}
-
-.navpath li.navelem a:hover
-{
-       color:#6884BD;
-}
-
-.navpath li.footer
-{
-        list-style-type:none;
-        float:right;
-        padding-left:10px;
-        padding-right:15px;
-        background-image:none;
-        background-repeat:no-repeat;
-        background-position:right;
-        color:#364D7C;
-        font-size: 8pt;
-}
-
-
-div.summary
-{
-       float: right;
-       font-size: 8pt;
-       padding-right: 5px;
-       width: 50%;
-       text-align: right;
-}       
-
-div.summary a
-{
-       white-space: nowrap;
-}
-
-div.ingroups
-{
-       font-size: 8pt;
-       width: 50%;
-       text-align: left;
-}
-
-div.ingroups a
-{
-       white-space: nowrap;
-}
-
-div.header
-{
-        background-image:url('nav_h.png');
-        background-repeat:repeat-x;
-       background-color: #F9FAFC;
-       margin:  0px;
-       border-bottom: 1px solid #C4CFE5;
-}
-
-div.headertitle
-{
-       padding: 5px 5px 5px 10px;
-}
-
-dl
-{
-        padding: 0 0 0 10px;
-}
-
-/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
-dl.section
-{
-       margin-left: 0px;
-       padding-left: 0px;
-}
-
-dl.note
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #D0C000;
-}
-
-dl.warning, dl.attention
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #FF0000;
-}
-
-dl.pre, dl.post, dl.invariant
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00D000;
-}
-
-dl.deprecated
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #505050;
-}
-
-dl.todo
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00C0E0;
-}
-
-dl.test
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #3030E0;
-}
-
-dl.bug
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #C08050;
-}
-
-dl.section dd {
-       margin-bottom: 6px;
-}
-
-
-#projectlogo
-{
-       text-align: center;
-       vertical-align: bottom;
-       border-collapse: separate;
-}
-#projectlogo img
-{ 
-       border: 0px none;
-}
-#projectname
-{
-       font: 300% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 2px 0px;
-}
-    
-#projectbrief
-{
-       font: 120% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 0px;
-}
-
-#projectnumber
-{
-       font: 50% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 0px;
-}
-
-#titlearea
-{
-       padding: 0px;
-       margin: 0px;
-       width: 100%;
-       border-bottom: 1px solid #5373B4;
-}
-
-.image
-{
-        text-align: center;
-}
-
-.dotgraph
-{
-        text-align: center;
-}
-
-.mscgraph
-{
-        text-align: center;
-}
-
-.caption
-{
-       font-weight: bold;
-}
-
-div.zoom
-{
-       border: 1px solid #90A5CE;
-}
-
-dl.citelist {
-        margin-bottom:50px;
-}
-
-dl.citelist dt {
-        color:#334975;
-        float:left;
-        font-weight:bold;
-        margin-right:10px;
-        padding:5px;
-}
-
-dl.citelist dd {
-        margin:2px 0;
-        padding:5px 0;
-}
-
-div.toc {
-        padding: 14px 25px;
-        background-color: #F4F6FA;
-        border: 1px solid #D8DFEE;
-        border-radius: 7px 7px 7px 7px;
-        float: right;
-        height: auto;
-        margin: 0 20px 10px 10px;
-        width: 200px;
-}
-
-div.toc li {
-        background: url("bdwn.png") no-repeat scroll 0 5px transparent;
-        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
-        margin-top: 5px;
-        padding-left: 10px;
-        padding-top: 2px;
-}
-
-div.toc h3 {
-        font: bold 12px/1.2 Arial,FreeSans,sans-serif;
-       color: #4665A2;
-        border-bottom: 0 none;
-        margin: 0;
-}
-
-div.toc ul {
-        list-style: none outside none;
-        border: medium none;
-        padding: 0px;
-}       
-
-div.toc li.level1 {
-        margin-left: 0px;
-}
-
-div.toc li.level2 {
-        margin-left: 15px;
-}
-
-div.toc li.level3 {
-        margin-left: 30px;
-}
-
-div.toc li.level4 {
-        margin-left: 45px;
-}
-
-.inherit_header {
-        font-weight: bold;
-        color: gray;
-        cursor: pointer;
-       -webkit-touch-callout: none;
-       -webkit-user-select: none;
-       -khtml-user-select: none;
-       -moz-user-select: none;
-       -ms-user-select: none;
-       user-select: none;
-}
-
-.inherit_header td {
-        padding: 6px 0px 2px 5px;
-}
-
-.inherit {
-        display: none;
-}
-
-tr.heading h2 {
-        margin-top: 12px;
-        margin-bottom: 4px;
-}
-
-@media print
-{
-  #top { display: none; }
-  #side-nav { display: none; }
-  #nav-path { display: none; }
-  body { overflow:visible; }
-  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
-  .summary { display: none; }
-  .memitem { page-break-inside: avoid; }
-  #doc-content
-  {
-    margin-left:0 !important;
-    height:auto !important;
-    width:auto !important;
-    overflow:inherit;
-    display:inline;
-  }
-}
-
similarity index 93%
rename from doc/FAQ.doc
rename to doc/doxygen/FAQ.doc
index c2b2d89..4c2e737 100644 (file)
@@ -1,5 +1,6 @@
 /*! \page FAQ Frequently Asked Questions
 
+@tableofcontents
 
 \section faq_simgrid I'm new to SimGrid. I have some questions. Where should I start?
 
@@ -462,10 +463,68 @@ note that although sound, this model were never scientifically
 assessed. Please keep this fact in mind when using it.
 
 
-
+\subsubsection faq_platform_random Using random variable for the resource power or availability
+
+The best way to model the resouce power using a random variable is to
+use an availability trace that is directed by a probability
+distribution. This can be done using the function
+tmgr_trace_generator_value() below. The date and value generators is
+created with one of tmgr_event_generator_new_uniform(),
+tmgr_event_generator_new_exponential() or
+tmgr_event_generator_new_weibull() (if you need other generators,
+adding them to src/surf/trace_mgr.c should be quite trivial and your
+patch will be welcomed). Once your trace is created, you have to
+connect it to the resource with the function
+sg_platf_new_trace_connect().
+
+That the process is very similar if you want to model the
+resource availability with a random variable (deciding whether it's
+on/off instead of deciding its speed) using the function
+tmgr_trace_generator_state() or tmgr_trace_generator_avail_unavail()
+instead of tmgr_trace_generator_value().
+
+Unfortunately, all this is currently lacking a proper documentation,
+and there is even no proper example of use. You'll thus have to check
+the header file include/simgrid/platf.h and experiment a bit by
+yourself. The following code should be a good starting point, and
+contributing a little clean example would be a good way to help the
+SimGrid project.
+
+@code
+tmgr_trace_generator_value("mytrace",tmgr_event_generator_new_exponential(.5)
+                                     tmgr_event_generator_new_uniform(100000,9999999));
+                                    
+sg_platf_trace_connect_cbarg_t myconnect = SG_PLATF_TRACE_CONNECT_INITIALIZER;
+myconnect.kind = SURF_TRACE_CONNECT_KIND_BANDWIDTH;
+myconnect.trace = "mytrace";
+myconnect.element = "mylink";
+
+sg_platf_trace_connect(myconnect);
+@endcode
 
 \section faq_troubleshooting Troubleshooting
 
+\subsection faq_trouble_changelog The feature X stopped to work after my last update 
+
+I guess that you want to read the ChangeLog file, that always contains
+all the information that could be important to the users during the
+upgrade. Actually, you may want to read it (alongside with the NEWS
+file that highlights the most important changes) even before you
+upgrade your copy of SimGrid, too.
+
+Backward compatibility is very important to us, as we want to provide
+a scientific tool allowing to evaluate the code you write in several
+years, too. That being said, we sometimes change the interface to make
+them more usable to the users. When we do so, we always keep the old
+interface as DEPRECATED. If you still want to use them, you want to
+define the SIMGRID_DEPRECATED preprocessor symbol before loading the
+SimGrid files:
+
+@verbatim
+#define SIMGRID_DEPRECATED
+#include <msg/msg.h>
+@endverbatim
+
 \subsection faq_trouble_lib_compil SimGrid compilation and installation problems
 
 \subsubsection faq_trouble_lib_config cmake fails!
diff --git a/doc/doxygen/advanced.doc b/doc/doxygen/advanced.doc
new file mode 100644 (file)
index 0000000..614110f
--- /dev/null
@@ -0,0 +1,14 @@
+/*! @page advanced  Advanced Topics 
+
+This page does not exist yet. Writing an acceptable user documentation
+is already difficult, but writing a good documentation for advanced
+users is near to impossible. In the meanwhile, please refer to the
+tutorials on the project web page, looking for the "SimGrid::Internals"
+tutorials.
+
+- @subpage bindings
+- @subpage pls
+- @subpage internals
+- @subpage contributing
+
+*/
\ No newline at end of file
diff --git a/doc/doxygen/contributing.doc b/doc/doxygen/contributing.doc
new file mode 100644 (file)
index 0000000..477bc6e
--- /dev/null
@@ -0,0 +1,106 @@
+/*! @page contributing Contributing to SimGrid
+
+@tableofcontents
+
+We are sometimes asked by users how to give back to the project. Here
+are some ideas, but if you have new ones, feel free.
+
+@section contributing_spread Spread the word
+
+There is many ways to help the SimGrid project. The first and most
+natural one is to <b>use it for your research, and say so</b>. Cite
+the SimGrid framework in your paper and discuss of its advantages with
+your colleagues to spread the word. When we ask for new fundings to
+sustain the project, the amount of publications enabled by SimGrid is
+always the first question that we get. The more you use the framework,
+the better for us. 
+
+We use several systems to detect the scientific publications citing
+our work, so actually citing correctly the framework (see 
+<a href="http://simgrid.gforge.inria.fr/Publications.html">here</a>)
+should be enough to get us adding your paper to our list. But if you
+remark that your paper is missing on 
+<a href="http://simgrid.gforge.inria.fr/Publications-tool.html">our 
+page listing all papers using SimGrid</a>, please say so. Likewise, if
+your paper is badly cited, please drop us an email so that we can fix
+it.
+
+Also, <b>help us constituting an active and welcoming user
+community</b>. Get subscribed to the mailing lists, and answer the
+questions that newcommers have if you can. Point them (gentely ;) to
+the relevant part of the documentation on need, and help them becoming
+part of our community too. 
+
+Another easy way to help the project is to add a link to the
+<a href="http://simgrid.gforge.inria.fr">SimGrid homepage</a>
+on your homepage to <b>improve SimGrid's ranking in the search
+engines</b>. Internet visibility is a battle where you can make the
+difference. This can be done by adding the following html snipet to
+your page, that simply renders as <a href="http://simgrid.gforge.inria.fr/">Simgrid</a>.
+
+@verbatim
+<a href="http://simgrid.gforge.inria.fr/" 
+   title="Versatile simulation of distributed systems: Grid Simulator, P2P simulator, MPI simulator, Cloud Simulator or HPC Simulator">
+   Simgrid</a>
+@endverbatim
+
+Or you can prefer this version with a little logo (if you want to
+contribute another logo for that, please don't hesitate ;)
+<img src="http://simgrid.gforge.inria.fr/logos/SIMGRID_Logo_Thumbs_up.png"/>
+
+@verbatim
+<a href="http://simgrid.gforge.inria.fr/" 
+   title="Versatile simulation of distributed systems: Grid Simulator, P2P simulator, MPI simulator, Cloud Simulator or HPC Simulator">
+   <img src="http://simgrid.gforge.inria.fr/logos/SIMGRID_Logo_Thumbs_up.png"
+        alt="Versatile simulation of distributed systems: Grid Simulator, P2P simulator, MPI simulator, Cloud Simulator or HPC Simulator" align="center"> 
+</a>
+@endverbatim
+
+Finally, if you organize a scientific event where you expect many
+potential users, <b>invite us to give a tutorial on SimGrid</b>. We
+found that 45 minutes to one hour is sufficient. It allows to explain
+the main motivations and outcomes of the project in order to motivate
+the attendees get more information on SimGrid, and eventually improve
+their scientific habits by using a sound simulation framework. 
+<a href="http://webloria.loria.fr/~quinson/blog/2012/1120/Simgrid_at_Louvain/">Here</a>
+is an example of such a presentation.
+
+@section contributing_bugs Reporting (and fixing) any issue you find
+
+Because of its size and complexity, SimGrid is not perfect and
+contains a large amount of glitches and issues. When you find one,
+don't assume that it's here because we don't care. It survived only
+because nobody told us. We unfortunately cannot endlessly review our
+large code and documentation base. So please, <b>report any issue you
+find to us</b>, be it a typo in the documentation, a paragraph that
+needs to be reworded, a bug in the code or any other problem. The best
+way to do so is to open a bug on our 
+<a href="https://gforge.inria.fr/tracker/?atid=165&group_id=12&func=browse">Bug
+Tracking System</a> so that we don't forget about it (we have other
+obligations too and are sometimes unable to fix bugs right away, no
+matter how easy the fix it). The worst way to report such issue is to
+go through private emails. These are unreliable, and we are trying to
+develop SimGrid openly, so private discussions are to be avoided if
+possible. 
+
+If you can provide a patch fixing the issue you report, that's even
+better, and often ensures that it will get fixed very soon.
+
+Of course, a very good way to give back to the SimGrid community is to
+<b>triage and fix the bugs in the BTS</b>. If you
+can come up with a patch fixing them, we will be more than happy to
+apply your changes so that the entier community enjoys them.
+
+@section contributing_contrib Contributing features and associated tools
+
+If you deeply miss a feature in the framework, you should consider
+implementing it yourself. That's free software, meaning that you are
+free to help yourself. Of course, we'll do our best to assist you in
+this task, so don't hesitate to contact us with your idea.
+
+If you develop an independent tool that is somehow associated to
+SimGrid, we'd love helping you gaining visibility by listing it on our 
+<a href="http://simgrid.gforge.inria.fr/contrib.html">Contrib
+section</a>. 
+
+*/
\ No newline at end of file
diff --git a/doc/doxygen/getting_started.doc b/doc/doxygen/getting_started.doc
new file mode 100644 (file)
index 0000000..e071f7f
--- /dev/null
@@ -0,0 +1,9 @@
+/*! @page getting_started SimGrid in 30mn
+
+This page does not exist yet. In the meanwhile, please refer to the
+<a href="http://simgrid.gforge.inria.fr/tutorials.html">tutorials</a>
+on the project web page, looking for the 
+<a href="http://simgrid.gforge.inria.fr/tutorials/101/simgrid-use-101.pdf">SimGrid
+User 101</a> tutorial.
+
+*/
\ No newline at end of file
similarity index 81%
rename from doc/ref_guide/doxygen/header.html
rename to doc/doxygen/header.html
index 127f41d..00e49a8 100644 (file)
@@ -49,14 +49,10 @@ $mathjax
 
 <div id="navrow1" class="tabs">
     <ul class="tablist">
-      <li><a href="../../doc/index.html"><span>Home</span></a></li>
-      <li class="current"><a href="index.html"><span>Reference&nbsp;Manual</span></a></li>
-      <li><a href="../../user_guide/html/index.html"><span>User&nbsp;Guide</span></a></li>
-      <li><a href="../../dev_guide/html/index.html"><span>Developer&nbsp;Guide</span></a></li>
+      <li><a href="http://simgrid.gforge.inria.fr/"><span>Home page</span></a></li>
       <li><a href="http://simgrid.gforge.inria.fr/tutorials.html"><span>Tutorials</span></a></li>
-      <li><a href="https://gforge.inria.fr/projects/simgrid"><span>Forge</span></a></li>
-      <li><a href="http://simgrid.gforge.inria.fr/"><span>Website</span></a></li>
+      <li><a href="https://gforge.inria.fr/projects/simgrid"><span>Dev's Corner</span></a></li>
       <li>$searchbox</li>
     </ul>
-  </div>
+  </div> 
 <!-- end header part -->
diff --git a/doc/doxygen/help.doc b/doc/doxygen/help.doc
new file mode 100644 (file)
index 0000000..dc21012
--- /dev/null
@@ -0,0 +1,23 @@
+/*! @page help Getting help
+
+If you are new to the SimGrid framework, you should first strive at
+reading the current documentation and studying the provided examples.
+But if a question remains, don't hesitate to ask to the community. You
+have several ways of doing so:
+
+ - Ask your question to the
+   <a href="mailto:simgrid-user@lists.gforge.inria.fr">User Mailing list</a>
+ - Asking your quetion on Stack Overflow is also a good idea, as this
+   site is very well indexed. We answer questions there too (don't
+   forget to use the SimGrid tag in your question so that we can see
+   it), and they remain usable for the next users.
+ - If your question is about the internals and not about using
+   SimGrid, you may prefer to send your question to the 
+   <a href="mailto:simgrid-devel@lists.gforge.inria.fr">Developers Mailing list</a>
+ - Join us on IRC and ask your question directly on the chanel \#simgrid at
+   irc.debian.org. Be warned that even if many people are connected to
+   the chanel, they may be doing some useful stuff instead of lurking
+   on IRC. So don't be surprised if you don't get an answer in the
+   second, and turn to the mailing lists if nobody seems to be there.
+
+*/
\ No newline at end of file
diff --git a/doc/doxygen/index-API.doc b/doc/doxygen/index-API.doc
new file mode 100644 (file)
index 0000000..aa50773
--- /dev/null
@@ -0,0 +1,13 @@
+This file was generated by tools/doxygen/index_create.pl. DO NOT EDIT.
+
+/** \defgroup API_index Full Index
+  * \brief The alphabetical list of all functions, macros and types 
+  *  defined by SimGrid
+  *
+  * List of all functions, variables, defines, enums, and typedefs with
+  * links to the files they belong to. 
+  *
+  * \htmlonly Altough completely useless, the complete list of structures defined can be found <a href="annotated.html">here</a> \endhtmlonly
+
+
+*/
\ No newline at end of file
diff --git a/doc/doxygen/index.doc b/doc/doxygen/index.doc
new file mode 100644 (file)
index 0000000..2c4802d
--- /dev/null
@@ -0,0 +1,42 @@
+/*!  
+@mainpage SimGrid Documentation
+
+@image html simgrid_logo_2011.png  "Versatile Simulation of Distributed Systems, for Grids, Clouds, P2P and HPC systems"
+@image latex simgrid_logo_2011.png "Versatile Simulation of Distributed Systems, for Grids, Clouds, P2P and HPC systems"
+
+@htmlonly
+<br/><br/><br/>
+<table border=0>
+<tr><td width="50%">
+@endhtmlonly
+
+- @subpage getting_started
+- @subpage introduction
+- @subpage install
+- @subpage use
+  - @ref platform
+  - @ref deployment
+  - @ref tracing
+  - @ref options
+  - @ref help
+- @subpage advanced
+  - @ref bindings
+  - @ref pls
+  - @ref contributing
+  - @ref internals
+- @subpage FAQ
+
+@htmlonly
+</td><td width="50%" align="center">
+@endhtmlonly
+
+\htmlinclude simgrid_modules.map
+<br><b>SimGrid Components (click to jump to API)</b>
+
+@htmlonly
+</td></tr></table>
+@endhtmlonly
+
+*/
+
+
similarity index 84%
rename from doc/dev_guide/doxygen/xps.doc
rename to doc/doxygen/inside_autotests.doc
index 46061d2..0d5a7c1 100644 (file)
@@ -1,17 +1,17 @@
 /*! 
-\page xps SimGrid Developer Guide - XPs
+\page inside_autotests Automatic Testing Infrastructure
 
 \section xps_dev_guide_pipol How to run test in pipol?
 
 In order to use PIPOL you have to create your account here: http://pipol.inria.fr/
 
-\subsection xps_dev_guide_pipol_general What is PIPOL?
+\subsection inside_autotests_dev_guide_pipol_general What is PIPOL?
 
 The PIPOL platform is a porting, testing and compilation cluster. It hosts several hardware and software
 architectures to perform its work. An user can reserve a resource (a specific hardware, an operating system...)
 to be used interactively or automatically (with a "Nightly Builds" system) for software testing.
 
-\subsection xps_dev_guide_pipol_frontend From PIPOL frontend
+\subsection inside_autotests_dev_guide_pipol_frontend From PIPOL frontend
 
 You first need to be connected into pipol ssh.
 \verbatim
@@ -121,7 +121,7 @@ user@pipol:~$ssh pipol20
 
 You can now make all your tests.
 
-\subsection xps_dev_guide_pipol_home From a computer
+\subsection inside_autotests_dev_guide_pipol_home From a computer
 
 You have to renseign to simgrid configuration your pipol login.
 \verbatim
@@ -146,10 +146,10 @@ You can also see all available images from pipol
 $ make pipol_test_list_images
 \endverbatim
 
-\section xps_dev_guide_pipol_nightly How to use nightly builds?
+\section inside_autotests_dev_guide_pipol_nightly How to use nightly builds?
 
 All the pipol scripts are located in \"<project/directory>/buildtools/pipol/\".
-If you modifie them you have to update the pipol home directory by using this command: make sync-pipl.
+If you modify them you have to update the pipol home directory by using this command: make sync-pipol.
 
 It will copy those files:
 \verbatim
@@ -164,7 +164,7 @@ Nightly_simgrid.sh                              100% 4004     3.9KB/s   00:00
 Experimental_bindings.sh                        100% 1794     1.8KB/s   00:00
 \endverbatim 
 
-\section xps_dev_guide_cdash How to report tests in cdash?
+\section inside_autotests_dev_guide_cdash How to report tests in cdash?
 
 Reporting experiment in cdash is very easy because it is done by ctest.
 
@@ -193,9 +193,14 @@ $ ctest -D ExperimentalCoverage
 $ ctest -D ExperimentalSubmit
 \endverbatim
 
-\section xps_dev_guide_g5k How to run simgrid scalability xps?
+\section inside_autotests_perf Infrastructure of the SimGrid Performance Regresion tests
 
-\subsection xps_dev_guide_g5k_campaign How to execute g5k campaign?
+The goal of these tests is to detect the impact on simulation
+performance of the commited changes. It is not quite effective right
+now but at the end, it should be similar to 
+<a href="http://www.phoromatic.com/resources/long-term-study/">Phoromatic</a>.
+
+\subsection inside_autotests_dev_guide_g5k_campaign How to execute g5k campaign?
 
 Quick steps deployment for rennes:
 
@@ -217,7 +222,15 @@ $  chmod 0600 ~/.restfully/api.grid5000.fr.yml
 
 \li 5/ Git clone the SimGrid Scalability project
 \verbatim
-$  git clone git://scm.gforge.inria.fr/simgrid/simgrid-scalability-XPs.git
+$  git clone git@github.com:mquinson/simgrid-scalability-XPs.git
+\endverbatim
+An alternative URL is
+git://scm.gforge.inria.fr/simgrid/simgrid-scalability-XPs.git, but the
+repository on github is believed to be more uptodate. You may want to
+double-check by pulling both:
+\verbatim
+$ git remote add g5k git://scm.gforge.inria.fr/simgrid/simgrid-scalability-XPs.git
+$ git pull g5k master
 \endverbatim
 
 \li 6/ Copy the run script into your home
@@ -251,7 +264,7 @@ $  perl SGXP.pl --help
 $  ./SGXP.pl --site=nancy --cluster=graphene --test=chord,goal --rev="09bbc8de,3ca7b9a13"
 \endverbatim
 
-\subsection xps_dev_guide_g5k_log How to analyze logs?
+\subsection inside_autotests_dev_guide_g5k_log How to analyze logs?
 
 To analyze log from g5k-campaign you must install R tool.
 
diff --git a/doc/doxygen/inside_cmake.doc b/doc/doxygen/inside_cmake.doc
new file mode 100644 (file)
index 0000000..64071bd
--- /dev/null
@@ -0,0 +1,256 @@
+/*! 
+@page inside_cmake Modifying the cmake files
+
+\tableofcontents
+
+\section inside_cmake_intro Generalities on Cmake
+
+\subsection inside_cmake_what 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>.
+
+\subsection inside_cmake_why Why cmake?
+
+CMake permits to developers to compile projects on different
+platforms. Then many tools are embedded like ctest for making test, a
+link to cdash for vizualise results but also test coverage and bug
+reports.
+
+\section inside_cmake_addsrc How to add source files?
+
+If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake.
+Chose the section you are interested in and modify it.
+
+\verbatim
+set(SMPI_SRC
+  src/smpi/smpi_base.c
+  src/smpi/smpi_bench.c
+  src/smpi/smpi_c99.c
+  src/smpi/smpi_coll.c
+  src/smpi/smpi_comm.c
+  src/smpi/smpi_global.c
+  src/smpi/smpi_group.c
+  src/smpi/smpi_mpi.c
+  src/smpi/smpi_mpi_dt.c
+  src/smpi/smpi_pmpi.c
+  src/smpi/smpi_replay.c
+  )
+\endverbatim
+
+If your source is always added to the library, you are set. But if
+it's optional, you must ensure that it gets added to the source
+distribution when not compiled in, or it may well be missing if the
+archive is built without the option activating your source. This is
+done by adding the files to the EXTRA_DIST list, as in the following
+example:
+
+\verbatim
+### If f2c is installed compiled source other-whise source is only copy in the dist 
+if(SMPI_F2C)
+  set(SMPI_SRC
+    ${SMPI_SRC}
+    src/smpi/smpi_f77.c
+    )
+else()
+  set(EXTRA_DIST
+    ${EXTRA_DIST}
+    src/smpi/smpi_f77.c
+  )
+endif()
+\endverbatim
+
+Don't forget to run the "make distcheck" target after any modification
+to the cmake files: it checks whether all necessary files are present
+in the distribution.
+
+\section cmake_dev_guide_ex How to add examples?
+
+First of all, are you sure that you want to create an example, or is
+it merely a new test case? The examples located in examples/ must be
+interesting to the users. It is expected that the users will take one
+of these examples and start editing it to make it fit their needs. If
+what you are about to write is merly a test, exercising a specific
+part of the tool suite but not really interesting to the users, then
+you want to add it to the teshsuite/ directory. 
+
+Actually, the examples are also used as regresion tests by adding tesh
+files and registering them to the testing infrastructure (for that,
+don't forget to add a tesh file and follow the instructions of 
+section \ref inside_cmake_addtest). The main difference is that
+examples must be interesting to the users in addition.
+
+In both cases, you have to create a CMakeList.txt in the chosen source
+directory. It must specify where to create the executable, the source
+list, dependencies and the name of the binary.
+
+\verbatim
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(Hello Hello.c)
+
+### Add definitions for compile
+target_link_libraries(Hello simgrid)
+
+### You have to put all new files in the apropriated section 
+### If they are not there, they can't be on the dist package. 
+set(tesh_files
+  ${tesh_files}
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/Hello.c
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  PARENT_SCOPE
+  )
+\endverbatim
+
+Then, you have to follow these steps:
+\li Add the following line to <project/directory>/buildtools/Cmake/MakeExeLib.cmake:
+\verbatim
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
+\endverbatim
+
+\li Add your CMakeLists.txt to CMAKE_SOURCE_FILES in <project/directory>/buildtools/Cmake/DefinePackages.cmake:
+\verbatim
+set(CMAKE_SOURCE_FILES
+  CMakeLists.txt
+  ....
+  <path_to_your_CMakeList.txt>
+  )
+\endverbatim
+
+\li if you add tesh files (and you should), please refer to the
+following section to register them to the testing infrastructure.
+
+Once you're done, you should check with "make distcheck" that you did
+not forget to add any file to the distributed archives.
+
+\section inside_cmake_addtest How to add tests?
+
+\subsection inside_cmake_addtest_unit Unit testing in SimGrid
+
+If you want to test a specific function or set of functions, you need
+a unit test. Edit
+<project/directory>/buildtools/Cmake/UnitTesting.cmake to add your
+source file to the TEST_CFILES list, and add the corresponding unit
+file to the TEST_UNITS list. For example, if your file is toto.c,
+your unit file will be toto_unit.c. The full path to your file must be
+provided, but the unit file will always be in src/ directly.
+
+Then, you want to actually add your tests in the source file. All the
+tests must be protected by "#ifdef SIMGRID_TEST" so that they don't
+get included in the regular build. Then, you want to add a test suite
+that will contain a bunch of tests (in Junit, that would be a test
+unit) with the macro #XBT_TEST_SUITE, and populate it with a bunch of
+actual tests with the macro #XBT_TEST_UNIT (sorry for the mischosen
+names if you are used to junit). Just look at the dynar example (or
+any other) to see how it works in practice. Do not hesitate to stress
+test your code this way, but make sure that it runs reasonably fast,
+or nobody will run "ctest" before commiting code.
+
+If you are interested in the mechanic turning this into an actual
+test, check the <project/directory>/tools/sg_unit_extractor.pl script.
+
+To actually run your tests once you're done, run "make testall", that
+builds the binary containing all our unit tests and run it. This
+binary allows you to chose which suite you want to test:
+
+\verbatim
+$ testall --help # revise how it goes if you forgot
+$ testall --dump-only # learn about all existing test suites
+$ testall --tests=-all # run no test at all
+$ testall --tests=-all,+foo # run only the foo test suite.
+$ testall --tests=-all,+foo:bar # run only the bar test from the foo suite.
+$ testall --tests=-foo:bar # run all tests but the bar test from the foo suite.
+\endverbatim
+
+\subsection inside_cmake_addtest_integration Integration testing in SimGrid
+
+If you want to test a full binary (such as an example), then you
+probably want to use the tesh binary that ensures that the output
+produced by a command perfectly matches the expected output. In
+particular, this is very precious to ensure that no change modifies
+the timings computed by the models without notice. 
+
+The first step is to write a tesh file for your test, containing the
+command to run, the provided input (if any, but almost no SimGrid test
+provide such an input) and the expected output. Check the tesh man
+page for more details. 
+
+Tesh is sometimes annoying as you have to ensure that the expected
+output will always be exactly the same. In particular, your should not
+output machine dependent informations, nor memory adresses as they
+would change on each run. Several steps can be used here, such as the
+obfucation of the memory adresses unless the verbose logs are
+displayed (using the #XBT_LOG_ISENABLED() macro), or the modification
+of the log formats to hide the timings when they depend on the host
+machine.
+
+Then you have to request cmake to run your test when "ctest" is
+launched. For that, you have to modify source
+<project/directory>/buildtools/Cmake/AddTests.cmake. Make sure to pick
+a wise name for your test. It is often useful to check a category of
+tests together. The only way to do so in ctest is to use the -R
+argument that specifies a regular expression that the test names must
+match. For example, you can run all MSG test with "ctest -R msg" That
+explains the importance of the test names.
+
+Once the name is chosen, create a new test by adding a line similar to
+the following (assuming that you use tesh as expected).
+
+\verbatim
+#  ADD_TEST(test-name ${CMAKE_BINARY_DIR}/bin/tesh <options> <tesh-file>)
+#  option --setenv bindir set the directory containing the binary
+#         --setenv srcdir set the directory containing the source file
+#         --cd set the working directory
+ADD_TEST(my-test-name ${CMAKE_BINARY_DIR}/bin/tesh 
+         --setenv bindir=${CMAKE_BINARY_DIR}/examples/my-test/
+         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/my-test/
+         --cd ${CMAKE_HOME_DIRECTORY}/examples/my-test/
+         ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh
+)
+\endverbatim             
+
+If you prefer to not use tesh for some reasons, prefer the following
+form:
+
+\verbatim
+# ADD_TEST(NAME <name>]
+#          [WORKING_DIRECTORY dir]
+#          COMMAND <command> [arg1 [arg2 ...]])
+ADD_TEST(NAME my-test-name 
+         WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}/examples/my-test/
+         COMMAND Hello
+)
+\endverbatim 
+
+As usual, you must run "make distcheck" after modifying the cmake files,
+to ensure that you did not forget any files in the distributed archive.
+
+\subsection inside_cmake_addtest_perf Performance testing in SimGrid
+
+We are currently in the process of adding an infrastructure for
+performance regression testing, but this is not related to cmake
+anyhow. They are thus documented elsewhere, in Section \ref
+inside_autotests_perf
+
+*/
diff --git a/doc/doxygen/inside_doxygen.doc b/doc/doxygen/inside_doxygen.doc
new file mode 100644 (file)
index 0000000..a120f17
--- /dev/null
@@ -0,0 +1,227 @@
+/*! 
+@page inside_doxygen Documenting SimGrid
+
+\tableofcontents
+
+We use doxygen for our documentation. This tool is sometimes anoying
+but that's the best we've found so far. Remember, we all bitch about
+doxygen, but at the end of the day, it kinda delivers what we need. So
+stop bitching about the doc or the tools, and start improving the
+documentation text itself.
+
+Good documentation is rare and there is not much project of which we
+can get inspiration. The best exception I know is TikZ and
+latex-beamer. I'd be so happy if SimGrid documentation could follow
+the organisation (and reach half the quality) of the TikZ one. But
+anyway. As they say: Documentation is like sex; when it's not good
+it's still better than nothing and when it's good it's very very good.
+
+\section inside_doxygen_module Adding a new module to the reference guide
+
+If you add a new file to the project, you want to document it. It's
+more urgent if it's user-visible, but it should be done in any case if
+possible.
+
+\subsection inside_doxygen_module_create Declaring the module to doxygen
+
+First declare your sub-module in the corresponding
+(project)/doc/doxygen/module-(englobingmodule).doc Two edits are
+needed in this file: 
+
+@li Most of the englobing modules (xbt, msg, sd, etc) have a manually
+    maintained table of contents as content of the module main page,
+    at the top of the corresponding file. You want to add a reference to
+    your submodule there. For that, simply add something like the
+    following. The dash (-) will help building item lists. The ref
+    command requests for a link to your module, that is identified
+    with the word after that (here, I used xbt_cunit as a submodule
+    identifier.
+@verbatim
+ - @ref XBT_cunit
+@endverbatim
+
+@li Create your module below in the file as follows. the first world
+after the defgroup keyword must be the submodule identifier you used
+above.
+@verbatim
+     /** @defgroup XBT_cunit Unit testing support */
+@endverbatim
+Warning, the location of this block decides where it appears in the
+documentation. In particular, the order of the defgroups is not
+inocuitous at all.
+
+\subsection inside_doxygen_module_populate Adding symbols to your module
+
+Once your group is created and referenced from the group containing
+it, you must populate it. For that, edit the corresponding header file
+to add something like this near the top.
+@verbatim
+/** @addtogroup XBT_cunit
+  * @brief <write here a one-line description of your module>
+  *
+  * <Write here an introduction to your module>
+  * 
+  * @{
+  */
+  
+<all the C declarations of your module>
+
+/** @} */
+@endverbatim
+
+Any informative stuff is welcomed in the module introduction, on top.
+This includes examples that the users can copy/paste to fit their
+needs. If your module is too large to be nicely documented on one
+unique page, you may want to split its documentation in submodules.
+See dynar.h for an example of how to do so. 
+
+Make sure to only include the public declarations of your module. For
+example, if you have black magic macro voodoo, you probably have some
+symbols that are there only for the compiler, but that the users
+should not see. In this case, do not put the symbols you want to hide
+between the @ { and @ } markers.
+
+\subsection inside_doxygen_module_document Documenting the symbols of your module
+
+Finally, you naturally need to actually write the documentation of
+each public symbol belonging to your module. Macros must naturally be
+documented in the header file, but it is prefered to put the
+documentation in the source file, alongside with the actual
+implementation. It is expected that when the code changes, the chances
+to update the doc accordingly are higher if the documentation is near
+to the code.
+
+For each symbol, you must provide a one-line description in the
+<i>brief</i> doxygen parameter. Please document any non trivial
+parameter (but something like "dynar: the provided dynar" is not
+considered as an informative documentation and can be omitted), and
+give any information you feel useful to the user. In particular, add
+links to any other location of the documentation that could provide
+interesting additional informations.
+
+\section inside_doxygen_page Adding a new page to the user guide
+
+Note that doxygen provides two hierarchies that cannot be intermixed.
+Groups are used to build a reference guide while pages are used for
+any other kind of page in the documentation. A module cannot contain
+any page, while a page cannot contain any module. That's the doxygen
+style.
+
+\subsection inside_doxygen_page_write Writing a new documentation page
+
+The first thing to do to add a new page is to actually write a file
+containing the information you want to add. It should be located in
+(project)/doc/doxygen and be named (something).doc Its content must be
+something like the following:
+
+@verbatim
+/** @page <short_name> <title>
+
+@tableofcontents
+
+blabla bla
+
+@section <short_name_of_section> <title>
+
+bliblublo
+
+@subsection <short_name_of_subsection> <title>
+
+Even more stuff. Because we love documentation. We all do.
+
+*/
+@endverbatim
+
+Don't forget the starting and ending comment signs. Doxygen only takes
+documentation that is in comments, even if there is nothing else in
+the file. 
+
+Any short names must be uniq as they are used for the <i>ref</i>
+commands to build references between parts.
+
+Titles should be chosed wisely, as they are used (1) as section
+headers (2) in the table of contents (3) as text of references, unless
+people building a reference specify a replacement text as in:
+@verbatim
+@ref shortname "text to use instead of the title"
+@endverbatim
+
+\subsection inside_doxygen_page_doxy Registering a documentation page to doxygen
+
+Edit (project)/doc/Doxyfile.in and add your page to the INPUT
+variable. Don't edit the Doxyfile directly, as it is generated
+automatically from the Doxyfile.in: your changes would be overwritten.
+
+Also, edit the source file of the page that will englob the newly page
+(to add a new page at root level, edit index.doc that declares the
+root), and add something like the following. 
+
+@verbatim
+@subpage <shortname>
+@endverbatim
+
+This allows doxygen to understand about the page hierarchy that you
+want to build. It also puts the name of the subpage as a ref would do.
+That is why every page in our documentation seem to contain a table of
+contents of sub pages even if it dupplicates what's on the left.
+That's the doxygen style (but I can live with it).
+
+\subsection inside_doxygen_page_cmake Registering a documentation page to cmake
+
+Ahhh, cmake and doxygen. The perfect combo to bitch about life for a
+whole day...
+
+Edit (project)/buildtools/Cmake/DefinePackage.cmake, and add your
+newly added page to the DOC_SOURCES. And bitch about these damn tools.
+
+Don't forget to commit your page, so that you can get some git fun to
+complete your day.
+
+\section inside_doxygen_image Adding an image to the documentation
+
+If you need to run a command (like fig2dev) to generate your image,
+edit buildtools/Cmake/GenerateDoc.cmake and add your command to the
+simgrid_documentation target (grep for fig2dev in the file to see
+where exactly). Don't forget to add the source of your image to the
+archive somehow. You can add it to the list DOC_FIG of
+buildtools/Cmake/DefinePackage.cmake.
+
+If your image is ready to use, put your png in doc/webcruft, and
+register it to cmake by adding it to the DOC_IMG list of file
+buildtools/Cmake/DefinePackage.cmake so that it lands in the archive
+distribution. It will also be copied automatically to the documentation.
+
+\section inside_doxygen_website Working on the website
+
+Actually, the website is very different from doxygen. It uses a tool
+called jekyll to turn markup-formated text into nice static web pages.
+Jekyll is less annoying than doxygen since it's written in a scripting
+language: you can dynamically add (or change) parts of the tool to
+make it fit your needs. Get the sources, and start improving the
+website now (there is a README in the repo with more details).
+
+@verbatim
+git clone git://scm.gforge.inria.fr/simgrid/website.git
+@endverbatim
+
+\section inside_doxygen_regen Regenerating the documentation
+
+Once you've changed the doc, you want to run doxygen to regenerate the
+html output (and maybe the pdf too). Here is how to do this:
+
+@verbatim
+make simgrid_documentation # html documentation
+make pdf # the result is in doc/latex/simgrid_documentation.pdf
+@endverbatim
+
+Once you're satisfyied with the result, refreshing the documentation
+on the web pages is very easy, as shown below. A few permission errors
+are ok, unfortunately. We should improve things here, but I'm not sure
+of how. A funny thing is that this make target is also provided in the
+archives we distribute to the users, but I guess that it's harmless :)
+
+@verbatim
+make sync-gforge-doc
+@endverbatim
+
+*/
similarity index 98%
rename from doc/dev_guide/doxygen/simgrid.doc
rename to doc/doxygen/inside_extending.doc
index adb6cf3..6332d50 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-\page simgrid SimGrid Developer Guide - SimGrid
+\page inside_extending Extending SimGrid 
 
 We start to put TAGS in simgrid source code for having tutorials to see where is the important parts ans steps to create:
 \li a new MSG functions or a new API.
similarity index 70%
rename from doc/dev_guide/doxygen/release.doc
rename to doc/doxygen/inside_release.doc
index f228061..286f9f5 100644 (file)
@@ -1,9 +1,9 @@
 /*! 
-\page release SimGrid Developer Guide - Releasing
+\page inside_release SimGrid Developer Guide - Releasing
 
-\section release_c Releasing the main library
+\section inside_release_c Releasing the main library
 
-\subsection release_c_preconditions Before releasing
+\subsection inside_release_c_preconditions Before releasing
 
 Please apply the following checklist before releasing.
 
@@ -14,6 +14,10 @@ Please apply the following checklist before releasing.
     version numbers that were used.
   - The" make distcheck" target works (testing that every files needed
     to build and install are included in the archive)
+  - The version number provided to download in the examples of
+    doc/doxygen/install.doc is accurate (we should maybe generate this
+    file to avoid issues, but some inaccuracies are less painful than
+    editing the cmake files to make this happen, sorry).
 - Tests
   - All tests pass on a reasonable amount of platforms (typically,
     everything on cdash)
@@ -29,19 +33,19 @@ Please apply the following checklist before releasing.
   - The release date is indicated right below the version name
   - The release dub name matches the one given in ChangeLog file
 
-\subsection release_c_source Building the source archive
+\subsection inside_release_c_source Building the source archive
 
 First, clean up your git repository. Some files are included through
 globbing, you must ensure that your tree contains no cruft. You can
 either checkout a new tree or remove anything from your current tree:
 \verbatim
 $ cd simgrid
-$ git reset --hard master
-$ git clean -dfx
+$ git reset --hard master # warning, it will kill your uncommited changes
+$ git clean -dfx          # warning, it will kill your uncommited changes
 \endverbatim
 
 You can then build the archive. This gives you your archive in the
-build dir, named 'SimGrid-${release_version}.tar.gz'.
+build dir, named 'SimGrid-${inside_release_version}.tar.gz'.
 
 \verbatim
 $ mkdir build
@@ -50,7 +54,7 @@ $ cmake ..
 $ make dist
 \endverbatim
 
-\subsection release_c_win32 Binary distribution under Win32
+\subsection inside_release_c_win32 Binary distribution under Win32
 
 You have to install nsis tool first. Download it 
 <a href="http://nsis.sourceforge.net/Download">here</a>.
@@ -67,11 +71,13 @@ $ cmake ..
 $ make nsis
 \endverbatim
 
-\subsection release_c_postchecks Check list after releasing
+\subsection inside_release_c_postchecks Check list after releasing
 
 - Tag the git repository (don't forget to push the tags to the main
   repo)
 - Push the archive files on gforge
+- Rebuild and resynchronize the website so that the file gets visible
+  from our download page (see @ref inside_doxygen_website).
 - Update the link ff-scm-v4-prod:/home/groups/simgrid/htdocs/simgrid/latest
 - Announce the release
  - Mail the simgrid-user mailing list
@@ -80,14 +86,14 @@ $ make nsis
  - Also mail some other lists (G5K users), with only the NEWS chunk
    and the link to the download section
 
-\section release_bindings Releasing the bindings
+\section inside_release_bindings Releasing the bindings
 
 Please apply the above checklists before and after releasing the bindings.
 
 Then, clean your git repository and build the archive. It will give
 you an archive file in the build dir:
-'SimGrid-Java-${release_version}.tar.gz' or
-'SimGrid-Ruby-${release_version}.tar.gz'. 
+'SimGrid-Java-${inside_release_version}.tar.gz' or
+'SimGrid-Ruby-${inside_release_version}.tar.gz'. 
 
 \verbatim
 $ cd simgrid-java (or simgrid-ruby)
diff --git a/doc/doxygen/install.doc b/doc/doxygen/install.doc
new file mode 100644 (file)
index 0000000..380f3c7
--- /dev/null
@@ -0,0 +1,490 @@
+/*! 
+@page install Installing Simgrid
+
+@tableofcontents
+
+The easiest way to install SimGrid is to go for a binary package.
+Under Debian or Ubuntu, this is very easy as SimGrid is directly
+integrated to the official repositories. Under Windows, SimGrid can be
+installed in a few clicks once you downloaded the installer from
+gforge. If you just want to use Java, simply copy the jar file on your
+disk and you're set. 
+
+Recompiling an official archive is not much more complex, actually.
+SimGrid has very few dependencies and rely only on very standard
+tools. Recompiling the archive should be done in a few lines:
+
+@verbatim
+wget https://gforge.inria.fr/frs/download.php/28674/simgrid-3.8.1.tar.gz
+tar xf simgrid-3.8.1.tar.gz
+cd simgrid-3.8.1
+cmake -DCMAKE_INSTALL_PREFIX=/opt/simgrid .
+make
+make install
+@endverbatim
+
+If you want to stay on the blending edge, you should get the latest
+git version, and recompile it as you would do for an official archive.
+Depending on the files you change in the source tree, some extra
+tools may be needed.
+
+@section install_binary Installing a binary package 
+
+@subsection install_binary_linux Binary packages for linux
+
+Most of the developers use a Debian or Ubuntu system, and some of us
+happen to be Debian Maintainers, so the packages for these systems are
+well integrated with these systems and very uptodate. To install them,
+simply type:
+
+@verbatim
+apt-get install simgrid
+@endverbatim
+
+On other Linux variants, you probably want to go for a source install.
+Please contact us if you want to contribute the build scripts for your
+prefered distribution.
+
+@subsection install_binary_win Installation wizard for Windows
+
+Before starting the installation, make sure that you have the following dependencies:
+  @li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
+  @li MinGW <a href="http://sourceforge.net/projects/mingw/files/MinGW/">(download page)</a>
+  @li perl <a href="http://www.activestate.com/activeperl/downloads">(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.
+
+@image html win_install_01.png Step 1: Accept the license.
+@image html win_install_02.png Step 2: Select packets to install.
+@image html win_install_03.png Step 3: Choice where to install packets previously selected. Please don't use spaces in path.
+@image html win_install_04.png Step 4: Add CLASSPATH to environment variables.
+@image html win_install_05.png Step 5: Add PATH to environment variables.
+@image html win_install_06.png Step 6: Restart your computer to take in consideration environment variables.
+
+@subsection install_binary_java Using the binary jar file
+
+The easiest way to install the Java bindings of SimGrid is to grab the
+jar file from the 
+<a href="https://gforge.inria.fr/frs/?group_id=12">Download page</a>,
+and copy it in your classpath (typically, in the same directory than
+your source code). If you go for that version, there is no need to
+install the C library as it is bundled within the jar file. Actually,
+only a bunch of architectures are supported this way to keep the
+jarfile size under control and because we don't have access to every
+exotic architectures ourselves. 
+
+If the jarfile fails on you, complaining that your architecture is not
+supported, drop us an email: we may extend the jarfile for you, if we
+have access to your architecture to build SimGrid on it.
+
+@section install_src Installing from source
+
+@subsection install_src_deps Resolving the dependencies
+
+SimGrid only uses very standard tools: 
+  @li C compiler, C++ compiler, make and friends.
+  @li perl (but you may try to go without it) and libpcre (but we are
+      working on removing this dependency)
+  @li We use cmake to configure our compilation 
+      (<a href="http://www.cmake.org/cmake/resources/software.html">download page</a>).
+      You need cmake version 2.8 or higher. You may want to use ccmake
+      for a graphical interface over cmake. 
+
+On MacOSX, it is advised to use the clang compiler (version 3.0 or
+higher), from either MacPort or XCode. If you insist on using gcc on
+this system, you still need a recent version of this compiler, so you
+need an unofficial gcc47 from MacPort because the version provided by
+Apple is ways to ancient to suffice. See also @ref install_cmake_mac.
+
+On Windows, it is strongly advised to use the 
+<a href="http://sourceforge.net/projects/mingw/files/MinGW/">MinGW
+environment</a> to build SimGrid. Any other compilers are not tests
+(and thus probably broken). We usually use the 
+<a href="http://www.activestate.com/activeperl/downloads">activestate</a>
+version of Perl, and the 
+<a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">msys</a>
+version of git on this architecture, but YMMV. See also @ref install_cmake_win.
+
+@subsection install_src_fetch Retrieving the source
+
+If you just want to use SimGrid, you should probably grab the latest
+stable version available from the 
+<a href="https://gforge.inria.fr/frs/?group_id=12">download page</a>.
+We do our best to release soon and release often, but sometimes you
+need to install the developer version of SimGrid, directly from the
+git repository. Avoid the git version if you are not sure, as it may
+break on you, or even worse.
+
+@verbatim
+git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid
+@endverbatim
+
+@subsection install_src_config Configuring the build
+
+Note that compile-time options are very different from @ref options
+"run-time options".
+
+\subsubsection install_cmake_howto Setting compilation options
+
+The default configuration should be ok for most usages, but if you
+need to change something, there is several ways to do so. First, you
+can use environment variable. For example, you can change the used
+compilers by issuing these commands before launching cmake:
+
+@verbatim
+export CC=gcc-4.4 
+export CXX=g++-4.4
+@endverbatim
+
+Another way to do so is to use the -D argument of cmake as follows.
+Note that the terminating dot is mandatory (see @ref
+install_cmake_outsrc to understand its meaning).
+
+@verbatim
+cmake -DCC=clang -DCXX=clang++ .
+@endverbatim
+
+Finally, you can use a graphical interface such as ccmake to change
+these settings. Simply follow the instructions after starting the
+interface.
+
+@verbatim
+ccmake .
+@endverbatim
+
+\subsubsection install_cmake_list SimGrid compilation options
+
+In addition to the classical cmake configuration variables, SimGrid
+accepts several options, as listed below.
+
+  @li <b>CMAKE_INSTALL_PREFIX</b> (path): Where to install SimGrid 
+      (e.g. /usr/local or /opt).
+
+  @li <b>enable_compile_optimizations</b> (ON/OFF): request the
+      compiler to produce efficient code. You want to activate it,
+      unless you want to debug SimGrid itself (as efficient code may
+      be appear mangled to the debugers).
+
+  @li <b>enable_debug</b> (ON/OFF): disable this if simulation speed
+      really matters to you. All log messages of gravity debug or
+      below will be discarded at compilation time. Since there is
+      quite a bunch of such log messages in SimGrid itself, this can
+      reveal faster than discarding them at runtime as usually. But of
+      course, it is then impossible to get any debug message from
+      SimGrid if something goes wrong.
+
+  @li <b>enable_msg_deprecated</b> (ON/OFF): enable this option if
+      your code used a feature of Simgrid that was droped or modified
+      in recent releases of SimGrid. You should update your code if
+      possible, but with this option, SimGrid will try to emulate its
+      old behavior.
+
+  @li <b>enable_model-checking</b> (ON/OFF): Only enable this if you
+      actually plan to use the model-checking aspect of SimGrid. This
+      mode of execution is still under heavy work, but it should be
+      rather usable now. Be <b>warned</b> that this option will hinder
+      your simulation speed even if you simulate without activating
+      the model-checker. We are working on improving this situation.
+
+  @li <b>enable_supernovae</b> (ON/OFF): If you use an ancient
+      compiler (such as gcc prior to 4.6), you want to enable this
+      option to ensure that the whole SimGrid library is presented to
+      the compiler as a unique compilation unit to allow cross-units
+      optimizations. This is useless on modern compilers (and will
+      soon be droped).
+
+  @li <b>enable_compile_warnings</b> (ON/OFF): request the compiler to
+      issue error message whenever the source code is not perfectly
+      clean. If you develop SimGrid itself, you must activate it to
+      ensure the code quality, but as a user, that option will only
+      bring you issues.
+      
+  @li <b>enable_lib_static</b> (ON/OFF): enable this if you want to
+      compile the static library (but you should consider enjoying
+      this new century instead).
+      
+  @li <b>enable_maintainer_mode</b> (ON/OFF): you only need to set
+      this option if you modify very specific parts of SimGrid itself
+      (the XML parsers and other related elements). Adds an extra
+      dependency on flex and flexml.
+     
+  @li <b>enable_tracing</b> (ON/OFF): disable this if you have issues
+      with the tracing module. But this module is now very stable and
+      you really should try to enjoy this beauty.
+
+  @li <b>enable_smpi</b> (ON/OFF): disable this if you have issues
+      with the module allowing to run MPI code on top of SimGrid. This
+      module very stable, but if you really don't need it, you can
+      disable it.
+      
+  @li <b>enable_mallocators</b> (ON/OFF): disable this when tracking
+      memory issues within SimGrid, or the caching mechanism used
+      internally will fool the debugers.
+
+  @li <b>enable_jedule</b> (ON/OFF): enable this to get SimDag
+      producing traces that can then be vizualized with the Jedule
+      external tool.
+
+  @li <b>enable_lua</b> (ON/OFF): enable this if you want to enjoy the
+      lua bindings of SimGrid. Adds an extra dependency on lua library
+      and developper header files.
+
+
+  @li <b>enable_gtnets</b> (ON/OFF): whether you want to use gtnets.
+      See section @ref pls_simgrid_configuration_gtnets.
+  @li <b>gtnets_path</b> (path): GTNetS installation directory 
+      (eg /usr or /opt).
+  @li <b>enable_ns3</b> (ON/OFF): whether you want to use ns3.
+      See section @ref pls_simgrid_configuration_ns3.
+  @li <b>ns3_path</b> (path): NS3 installation directory (eg /usr or /opt).
+  @li <b>enable_latency_bound_tracking</b> (ON/OFF): enable it if you
+      want to be warned when communications are limited by round trip
+      time while doing packet-level simulation. 
+
+\subsubsection install_cmake_reset Resetting the compilation configuration
+
+If you need to empty the cache of values saved by cmake (either
+because you added a new library or because something seriously went
+wrong), you can simply delete the file CMakeCache.txt that is created
+at the root of the source tree. You may also want to edit this file
+directly in some circumstances.
+
+\subsubsection install_cmake_outsrc Compiling into a separate directory
+
+By default, the files produced during the compilation are placed in
+the source directory. As the compilation generates a lot of files, it
+is advised to to put them all in a separate directory. It is then
+easier to cleanup, and this allows to compile several configurations
+out of the same source tree. For that, simply enter the directory
+where you want the produced files to land, and invoke cmake (or
+ccmake) with the full path to the simgrid source as last argument.
+This approach is called "compilation out of source tree".
+
+@verbatim
+mkdir build
+cd build
+cmake [options] ..
+make
+@endverbatim
+
+\subsubsection install_cmake_win Cmake on Windows (with MinGW)
+
+Cmake can produce several kind of of makefiles. Under Windows, it has
+no way of determining what kind you want to use, so you have to hint it:
+
+@verbatim
+cmake -G"MinGW Makefiles" (other options) .
+mingw32-make
+@endverbatim
+
+\subsubsection install_cmake_mac Cmake on Mac OSX
+
+SimGrid compiles like a charm with clang on Mac OSX:
+
+@verbatim
+cmake -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++ .
+make
+@endverbatim
+
+With the XCode version of clang 4.1, you may get the following error message:
+@verbatim
+CMake Error: Parse error in cache file build_dir/CMakeCache.txt. Offending entry: /SDKs/MacOSX10.8.sdk
+@endverbatim
+
+In that case, edit the CMakeCache.txt file directly, so that the
+CMAKE_OSX_SYSROOT is similar to the following. Don't worry about the
+warning that the "-pthread" argument is not used, if it appears.
+@verbatim
+CMAKE_OSX_SYSROOT:PATH=/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
+@endverbatim
+
+\subsection install_src_compil Compiling SimGrid
+
+In most cases, compiling and installing simgrid is enough:
+
+@verbatim
+make
+make install # try "sudo make install" if you don't have the permission to write
+@endverbatim
+
+In addition, several compilation targets are provided in SimGrid. If
+your system is well configured, the full list of targets is available
+for completion when using the Tab key. Note that some of the existing
+targets are not really for publc consumption so don't worry if some
+stuff don't work for you.
+
+@verbatim
+make simgrid                   Builds only the simgrid library and not any example
+make masterslave               Builds only this example (and its dependencies)
+make clean                     Clean the results of a previous compilation
+make install                   Install the project (doc/ bin/ lib/ include/)
+make uninstall                 Uninstall the project (doc/ bin/ lib/ include/)
+make dist                      Cuild a distribution archive (tgz)
+make distcheck                 Check the dist (make + make dist + tests on the distribution)
+make simgrid_documentation     Create simgrid documentation
+@endverbatim
+
+If you want to see what is really happening, try adding VERBOSE=1 to
+your compilation requests:
+
+@verbatim
+make VERBOSE=1 
+@endverbatim
+
+@subsection install_src_test Testing SimGrid 
+
+Once everything is built, you may want to test the result. SimGrid
+comes with an extensive set of regression tests (see @ref
+inside_cmake_addtest "that page of the insider manual" for more
+details). Running the tests is done using the ctest binary that comes
+with cmake. These tests are run every night and the result is publicly
+<a href="http://cdash.inria.fr/CDash/index.php?project=Simgrid">available</a>.
+
+\verbatim
+ctest                    # Launch all tests
+ctest -D Experimental     # Launch all tests and report the result to
+                          # http://cdash.inria.fr/CDash/index.php?project=SimGrid
+ctest -R msg              # Launch only the tests which name match the string "msg"
+ctest -j4                 # Launch all tests in parallel, at most 4 at the same time
+ctest --verbose           # Display all details on what's going on
+ctest --output-on-failure # Only get verbose for the tests that fail
+
+ctest -R msg- -j5 --output-on-failure # You changed MSG and want to check that you didn't break anything, huh?
+                                      # That's fine, I do so all the time myself.
+\endverbatim
+
+\section install_setting_own Setting up your own code
+
+\subsection install_setting_MSG MSG code on Unix (Linux or Mac OSX)
+
+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_task_usage.
+\li <tt>masterslave.c</tt>: a C file with the main function, i.e.
+    the MSG initialization (MSG_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 install_setting_win_provided Compile the "HelloWorld" project on Windows
+
+In the SimGrid install directory 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 compile this example:
+\li Run windows shell "cmd".
+\li Open HelloWorld Directory ('cd' command line).
+\li Create a build directory and change directory. (optional)
+\li Type 'cmake -G"MinGW Makefiles" \<path_to_HelloWorld_project\>'
+\li Run mingw32-make
+\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 install_setting_win_new Adding and Compiling a new example on Windows
+
+\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 #
+################
+#It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'
+add_executable(TARGET_NAME SOURCES)
+#Links TARGET_NAME with simgrid and pcre
+target_link_libraries(TARGET_NAME simgrid pcre)
+\endverbatim
+\li To initialize and build your project, you'll need to run
+\verbatim
+cmake -G"MinGW Makefiles" <path_to_HelloWorld_project>
+\endverbatim
+\li Run "mingw32-make"
+\li You should obtain "TARGET_NAME.exe".
+
+\subsection install_Win_ruby Setup a virtualbox to use SimGrid-Ruby on windows
+
+Allan Espinosa made these set of Vagrant rules available so that you
+can use the SimGrid Ruby bindings in a virtual machine using
+VirtualBox. Thanks to him for that. You can find his project here:
+https://github.com/aespinosa/simgrid-vagrant
+
+
+
+*/
similarity index 54%
rename from doc/user_guide/doxygen/index.doc
rename to doc/doxygen/internals.doc
index 883fc8d..08a2ee1 100644 (file)
@@ -1,45 +1,23 @@
-/*!  
-@mainpage SimGrid User Guide
-<center>
-\htmlonly
-<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
-\htmlonly
-               </td>
-       </tr>
-</table>
-\endhtmlonly
-</center>
-
-Welcome to the SimGrid user guide. In this document, you will find how to install, get started, configure, and run your first simulation with SimGrid.
+/*! @page internals SimGrid internals
 
-\section sim_over SimGrid Overview
-SimGrid is a toolkit that provides core functionalities for the simulation
-of distributed applications in heterogeneous distributed environments.
+This page does not exist yet, sorry. We are currently refurbishing the
+user documentation -- the internal documentation will follow (FIXME).
 
-The specific goal of the project is to facilitate research in the area of
-distributed and parallel application scheduling on distributed computing
-platforms ranging from simple network of workstations to Computational
-Grids.
+There is two main things you want to know about the internals of
+SimGrid. First, you need to understand the component organization, as
+SimGrid is heavily layered, with each level being rather highly
+specialized and optimized toward a task. For that, please keep reading
+this page. If you work actively on the SimGrid project, the second
+point you need to understand is about the infrastructure of the
+SimGrid project, ie how to extend the framework in any way, how the
+automatic tests are run, and so on. These informations are split on
+several pages, as follows:
 
-  - The official webpage is <a href="http://simgrid.gforge.inria.fr/">simgrid.gforge.inria.fr</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="http://simgrid.gforge.inria.fr/download.html">here</a>.
-<br>
-
-<hr>
-
-\section ug_overview Overview of the toolkit components
-
-As depicted by the following diagram, the SimGrid toolkit is basically
-three-layered (click on the picture to jump to a specific component).
+ - @subpage inside_doxygen
+ - @subpage inside_extending
+ - @subpage inside_cmake
+ - @subpage inside_release
+ - @subpage inside_autotests
 
 
 \htmlonly
@@ -47,11 +25,14 @@ three-layered (click on the picture to jump to a specific component).
 \endhtmlonly
 \htmlinclude simgrid_modules.map
 \htmlonly
-<br><b>Relationships between the SimGrid components (click to jump to API)</b>
+<br><b>SimGrid Components (click to jump to API)</b>
 </center>
 \endhtmlonly
 
 
+\section ug_overview Overview of the toolkit components
+
+
 \subsection ug_overview_envs Programmation environments layer
 
 SimGrid provides several programmation environments built on top of a unique
@@ -108,25 +89,4 @@ See the \ref XBT_API section for more details.
 \subsection ug_lucas_layer Tracing simulation
 Finally, a transversal module allows you to trace your simulation. More documentation in the section \ref TRACE_doc
 
-
-<br>
-The SimGrid software package can be downloaded from
-<a href="http://simgrid.gforge.inria.fr/download.html">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="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
-mailing list</a>.
-
-
-<hr>
-\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>
-</center>
-\endhtmlonly
-
-
-*/
+*/
\ No newline at end of file
diff --git a/doc/doxygen/introduction.doc b/doc/doxygen/introduction.doc
new file mode 100644 (file)
index 0000000..62d52bd
--- /dev/null
@@ -0,0 +1,18 @@
+/*! @page introduction Introduction to SimGrid 
+
+This page does not really exist yet. In the meanwhile, please refer
+to the <a href="http://simgrid.gforge.inria.fr/tutorials.html">tutorials</a>
+on the project web page, looking for the 
+<a href="http://simgrid.gforge.inria.fr/tutorials/101/simgrid-101.pdf">SimGrid 
+101</a> tutorial.
+
+<a href="http://simgrid.gforge.inria.fr/">SimGrid</a> is a toolkit
+that provides core functionalities for the simulation of distributed
+applications in heterogeneous distributed environments.
+
+The specific goal of the project is to facilitate research in the area of
+distributed and parallel application scheduling on distributed computing
+platforms ranging from simple network of workstations to Computational
+Grids.
+
+*/
\ No newline at end of file
similarity index 94%
rename from doc/ref_guide/doxygen/module-msg.doc
rename to doc/doxygen/module-msg.doc
index b6de29e..a96494e 100644 (file)
@@ -22,6 +22,7 @@
    - \ref msg_task_usage
    - \ref msg_VMs
    - \ref msg_trace_driven
+   - \ref MSG_examples
    - \ref msg_deprecated_functions
 
 
@@ -171,6 +172,17 @@ the examples to learn how to use it.
     is a working non-trivial example of use of the lua bindings
 */
 
+/**
+@defgroup MSG_examples MSG examples
+@ingroup MSG_API
+@brief MSG examples from examples directory examples/msg
+
+MSG comes with an extensive set of examples. It is sometimes difficult to find the one you need. This list aims at helping you finding the example from which you can learn what you want to.
+
+\section msg_bsc_ex Basic examples
+
+*/
+
 /**
 @defgroup msg_deprecated_functions MSG Deprecated
 @ingroup MSG_API
similarity index 95%
rename from doc/ref_guide/doxygen/module-simix.doc
rename to doc/doxygen/module-simix.doc
index 766a1d8..45cff6b 100644 (file)
@@ -1,6 +1,6 @@
 /** @addtogroup SIMIX_API
 
-  \section Coming soon
+  \section smx_detail Coming soon
  @{ */
      /** @defgroup m_datatypes_management_details SIMIX datatypes management details */
 /** @} */
similarity index 97%
rename from doc/ref_guide/doxygen/module-xbt.doc
rename to doc/doxygen/module-xbt.doc
index 2d9b8ea..cf5fad5 100644 (file)
@@ -10,6 +10,7 @@
       - \ref XBT_error
       - \ref XBT_config
       - \ref XBT_mallocator
+      - \ref XBT_cunit
     - Data structures
       - \ref XBT_dynar
       - \ref XBT_dict
@@ -48,6 +49,7 @@
      /** @defgroup XBT_error  Assert macro familly */
      /** @defgroup XBT_config Configuration support */
      /** @defgroup XBT_mallocator Mallocators */
+     /** @defgroup XBT_cunit      Unit testing support */
 /** @} */
 
 
similarity index 89%
rename from doc/ref_guide/doxygen/modules.doc
rename to doc/doxygen/modules.doc
index 415bc82..d21c24c 100644 (file)
@@ -1,27 +1,44 @@
-
-/** \defgroup XBT_API      XBT
-    \brief The core toolbox of SimGrid, containing usefull datatypes,
-           portability support and so on.
-
+/** 
+@defgroup MSG_API      MSG
+@brief Simple programming environment
+
+MSG was the first distributed programming environment provided within
+SimGrid. While almost realistic, it remains quite simple
+(simplistic?).
+
+@section MSG_who Who should use this (and who shouldn't)
+
+You should use this module if you want to study some heuristics for a
+given problem you don't really want to implement. If you want to use
+DAGs, have a look at the \ref SD_API programming environment. If you
+want to study an existing MPI program, have a look at the \ref
+SMPI_API one. If none of those programming environments fits your
+needs, you may consider implementing your own directly on top of 
+\ref SURF_API (but you probably want to contact us before). 
 */
 
-/** \defgroup MSG_API      MSG
-    \brief Simple programming environment
+/** 
+@defgroup XBT_API      XBT
+@brief The core toolbox of SimGrid, containing usefull datatypes and friends
+*/
 
-      MSG was the first distributed programming environment provided within
-      SimGrid. While almost realistic, it remains quite simple (simplistic?).
+/**
+@defgroup TRACE_API TRACE
+@brief Tracing mechanism and its functions.
 
-      \section MSG_who Who should use this (and who shouldn't)
+SimGrid can trace the resource (of hosts and links) utilization using
+any of its programming interfaces (MSG, SimDAG and SMPI). 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.
 
-      You should use this module if you want to study some heuristics for a
-      given problem you don't really want to implement.
-      If you want to use DAGs, have a look at the \ref SD_API programming
-      environment.
-      If you want to study an existing MPI program,
-      have a look at the \ref SMPI_API one. If none of those programming
-      environments fits your needs, you may consider implementing your own
-      directly on top of \ref SURF_API (but you probably want to contact us
-      before).
+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.
+The API enables the declaration of categories and a function to
+associate them to the tasks (MSG and SD). The tasks that are not
+classified according to a category are not traced. If no categories
+are specified, simulations can still be traced using a special
+parameter in the command line (see \ref tracing for details).
 */
 
 
@@ -175,22 +192,4 @@ module is only partially documented.
 */
 
 
-/**
-@defgroup TRACE_API TRACE
-@brief Tracing mechanism and its functions.
-
-SimGrid can trace the resource (of hosts and links) utilization using
-any of its programming interfaces (MSG, SimDAG and SMPI). 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 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.
-The API enables the declaration of categories and a function to
-associate them to the tasks (MSG and SD). The tasks that are not
-classified according to a category are not traced. If no categories
-are specified, simulations can still be traced using a special
-parameter in the command line (see \ref tracing for details).
-*/
 
similarity index 97%
rename from doc/user_guide/doxygen/options.doc
rename to doc/doxygen/options.doc
index 1901e91..02f6728 100644 (file)
@@ -5,7 +5,9 @@ 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.
+report so that we can fix it. Note that some of the options presented
+here may not be available in your simulators, depending on the 
+@ref install_src_config "compile-time options" that you used.
 
 \section options_using Passing configuration options to the simulators
 
@@ -36,23 +38,28 @@ file: \verbatim
 \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
+interface. If you happen to use the MSG interface, this is very easy
+with the MSG_config() function. If you do not use MSG, that's a bit
+more complex, as you have to mess with the internal configuration set
+directly as follows. Check the \ref XBT_config "relevant page" for
+details on all the functions you can use in this context, \c
+_sg_cfg_set being the only configuration set currently used in
+SimGrid. 
+
+@code
 #include <xbt/config.h>
 
-extern xbt_cfg_t _surf_cfg_set;
+extern xbt_cfg_t _sg_cfg_set;
 
 int main(int argc, char *argv[]) {
-     MSG_init(&argc, argv);
+     SD_init(&argc, argv);
 
-     xbt_cfg_set_parse(_surf_cfg_set,"Item:Value");
+     /* Prefer MSG_config() if you use MSG!! */
+     xbt_cfg_set_parse(_sg_cfg_set,"Item:Value");
 
      // Rest of your code
 }
-\endcode
+@endcode
 
 \section options_model Configuring the platform models
 
similarity index 59%
rename from doc/user_guide/doxygen/platform.doc
rename to doc/doxygen/platform.doc
index e33d8d9..0987ed6 100644 (file)
@@ -1,55 +1,92 @@
 /*! \page platform Platform Description
 
+@tableofcontents
+
 In order to run any simulation, SimGrid needs 3 things: something to run
 (so, your code), a description of the platform on which you want to run your
 application, and finally it needs something to know where to deploy what.
 
 For the latest 2 entries, you have basically 2 ways to give it as an input :
-\li You can program it, either using the Lua console (\ref MSG_Lua_funct) or if you're using MSG some
-of its platform and deployments functions(\ref msg_simulation). If you want to use it, please refer
-to its doc. (you can also  check the section  \ref pf_flexml_bypassing but this is strongly deprecated, as there is a new way to do it properly, but not yet documented).
-\li You can use two XML files: a platform description file and a deployment
-description one.
+\li You can program it, either using the Lua console (\ref
+    MSG_Lua_funct) or if you're using MSG some of its platform and
+    deployments functions(\ref msg_simulation). If you want to use it,
+    please refer to its doc. (you can also check the section \ref
+    pf_flexml_bypassing but this is strongly deprecated, as there is a
+    new way to do it properly, but not yet documented).
+\li You can use two XML files: a platform description file and a
+    deployment description one.
 
 For the deployment stuff, please takea look at \ref deployment
 
-The platform description may be complicated. This documentation is all about how to write this file: what are the basic concept it relies on, what possibilities are offered, and some hints and tips on how to write a good platform description.
+The platform description may be complicated. This documentation is all
+about how to write this file: what are the basic concept it relies on,
+what possibilities are offered, and some hints and tips on how to
+write a good platform description.
 
 \section pf_overview Some words about XML and DTD
 
 We choose to use XML because of some of its possibilities: if you're
-using an accurate XML editor, or simply using any XML plug-in for eclipse, it
-will allow you to have cool stuff like auto-completion, validation and checking,
-so all syntaxic errors may be avoided this way.
+using an accurate XML editor, or simply using any XML plug-in for
+eclipse, it will allow you to have cool stuff like auto-completion,
+validation and checking, so all syntaxic errors may be avoided this
+way.
 
 the XML checking is done based on the dtd which is nowaday online at
 <a href="http://simgrid.gforge.inria.fr/simgrid.dtd">http://simgrid.gforge.inria.fr/simgrid.dtd</a>
 while you might be tempted to read it, it will not help you that much.
 
 If you read it, you should notice two or three important things :
-\li The platform tags contains a version attributes. At the time of writing this doc
-the current version is 3.
+\li The platform tags contains a version attributes. At the time of
+    writing this doc the current version is 3.    
 \li The DTD contains definitions for the 2 files used by SimGrid (platform
-description and deployment).
+    description and deployment).
 \li There is a bunch of possibilities ! Let's see what's in it
 
 
 \section pf_basics Basic concepts
 
-Nowadays, the Internet is composed of a bunch of independently managed networks. Within each of those networks, there are entry and exit points (most of the time, you can both enter and exit through the same point) that allows to go out of the current network and reach other networks. At the upper level, these networks are known as <b>Autonomous System (AS)</b>, while at the lower level they are named sub-networks, or LAN. Indeed they are autonomous: routing is defined within the limits of his network by the administrator, and so, those networks can continue to operate without the existence of other networks. There are some rules to get out of networks by the entry points (or gateways). Those gateways allow you to go from a network to another one. Inside of each autonomous system, there is a bunch of equipments (cables, routers, switches, computers) that belong to the autonomous system owner.
-
-SimGrid platform description file relies exactly on the same concepts as real life platform. Every resource (computers, network equipments, and so on) belongs to an AS. Within this AS, you can define the routing you want between its elements (that's done with the routing model attribute and eventually with some \<route\> tag). You define AS by using ... well ... the \<AS\> tag. An AS can also contain some AS : AS allows you to define the hierarchy of your platform.
+Nowadays, the Internet is composed of a bunch of independently managed
+networks. Within each of those networks, there are entry and exit
+points (most of the time, you can both enter and exit through the same
+point) that allows to go out of the current network and reach other
+networks. At the upper level, these networks are known as
+<b>Autonomous System (AS)</b>, while at the lower level they are named
+sub-networks, or LAN. Indeed they are autonomous: routing is defined
+within the limits of his network by the administrator, and so, those
+networks can continue to operate without the existence of other
+networks. There are some rules to get out of networks by the entry
+points (or gateways). Those gateways allow you to go from a network to
+another one. Inside of each autonomous system, there is a bunch of
+equipments (cables, routers, switches, computers) that belong to the
+autonomous system owner.
+
+SimGrid platform description file relies exactly on the same concepts
+as real life platform. Every resource (computers, network equipments,
+and so on) belongs to an AS. Within this AS, you can define the
+routing you want between its elements (that's done with the routing
+model attribute and eventually with some \<route\> tag). You define AS
+by using ... well ... the \<AS\> tag. An AS can also contain some AS :
+AS allows you to define the hierarchy of your platform.
 
 Within each AS, you basically have the following type of resources:
 \li <b>host</b>: an host, with cores in it, and so on
 \li <b>router</b>: a router or a gateway.
-\li <b>link</b>: a link, that defines a connection between two (or more) resources (and have a bandwidth and a latency)
-\li <b>cluster</b>: like a real cluster, contains many hosts interconnected by some dedicated network.
-
-Between those elements, a routing has to be defined. As the AS is supposed to be Autonomous, this has to be done at the AS level. As AS handles two different types of entities (<b>host/router</b> and <b>AS</b>) you will have to define routes between those elements. A network model have to be provided for AS, but you may/will need, depending of the network model, or because you want to bypass the default beahviour to defines routes manually. There are 3 tags to use :
+\li <b>link</b>: a link, that defines a connection between two (or
+    more) resources (and have a bandwidth and a latency) 
+\li <b>cluster</b>: like a real cluster, contains many hosts
+    interconnected by some dedicated network. 
+
+Between those elements, a routing has to be defined. As the AS is
+supposed to be Autonomous, this has to be done at the AS level. As AS
+handles two different types of entities (<b>host/router</b> and
+<b>AS</b>) you will have to define routes between those elements. A
+network model have to be provided for AS, but you may/will need,
+depending of the network model, or because you want to bypass the
+default beahviour to defines routes manually. There are 3 tags to use: 
 \li <b>ASroute</b>: to define routes between two  <b>AS</b>
 \li <b>route</b>: to define routes between two <b>host/router</b>
-\li <b>bypassRoute</b>: to define routes between two <b>AS</b> that will bypass default routing.
+\li <b>bypassRoute</b>: to define routes between two <b>AS</b> that
+    will bypass default routing. 
 
 Here is an illustration of the overall concepts:
 
@@ -64,7 +101,10 @@ Here is an illustration of the overall concepts:
     scattered around the world (AS7).
 
 
-This is all for the concepts ! To make a long story short, a SimGrid platform is made of a hierarchy of AS, each of them containing resources, and routing is defined at AS level. Let's have a deeper look in the tags.
+This is all for the concepts ! To make a long story short, a SimGrid
+platform is made of a hierarchy of AS, each of them containing
+resources, and routing is defined at AS level. Let's have a deeper
+look in the tags.
 
 
 
@@ -72,13 +112,27 @@ This is all for the concepts ! To make a long story short, a SimGrid platform is
 
 \subsection  pf_As Platform organization tag : AS
 
-AS (or Autonomous System) is an organizational unit that contains resources and defines routing between them, and eventually some other AS. So it allows you to define a hierarchy into your platform. <b>*ANY*</b> resource <b>*MUST*</b> belong to an AS. There are a few attributes.
+AS (or Autonomous System) is an organizational unit that contains
+resources and defines routing between them, and eventually some other
+AS. So it allows you to define a hierarchy into your platform.
+<b>*ANY*</b> resource <b>*MUST*</b> belong to an AS. There are a few
+attributes.
 
 <b>AS</b> attributes :
-\li <b>name (mandatory)</b>: the identifier of AS to be used when referring to it.
-\li <b>routing (mandatory)</b>: the routing model used into it. By model we mean the internal way the simulator will manage routing. That also have a big impact on how many information you'll have to provide to help the simulator to route between the AS elements. <b>routing</b> possible values are <b>Full, Floyd, Dijkstra, DijkstraCache, none, RuleBased, Vivaldi, Cluster</b>. For more explanation about what to choose, take a look at the section devoted to it below.
-
-Elements into an AS are basically resources (computers, network equipments) and some routing informations if necessary (see below for more explanation).
+\li <b>id (mandatory)</b>: the identifier of AS to be used when
+    referring to it.     
+\li <b>routing (mandatory)</b>: the routing model used into it. By
+    model we mean the internal way the simulator will manage routing.
+    That also have a big impact on how many information you'll have to
+    provide to help the simulator to route between the AS elements.
+    <b>routing</b> possible values are <b>Full, Floyd, Dijkstra,
+    DijkstraCache, none, RuleBased, Vivaldi, Cluster</b>. For more
+    explanation about what to choose, take a look at the section
+    devoted to it below.  
+
+Elements into an AS are basically resources (computers, network
+equipments) and some routing informations if necessary (see below for
+more explanation).
 
 <b>AS example</b>
 \verbatim
@@ -90,33 +144,55 @@ Elements into an AS are basically resources (computers, network equipments) and
  </AS>
 \endverbatim
 
+In this example, AS0 contains two hosts (host1 and host2). The route
+between the hosts goes through link1.
+
 
-In this example, AS0 contains two hosts (host1 and host2). The route between the hosts goes through link1.
 \subsection pf_Cr Computing resources: hosts, clusters and peers.
 
 \subsubsection pf_host host
-A <b>host</b> represents a computer, where you will be able to execute code and from which you can send and receive information. A host can contain more than 1 core. Here are the attributes of a host :
+
+A <b>host</b> represents a computer, where you will be able to execute
+code and from which you can send and receive information. A host can
+contain more than 1 core. Here are the attributes of a host :
 
 
 <b>host</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the host to be used when referring to it.
-\li <b>power (mandatory)</b>:the peak number FLOPS the CPU can manage. Expressed in flop/s.
-\li <b>core</b>: The number of core of this host. If setted, the power gives the power of one core. The specified computing power will be available to up to 6 sequential
-tasks without sharing. If more tasks are placed on this host, the
-resource will be shared accordingly. For example, if you schedule 12
-tasks on the host, each will get half of the computing power. Please
-note that although sound, this model were never scientifically
-assessed. Please keep this fact in mind when using it.
+\li <b>id (mandatory)</b>: the identifier of the host to be used when
+    referring to it.
+\li <b>power (mandatory)</b>:the peak number FLOPS the CPU can manage.
+    Expressed in flop/s.
+\li <b>core</b>: The number of core of this host. If setted, the power
+    gives the power of one core. The specified computing power will be
+    available to up to 6 sequential tasks without sharing. If more
+    tasks are placed on this host, the resource will be shared
+    accordingly. For example, if you schedule 12 tasks on the host,
+    each will get half of the computing power. Please note that
+    although sound, this model were never scientifically assessed.
+    Please keep this fact in mind when using it.
 
 \li <b>availability</b>: specify if the percentage of power available.
-\li <b>availability_file</b>: Allow you to use a file as input. This file will contain availability traces for this computer. The syntax of this file is defined below. Possible values : absolute or relative path, syntax similar to the one in use on your system.
-\li <b>state</b>: the computer state, as in : is that computer ON or OFF. Possible values : "ON" or "OFF".
-\li <b>state_file</b>: Same mechanism as availability_file, similar syntax for value.
-\li <b>coordinates</b>: you'll have to give it if you choose the vivaldi, coordinate-based routing model for the AS the host belongs to. More details about it in the P2P coordinate based section.
-
-An host can contain some <b>mount</b> that defines mounting points between some storage resource and the <b>host</b>. Please refer to the storage doc for more information.
-
-An host can also contain the <b>prop</b> tag. the prop tag allows you to define additional informations on this host following the attribute/value schema. You may want to use it to give information to the tool you use for rendering your simulation, for example.
+\li <b>availability_file</b>: Allow you to use a file as input. This
+    file will contain availability traces for this computer. The
+    syntax of this file is defined below. Possible values : absolute
+    or relative path, syntax similar to the one in use on your system.
+\li <b>state</b>: the computer state, as in : is that computer ON or
+    OFF. Possible values : "ON" or "OFF". 
+\li <b>state_file</b>: Same mechanism as availability_file, similar
+    syntax for value.     
+\li <b>coordinates</b>: you'll have to give it if you choose the
+    vivaldi, coordinate-based routing model for the AS the host
+    belongs to. More details about it in the P2P coordinate based
+    section. 
+
+An host can contain some <b>mount</b> that defines mounting points
+between some storage resource and the <b>host</b>. Please refer to the
+storage doc for more information.
+
+An host can also contain the <b>prop</b> tag. the prop tag allows you
+to define additional informations on this host following the
+attribute/value schema. You may want to use it to give information to
+the tool you use for rendering your simulation, for example.
 
 <b>host example</b>
 \verbatim
@@ -204,7 +280,13 @@ so on.
 
 
 \subsubsection pf_cluster cluster
-A <b>cluster</b> represents a cluster. It is most of the time used when you want to have a bunch of machine defined quickly. It must be noted that cluster is meta-tag : <b>from the inner SimGrid point of view, a cluster is an AS where some optimized routing is defined</b> . The default inner organisation of the cluster is as follow :
+
+A <b>cluster</b> represents a cluster. It is most of the time used
+when you want to have a bunch of machine defined quickly. It must be
+noted that cluster is meta-tag : <b>from the inner SimGrid point of
+view, a cluster is an AS where some optimized routing is defined</b>.
+The default inner organisation of the cluster is as follow:
+
 \verbatim
                  _________
                 |          |
@@ -217,7 +299,13 @@ A <b>cluster</b> represents a cluster. It is most of the time used when you want
     c-0.me                             c-99.me
 \endverbatim
 
-You have a set of <b>host</b> defined. Each of them has a <b>link</b> to a central backbone (backbone is a <b>link</b> itsef, as a link can be used to represent a switch, see the switch or <b>link</b> section below for more details about it). A <b>router</b> gives a way to the <b>cluster</b> to be connected to the outside world. Internally, cluster is then an AS containing all hosts : the router is the default gateway for the cluster.
+You have a set of <b>host</b> defined. Each of them has a <b>link</b>
+to a central backbone (backbone is a <b>link</b> itsef, as a link can
+be used to represent a switch, see the switch or <b>link</b> section
+below for more details about it). A <b>router</b> gives a way to the
+<b>cluster</b> to be connected to the outside world. Internally,
+cluster is then an AS containing all hosts : the router is the default
+gateway for the cluster.
 
 There is an alternative organization, which is as follow :
 \verbatim
@@ -233,27 +321,52 @@ There is an alternative organization, which is as follow :
             host0   host1   host2
 \endverbatim
 
-The principle is the same, except we don't have the backbone. The way to obtain it is simple : you just have to let bb_* attributes unsetted.
+The principle is the same, except we don't have the backbone. The way
+to obtain it is simple : you just have to let bb_* attributes
+unsetted.
 
 
 
 <b>cluster</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the cluster to be used when referring to it.
-\li <b>prefix (mandatory)</b>: each node of the cluster has to have a name. This is its prefix.
+\li <b>id (mandatory)</b>: the identifier of the cluster to be used
+    when referring to it. 
+\li <b>prefix (mandatory)</b>: each node of the cluster has to have a
+    name. This is its prefix. 
 \li <b>suffix (mandatory)</b>: node suffix name.
-\li <b>radical (mandatory)</b>: regexp used to generate cluster nodes name. Syntax is quite common, "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before. The produced number is concatenated  between prefix and suffix to form machine names.
+\li <b>radical (mandatory)</b>: regexp used to generate cluster nodes
+    name. Syntax is quite common, "10-20" will give you 11 machines
+    numbered from 10 to 20, "10-20;2" will give you 12 machines, one
+    with the number 2, others numbered as before. The produced number
+    is concatenated between prefix and suffix to form machine names.
 \li <b>power (mandatory)</b>: same as <b>host</b> power.
 \li <b>core</b>: same as <b>host</b> core.
-\li <b>bw (mandatory)</b>: bandwidth for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
-\li <b>lat (mandatory)</b>: latency for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
-\li <b>sharing_policy</b>: sharing policy for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
-\li <b>bb_bw </b>: bandwidth for backbone (if any). See <b>link</b> section for syntax/details. If both bb_* attributes are ommited, no backbone is created (alternative cluster architecture described before).
-\li <b>bb_lat </b>: latency for backbone (if any). See <b>link</b> section for syntax/details. If both bb_* attributes are ommited, no backbone is created (alternative cluster architecture described before).
-\li <b>bb_sharing_policy</b>: sharing policy for the backbone (if any). See <b>link</b> section for syntax/details.
-\li <b>availability_file</b>: Allow you to use a file as input for availability. Similar to <b>hosts</b> attribute.
-\li <b>state_file</b>: Allow you to use a file as input for states. Similar to <b>hosts</b> attribute.
+\li <b>bw (mandatory)</b>: bandwidth for the links between nodes and
+    backbone (if any). See <b>link</b> section for syntax/details.
+\li <b>lat (mandatory)</b>: latency for the links between nodes and
+    backbone (if any). See <b>link</b> section for syntax/details. 
+\li <b>sharing_policy</b>: sharing policy for the links between nodes
+    and backbone (if any). See <b>link</b> section for syntax/details.     
+\li <b>bb_bw </b>: bandwidth for backbone (if any). See <b>link</b>
+    section for syntax/details. If both bb_* attributes are ommited,
+    no backbone is created (alternative cluster architecture described
+    before). 
+\li <b>bb_lat </b>: latency for backbone (if any). See <b>link</b>
+    section for syntax/details. If both bb_* attributes are ommited,
+    no backbone is created (alternative cluster architecture described
+    before).
+\li <b>bb_sharing_policy</b>: sharing policy for the backbone (if
+    any). See <b>link</b> section for syntax/details.
+\li <b>availability_file</b>: Allow you to use a file as input for
+    availability. Similar to <b>hosts</b> attribute. 
+\li <b>state_file</b>: Allow you to use a file as input for states.
+    Similar to <b>hosts</b> attribute. 
 
-the router name is defined as the resulting String in the following java line of code: router_name = prefix + clusterId + router_ + suffix ;
+the router name is defined as the resulting String in the following
+java line of code: 
+
+@verbatim
+router_name = prefix + clusterId + router_ + suffix;
+@endverbatim
 
 
 <b>cluster example</b>
@@ -274,37 +387,62 @@ c-99.my_cluster_1.me
 \endverbatim
 
 \subsubsection pf_peer peer
-A <b>peer</b> represents a peer, as in Peer-to-Peer (P2P). Basically, as cluster, <b>A PEER IS INTERNALLY INTERPRETED AS AN \<AS\></b>. It's just a kind of shortcut that does the following :
+A <b>peer</b> represents a peer, as in Peer-to-Peer (P2P). Basically,
+as cluster, <b>A PEER IS INTERNALLY INTERPRETED AS AN \<AS\></b>. It's
+just a kind of shortcut that does the following :
+
 \li It creates an host
-\li Two links : one for download and one for upload. This is convenient to use and simulate stuff under the last mile model (as ADSL peers).
-\li It creates a gateway that serve as entry point for this peer zone. This router has coordinates.
+\li Two links : one for download and one for upload. This is
+    convenient to use and simulate stuff under the last mile model (as
+    ADSL peers).  
+\li It creates a gateway that serve as entry point for this peer zone.
+    This router has coordinates.
 
 <b>peer</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the peer to be used when referring to it.
+\li <b>id (mandatory)</b>: the identifier of the peer to be used when
+    referring to it.
 \li <b>power CDATA (mandatory)</b>: as in host
 \li <b>bw_in CDATA (mandatory)</b>: bandwidth in.
 \li <b>bw_out CDATA (mandatory)</b>:bandwidth out.
 \li <b>lat CDATA (mandatory)</b>: Latency for in and out links.
 \li <b>coordinates</b>: coordinates of the gateway for this peer.
-\li <b>sharing_policy</b>: sharing policy for links. Can be SHARED or FULLDUPLEX, FULLDUPLEX is the default. See <b>link</b> description for details.
-\li <b>availability_file</b>: availability file for the peer. Same as host availability file. See <b>host</b> description for details.
-\li <b>state_file </b>: state file for the peer. Same as host state file. See <b>host</b> description for details.
+\li <b>sharing_policy</b>: sharing policy for links. Can be SHARED or
+    FULLDUPLEX, FULLDUPLEX is the default. See <b>link</b> description
+    for details.
+\li <b>availability_file</b>: availability file for the peer. Same as
+    host availability file. See <b>host</b> description for details.   
+\li <b>state_file </b>: state file for the peer. Same as host state
+    file. See <b>host</b> description for details. 
 
 \subsection pf_ne Network equipments: links and routers
 
-You have basically two entities available to represent network entities :
-\li <b>link</b>: represents something that has a limited bandwidth, a latency, and that can be shared according to TCP way to share this bandwidth. <b>LINKS ARE NOT EDGES BUT HYPEREDGES</b>: it means that you can have more than 2 equipments connected to it.
-\li <b>router</b>: represents something that one message can be routed to, but does not accept any code, nor have any influence on the performances (no bandwidth, no latency, not anything).<b>ROUTERS ARE ENTITIES (ALMOST) IGNORED BY THE SIMULATOR WHEN THE SIMULATION HAS BEGUN</b>. If you want to represent something like a switch, you must use <b>link</b> (see section below). Routers are used in order to run some routing algorithm and determine routes (see routing section for details).
+You have basically two entities available to represent network entities:
+\li <b>link</b>: represents something that has a limited bandwidth, a
+    latency, and that can be shared according to TCP way to share this
+    bandwidth. <b>LINKS ARE NOT EDGES BUT HYPEREDGES</b>: it means
+    that you can have more than 2 equipments connected to it.
+\li <b>router</b>: represents something that one message can be routed
+    to, but does not accept any code, nor have any influence on the
+    performances (no bandwidth, no latency, not anything).<b>ROUTERS
+    ARE ENTITIES (ALMOST) IGNORED BY THE SIMULATOR WHEN THE SIMULATION
+    HAS BEGUN</b>. If you want to represent something like a switch,
+    you must use <b>link</b> (see section below). Routers are used in
+    order to run some routing algorithm and determine routes (see
+    routing section for details).
 
 let's see deeper what those entities hide.
 
 \subsubsection pf_router router
-As said before, <b>router</b> is used only to give some information for routing algorithms. So, it does not have any attributes except :
+As said before, <b>router</b> is used only to give some information
+for routing algorithms. So, it does not have any attributes except :
 
 <b>router</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the router to be used when referring to it.
-\li <b>coordinates</b>: you'll have to give it if you choose the vivaldi, coordinate-based routing model for the AS the host belongs to. More details about it in the P2P coordinates based section.
-
+\li <b>id (mandatory)</b>: the identifier of the router to be used
+    when referring to it.
+    \li <b>coordinates</b>: you'll have to give it if you choose the
+    vivaldi, coordinate-based routing model for the AS the host
+    belongs to. More details about it in the P2P coordinates based
+    section.
 
 <b>router example</b>
 \verbatim
@@ -312,20 +450,31 @@ As said before, <b>router</b> is used only to give some information for routing
 \endverbatim
 
 \subsubsection pf_link link
-Network links can represent one-hop network connections. They are characterized by their id and their bandwidth.
-The latency is optional with a default value of 0.0. For instance, we can declare a network link named link1
-having bandwidth of 1Gb/s and a latency of 50µs.
+
+Network links can represent one-hop network connections. They are
+characterized by their id and their bandwidth. The latency is optional
+with a default value of 0.0. For instance, we can declare a network
+link named link1 having bandwidth of 1Gb/s and a latency of 50µs.
 Example link:
+
 \verbatim
  <link id="LINK1" bandwidth="125000000" latency="5E-5"/>
 \endverbatim
 <b>Expressing sharing policy</b>
 
-By default a network link is SHARED, that is if more than one flow go through
-a link, each gets a share of the available bandwidth similar to the share TCP connections offers.
+By default a network link is SHARED, that is if more than one flow go
+through a link, each gets a share of the available bandwidth similar
+to the share TCP connections offers.
 
-Conversely if a link is defined as a FATPIPE, each flow going through this link will get all the available bandwidth, whatever the number of flows. The FATPIPE
-behavior allows to describe big backbones that won't affect performances (except latency). Finally a link can be considered as FULLDUPLEX, that means that in the simulator, 2 links (one named UP and the other DOWN) will be created for each link, so as the transfers from one side to the other will interact similarly as TCP when ACK returning packets circulate on the other direction. More discussion about it is available in <b>link_ctn</b> description.
+Conversely if a link is defined as a FATPIPE, each flow going through
+this link will get all the available bandwidth, whatever the number of
+flows. The FATPIPE behavior allows to describe big backbones that
+won't affect performances (except latency). Finally a link can be
+considered as FULLDUPLEX, that means that in the simulator, 2 links
+(one named UP and the other DOWN) will be created for each link, so as
+the transfers from one side to the other will interact similarly as
+TCP when ACK returning packets circulate on the other direction. More
+discussion about it is available in <b>link_ctn</b> description.
 
 \verbatim
  <link id="SWITCH" bandwidth="125000000" latency="5E-5" sharing_policy="FATPIPE" />
@@ -333,16 +482,22 @@ behavior allows to describe big backbones that won't affect performances (except
 
 <b>Expressing dynamicity and failures</b>
 
- As for hosts, it is possible to declare links whose state, bandwidth or latency change over the time. In this case, the bandwidth and latency attributes are respectively replaced by the bandwidth file and latency file attributes and the corresponding text files.
+As for hosts, it is possible to declare links whose state, bandwidth
+or latency change over the time. In this case, the bandwidth and
+latency attributes are respectively replaced by the bandwidth file and
+latency file attributes and the corresponding text files.
 
 \verbatim
  <link id="LINK1" state_file="link1.fail" bandwidth="80000000" latency=".0001" bandwidth_file="link1.bw" latency_file="link1.lat" />
 \endverbatim
 
-It has to be noted that even if the syntax is the same, the semantic of bandwidth and latency trace files
-differs from that of host availability files. Those files do not express availability as a fraction of the available
-capacity but directly in bytes per seconds for the bandwidth and in seconds for the latency. This is because
-most tools allowing to capture traces on real platforms (such as NWS ) express their results this way.
+It has to be noted that even if the syntax is the same, the semantic
+of bandwidth and latency trace files differs from that of host
+availability files. Those files do not express availability as a
+fraction of the available capacity but directly in bytes per seconds
+for the bandwidth and in seconds for the latency. This is because most
+tools allowing to capture traces on real platforms (such as NWS)
+express their results this way.
 
 <b>Example of "link1.bw" file</b>
 \verbatim
@@ -358,13 +513,17 @@ most tools allowing to capture traces on real platforms (such as NWS ) express t
 3 2.0 0.01
 4 3.0 0.001
 \endverbatim
-In this example, the bandwidth varies with a period of 12 seconds while the latency varies with a period of
-5 seconds. At the beginning of simulation, the link’s bandwidth is of 80,000,000 B/s (i.e., 80 Mb/s). After four
-seconds, it drops at 40 Mb/s, and climbs back to 60 Mb/s after eight seconds. It keeps that way until second
-12 (ie, until the end of the period), point at which it loops its behavior (seconds 12-16 will experience 80 Mb/s,
-16-20 40 Mb/s and so on). In the same time, the latency values are 100µs (initial value) on the [0, 1[ time
-interval, 1ms on [1, 2[, 10ms on [2, 3[, 1ms on [3,5[ (i.e., until the end of period). It then loops back, starting
-at 100µs for one second.
+
+In this example, the bandwidth varies with a period of 12 seconds
+while the latency varies with a period of 5 seconds. At the beginning
+of simulation, the link’s bandwidth is of 80,000,000 B/s (i.e., 80
+Mb/s). After four seconds, it drops at 40 Mb/s, and climbs back to 60
+Mb/s after eight seconds. It keeps that way until second 12 (ie, until
+the end of the period), point at which it loops its behavior (seconds
+12-16 will experience 80 Mb/s, 16-20 40 Mb/s and so on). In the same
+time, the latency values are 100µs (initial value) on the [0, 1[ time
+interval, 1ms on [1, 2[, 10ms on [2, 3[, 1ms on [3,5[ (i.e., until the
+end of period). It then loops back, starting at 100µs for one second.
 
 <b>link</b> attributes :
 \li <b>id (mandatory)</b>: the identifier of the link to be used when referring to it.
@@ -385,19 +544,29 @@ As an host, a <b>link</b> tag can also contain the <b>prop</b> tag.
 
 
 \subsection pf_storage Storage
-<b>Note : This is a prototype version that should evolve quickly, this is just some doc valuable only at the time of writing this doc</b>
+
+<b>Note : This is a prototype version that should evolve quickly, this
+is just some doc valuable only at the time of writing this doc</b>
 This section describes the storage management under SimGrid ; nowadays
 it's only usable with MSG. It relies basically on linux-like concepts.
 You also may want to have a look to its corresponding section in \ref
-msg_file_management ; functions access are organized as a POSIX-like interface.
+msg_file_management ; functions access are organized as a POSIX-like
+interface.
 
 \subsubsection pf_sto_conc Storage Main concepts
 Basically there is 3 different entities to know :
-\li the <b>storage_type</b>: here you define some kind of storage that you will instantiate many type on your platform. Think of it like a definition of throughput of a specific disk.
-\li the <b>storage</b>: instance of a <b>storage_type</b>. Defines a new storage of <b>storage_type</b>
-\li the <b>mount</b>: says that the storage is located into this specific resource.
+\li the <b>storage_type</b>: here you define some kind of storage that
+    you will instantiate many type on your platform. Think of it like
+    a definition of throughput of a specific disk. 
+\li the <b>storage</b>: instance of a <b>storage_type</b>. Defines a
+    new storage of <b>storage_type</b>     
+\li the <b>mount</b>: says that the storage is located into this
+    specific resource.
+
+the content of a storage has to be defined in a content file that
+contains the content. The path to this file has to be passed within
+the <b>content</b> attribute . Here is a way to generate it:
 
-the content of a storage has to be defined in a content file that contains the content. The path to this file has to be passed within the <b>content</b> attribute . Here is a way to generate it:
 \verbatim
 find /path/you/want -type f -exec ls -l {} \; 2>/dev/null > ./content.txt
 \endverbatim
@@ -406,72 +575,120 @@ find /path/you/want -type f -exec ls -l {} \; 2>/dev/null > ./content.txt
 
 
 <b>storage_type</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the storage_type to be used when referring to it.
-\li <b>model (mandatory)</b>: Unused for now by the simulator (but mandatory, ok)
-\li <b>content</b>: default value 0. The file containing the disk content. (may be moved soon or later to <b>storage</b> tag.
-
-The tag must contains some predefined prop, as may do some other resources tags. This should moved to attributes soon or later.
+\li <b>id (mandatory)</b>: the identifier of the storage_type to be
+    used when referring to it. 
+\li <b>model (mandatory)</b>: Unused for now by the simulator (but
+    mandatory, ok) 
+\li <b>content</b>: default value 0. The file containing the disk
+    content. (may be moved soon or later to <b>storage</b> tag. 
+
+The tag must contains some predefined prop, as may do some other
+resources tags. This should moved to attributes soon or later. 
 <b>storage_type</b> mandatory <b>prop</b> :
 \li <b>Bwrite</b>: value in B/s. Write throughput
 \li <b>Bread</b>: value in B/s. Read throughput
-\li <b>Bconnexion</b>: value in B/s. Connection throughput (i.e. the throughput of the storage connector).
+\li <b>Bconnexion</b>: value in B/s. Connection throughput (i.e. the
+    throughput of the storage connector). 
 
 \subsubsection pf_sto_st storage
 
 <b>storage_type</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the storage to be used when referring to it.
-\li <b>typeId (mandatory)</b>: the identifier of the storage_type that this storage  belongs to.
+\li <b>id (mandatory)</b>: the identifier of the storage to be used
+    when referring to it. 
+\li <b>typeId (mandatory)</b>: the identifier of the storage_type that
+    this storage  belongs to. 
 
 
 \subsubsection pf_sto_mo mount
 
-
 <b>mount</b> attributes :
-\li <b>id (mandatory)</b>: the id of the <b>storage</b> that must be mounted on that computer.
-\li <b>name (mandatory)</b>: the name that will be the logical reference to this disk (the mount point).
+\li <b>id (mandatory)</b>: the id of the <b>storage</b> that must be
+    mounted on that computer. 
+\li <b>name (mandatory)</b>: the name that will be the logical
+    reference to this disk (the mount point). 
 
 \subsubsection pf_sto_mst mstorage
 <b>Note : unused for now</b>
 <b>mstorage</b> attributes :
-\li <b>typeId (mandatory)</b>: the id of the <b>storage</b> that must be mounted on that computer.
-\li <b>name (mandatory)</b>: the name that will be the logical reference to this disk (the mount point).
+\li <b>typeId (mandatory)</b>: the id of the <b>storage</b> that must
+    be mounted on that computer. 
+\li <b>name (mandatory)</b>: the name that will be the logical
+    reference to this disk (the mount point). 
 
 \section pf_routing Routing
 
-In order to run fast, it has been chosen to use static routing within SimGrid. By static, it means that it is calculated once (or almost), and will not change during execution. We chose to do that because it is rare to have a real deficience of a resource ; most of the time, a communication fails because the links are too overloaded, and so your connection stops before the time out, or because the computer at the other end is not answering.
-
-We also chose to use shortests paths algorithms in order to emulate routing. Doing so is consistent with the reality: RIP, OSPF, BGP are all calculating shortest paths. They have some convergence time, but at the end, so when the platform is stable (and this should be the moment you want to simulate something using SimGrid) your packets will follow the shortest paths.
+In order to run fast, it has been chosen to use static routing within
+SimGrid. By static, it means that it is calculated once (or almost),
+and will not change during execution. We chose to do that because it
+is rare to have a real deficience of a resource ; most of the time, a
+communication fails because the links are too overloaded, and so your
+connection stops before the time out, or because the computer at the
+other end is not answering.
+
+We also chose to use shortests paths algorithms in order to emulate
+routing. Doing so is consistent with the reality: RIP, OSPF, BGP are
+all calculating shortest paths. They have some convergence time, but
+at the end, so when the platform is stable (and this should be the
+moment you want to simulate something using SimGrid) your packets will
+follow the shortest paths.
 
 \subsection pf_rm Routing models
 
-Within each AS, you have to define a routing model to use. You have basically 3 main kind of routing models :
-\li Shortest-path based models: you let SimGrid calculates shortest paths and manage it. Behaves more or less as most real life routing.
-\li Manually-entered route models: you'll have to define all routes manually by yourself into the platform description file. Consistent with some manually managed real life routing.
-\li Simple/fast models: those models offers fast, low memory routing algorithms. You should consider to use it if you can make some assumptions about your AS. Routing in this case is more or less ignored
+Within each AS, you have to define a routing model to use. You have
+basically 3 main kind of routing models :
 
-\subsubsection pf_raf The router affair
-
-Expressing routers becomes mandatory when using shortest-path based models or when using ns-3 or the bindings to the GTNetS packet-level simulator instead of the native analytical network model implemented in SimGrid.
+\li Shortest-path based models: you let SimGrid calculates shortest
+    paths and manage it. Behaves more or less as most real life
+    routing.
+\li Manually-entered route models: you'll have to define all routes
+    manually by yourself into the platform description file.
+    Consistent with some manually managed real life routing.
+\li Simple/fast models: those models offers fast, low memory routing
+    algorithms. You should consider to use it if you can make some
+    assumptions about your AS. Routing in this case is more or less
+    ignored
 
-For graph-based shortest path algorithms, routers are mandatory, because both algorithms need a graph, and so we need to have source and destination for each edge.
-
-Routers are naturally an important concept in GTNetS or ns-3 since the way they run the packet routing algorithms is actually simulated. Instead, the
-SimGrid’s analytical models aggregate the routing time with the transfer time.
-Rebuilding a graph representation only from the route information turns to be a very difficult task, because
-of the missing information about how routes intersect. That is why we introduced a \<router\> tag, which is
-simply used to express these intersection points. The only attribute accepted by this tag an id.
-It is important to understand that the \<router\> tag is only used to provide topological information.
+\subsubsection pf_raf The router affair
 
-To express those topological information, some <b>route</b> have to be defined saying which link is between which routers. Description or the route syntax is given below, as well as example for the different models.
+Expressing routers becomes mandatory when using shortest-path based
+models or when using ns-3 or the bindings to the GTNetS packet-level
+simulator instead of the native analytical network model implemented
+in SimGrid.
+
+For graph-based shortest path algorithms, routers are mandatory,
+because both algorithms need a graph, and so we need to have source
+and destination for each edge.
+
+Routers are naturally an important concept in GTNetS or ns-3 since the
+way they run the packet routing algorithms is actually simulated.
+Instead, the SimGrid’s analytical models aggregate the routing time
+with the transfer time. Rebuilding a graph representation only from
+the route information turns to be a very difficult task, because of
+the missing information about how routes intersect. That is why we
+introduced a \<router\> tag, which is simply used to express these
+intersection points. The only attribute accepted by this tag an id. It
+is important to understand that the \<router\> tag is only used to
+provide topological information.
+
+To express those topological information, some <b>route</b> have to be
+defined saying which link is between which routers. Description or the
+route syntax is given below, as well as example for the different
+models.
 
 \subsubsection pf_rm_sh Shortest-path based models
 
-Here is the complete list of such models, that computes routes using classic shortest-paths algorithms. How to choose the best suited algorithm is discussed later in the section devoted to it.
-\li <b>Floyd</b>: Floyd routing data. Pre-calculates all routes once.
-\li <b>Dijkstra</b>: Dijkstra routing data ,calculating routes when necessary.
-\li <b>DijkstraCache</b>: Dijkstra routing data. Handle some cache for already calculated routes.
+Here is the complete list of such models, that computes routes using
+classic shortest-paths algorithms. How to choose the best suited
+algorithm is discussed later in the section devoted to it.
 
-All those shortest-path models are instanciated the same way. Here are some example of it:
+\li <b>Floyd</b>: Floyd routing data. Pre-calculates all routes once. 
+\li <b>Dijkstra</b>: Dijkstra routing data ,calculating routes when
+    necessary. 
+\li <b>DijkstraCache</b>: Dijkstra routing data. Handle some cache for
+    already calculated routes. 
+
+All those shortest-path models are instanciated the same way. Here are
+some example of it:
 
 Floyd example :
 \verbatim
@@ -495,8 +712,9 @@ Floyd example :
 
 </AS>
 \endverbatim
-ASroute given at the end gives a topological information : link1 is between router1 and host1.
 
+ASroute given at the end gives a topological information: link1 is
+between router1 and host1.
 
 Dijsktra example :
 \verbatim
@@ -529,7 +747,12 @@ DijsktraCache example :
 \subsubsection pf_rm_me Manually-entered route models
 
 \li <b>Full</b>: You have to enter all necessary routes manually
-\li <b>RuleBased</b>: Rule-Based routing data; same as Full except you can use regexp to express route. As SimGrid has to evaluate the regexp, it's slower than Full, but requires less memory. Regexp syntax is similar as <a href="http://www.pcre.org">pcre</a> ones, as this is the lib SimGrid use to do so.
+\li <b>RuleBased</b>: Rule-Based routing data; same as Full except you
+    can use regexp to express route. As SimGrid has to evaluate the
+    regexp, it's slower than Full, but requires less memory. Regexp
+    syntax is similar as <a href="http://www.pcre.org">pcre</a> ones,
+    as this is the lib SimGrid use to do so.
+
 
 Full example :
 \verbatim
@@ -584,30 +807,39 @@ RuleBased example :
                </AS>
 \endverbatim
 
-The example upper contains $1src and $1dst. It's simply a reference to string matching regexp enclosed by "()" within respectively <b>src</b> and <b>dst</b> attributes. If they were more than 1 "()", then you could referer to it as $2src, $3src and so on.
+The example upper contains $1src and $1dst. It's simply a reference to
+string matching regexp enclosed by "()" within respectively <b>src</b>
+and <b>dst</b> attributes. If they were more than 1 "()", then you
+could referer to it as $2src, $3src and so on.
 
 \subsubsection pf_rm_sf Simple/fast models
 
-\li <b>none</b>: No routing (Unless you know what you are doing, avoid using this mode in combination with a non Constant network model).
+\li <b>none</b>: No routing (Unless you know what you are doing, avoid
+using this mode in combination with a non Constant network model). 
 None Example :
 \verbatim
 <AS id="exitAS"  routing="none">
        <router id="exit_gateway"/>
 </AS>\endverbatim
 
-\li <b>Vivaldi</b>: Vivaldi routing, so when you want to use coordinates. See the corresponding section P2P below for details.
-\li <b>Cluster</b>: Cluster routing, specific to cluster tag, should not be used, except internally.
+\li <b>Vivaldi</b>: Vivaldi routing, so when you want to use
+    coordinates. See the corresponding section P2P below for details. 
+\li <b>Cluster</b>: Cluster routing, specific to cluster tag, should
+    not be used, except internally. 
 
 \subsection ps_dec Defining routes
 
-The principle of route definition is the same for the 4 available tags for doing it. Those for tags are:
+The principle of route definition is the same for the 4 available tags
+for doing it. Those for tags are:
 
 \li <b>route</b>: to define route between host/router
 \li <b>ASroute</b>: to define route between AS
-\li <b>bypassRoute</b>: to bypass normal routes as calculated by the network model between host/router
+\li <b>bypassRoute</b>: to bypass normal routes as calculated by the
+    network model between host/router 
 \li <b>bypassASroute</b>: same as bypassRoute, but for AS
 
-Basically all those tags will contain an (ordered) list of references to link that compose the route you want to define.
+Basically all those tags will contain an (ordered) list of references
+to link that compose the route you want to define.
 
 Consider the example below:
 
@@ -619,9 +851,17 @@ Consider the example below:
    </route>
 \endverbatim
 
-The route here fom host Alice to Bob will be first link1, then link2, and finally link3. What about the reverse route ? <b>route</b> and <b>ASroute</b> have an optional attribute <b>symmetrical</b>, that can be either YES or NO. YES means that the reverse route is the same route in the inverse order, and is setted to YES by default. Note that this is not the case for bypass*Route, as it is more probable that you want to bypass only one default route.
+The route here fom host Alice to Bob will be first link1, then link2,
+and finally link3. What about the reverse route ? <b>route</b> and
+<b>ASroute</b> have an optional attribute <b>symmetrical</b>, that can
+be either YES or NO. YES means that the reverse route is the same
+route in the inverse order, and is setted to YES by default. Note that
+this is not the case for bypass*Route, as it is more probable that you
+want to bypass only one default route.
 
-For an ASroute, things are just sligthly more complicated, as you have to give the id of the gateway which is inside the AS you're talking about you want to access ... So it looks like this :
+For an ASroute, things are just sligthly more complicated, as you have
+to give the id of the gateway which is inside the AS you're talking
+about you want to access ... So it looks like this :
 
 
 \verbatim
@@ -631,26 +871,40 @@ For an ASroute, things are just sligthly more complicated, as you have to give t
   </ASroute>
 \endverbatim
 
-gw == gateway, so when any message are trying to go from AS1 to AS2, it means that it must pass through router1 to get out of the AS, then pass through link1, and get into AS2 by being received by router2. router1 must belong to AS1 and router2 must belong to AS2.
+gw == gateway, so when any message are trying to go from AS1 to AS2,
+it means that it must pass through router1 to get out of the AS, then
+pass through link1, and get into AS2 by being received by router2.
+router1 must belong to AS1 and router2 must belong to AS2.
 
 \subsubsection pf_linkctn link_ctn
 
-a <b>link_ctn</b> is the tag that is used in order to reference a <b>link</b> in a route. Its id is the link id it refers to.
+a <b>link_ctn</b> is the tag that is used in order to reference a
+<b>link</b> in a route. Its id is the link id it refers to.
 
 <b>link_ctn</b> attributes :
 \li <b>id (mandatory)</b>: Id of the link this tag refers to
-\li <b>direction</b>: if the link referenced by <b>id</b> has been declared as FULLDUPLEX, this is used to indicate in which direction the route you're defining is going through this link. Possible values "UP" or "DOWN".
+\li <b>direction</b>: if the link referenced by <b>id</b> has been
+    declared as FULLDUPLEX, this is used to indicate in which
+    direction the route you're defining is going through this link.
+    Possible values "UP" or "DOWN".
 
 \subsubsection pf_asro ASroute
 
-ASroute tag purpose is to let people write manually their routes between AS. It's usefull when you're in Full or Rule-based model.
+ASroute tag purpose is to let people write manually their routes
+between AS. It's usefull when you're in Full or Rule-based model.
 
 <b>ASroute</b> attributes :
 \li <b>src (mandatory)</b>: the source AS id.
 \li <b>dst (mandatory)</b>: the destination AS id.
-\li <b>gw_src (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b src AS or into one of the AS it includes.
-\li <b>gw_dst (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b dst AS or into one of the AS it includes.
-\li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
+\li <b>gw_src (mandatory)</b>: the gateway to be used within the AS.
+    Can be any <b>host</b> or \b router defined into the \b src AS or
+    into one of the AS it includes.
+\li <b>gw_dst (mandatory)</b>: the gateway to be used within the AS.
+    Can be any <b>host</b> or \b router defined into the \b dst AS or
+    into one of the AS it includes.
+\li <b>symmetrical</b>: if the route is symmetric, the reverse route
+    will be the opposite of the one defined. Can be either YES or NO,
+    default is YES.
 
 <b>Example of ASroute with RuleBased</b>
 \verbatim
@@ -688,13 +942,20 @@ ASroute tag purpose is to let people write manually their routes between AS. It'
 \endverbatim
 
 \subsubsection pf_ro route
-The principle is the same as ASroute : <b>route</b> contains list of links that are in the path between src and dst, except that it is for routes between a src that can be either <b>host</b> or \b router and a dst that can be either <b>host</b> or \b router. Usefull for Full and RuleBased, as well as for the shortest-paths based models, where you have to give topological informations.
+The principle is the same as ASroute : <b>route</b> contains list of
+links that are in the path between src and dst, except that it is for
+routes between a src that can be either <b>host</b> or \b router and a
+dst that can be either <b>host</b> or \b router. Usefull for Full and
+RuleBased, as well as for the shortest-paths based models, where you
+have to give topological informations.
 
 
 <b>route</b> attributes :
 \li <b>src (mandatory)</b>: the source id.
 \li <b>dst (mandatory)</b>: the destination id.
-\li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
+\li <b>symmetrical</b>: if the route is symmetric, the reverse route
+    will be the opposite of the one defined. Can be either YES or NO,
+    default is YES.
 
 <b>route example in Full</b>
 \verbatim
@@ -709,18 +970,35 @@ The principle is the same as ASroute : <b>route</b> contains list of links that
      <link_ctn id="3"/>
    </route>
 \endverbatim
-Note that when using route to give topological information, you have to give routes with one link only in it, as SimGrid needs to know which host are at the end of the link.
+Note that when using route to give topological information, you have
+to give routes with one link only in it, as SimGrid needs to know
+which host are at the end of the link.
 
 \subsubsection pf_byro bypassASroute
-<b>Note : bypassASroute and bypassRoute are under rewriting to perform better ; so you may not use it yet</b>
-As said before, once you choose a model, it (if so) calculates routes for you. But maybe you want to define some of your routes, which will be specific. You may also want to bypass some routes defined in lower level AS at an upper stage : <b>bypassASroute</b> is the tag you're looking for. It allows to bypass routes defined between already defined between AS (if you want to bypass route for a specific host, you should just use byPassRoute). The principle is the same as ASroute : <b>bypassASroute</b> contains list of links that are in the path between src and dst.
+
+<b>Note : bypassASroute and bypassRoute are under rewriting to perform
+better ; so you may not use it yet</b> As said before, once you choose
+a model, it (if so) calculates routes for you. But maybe you want to
+define some of your routes, which will be specific. You may also want
+to bypass some routes defined in lower level AS at an upper stage :
+<b>bypassASroute</b> is the tag you're looking for. It allows to
+bypass routes defined between already defined between AS (if you want
+to bypass route for a specific host, you should just use byPassRoute).
+The principle is the same as ASroute : <b>bypassASroute</b> contains
+list of links that are in the path between src and dst.
 
 <b>bypassASroute</b> attributes :
 \li <b>src (mandatory)</b>: the source AS id.
 \li <b>dst (mandatory)</b>: the destination AS id.
-\li <b>gw_src (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b src AS or into one of the AS it includes.
-\li <b>gw_dst (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b dst AS or into one of the AS it includes.
-\li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
+\li <b>gw_src (mandatory)</b>: the gateway to be used within the AS.
+    Can be any <b>host</b> or \b router defined into the \b src AS or
+    into one of the AS it includes.
+\li <b>gw_dst (mandatory)</b>: the gateway to be used within the AS.
+    Can be any <b>host</b> or \b router defined into the \b dst AS or
+    into one of the AS it includes.
+\li <b>symmetrical</b>: if the route is symmetric, the reverse route
+    will be the opposite of the one defined. Can be either YES or NO,
+    default is YES.
 
 <b>bypassASroute Example</b>
 \verbatim
@@ -732,13 +1010,22 @@ As said before, once you choose a model, it (if so) calculates routes for you. B
 \endverbatim
 
 \subsubsection pf_byro bypassRoute
-<b>Note : bypassASRoute and bypassRoute are under rewriting to perform better ; so you may not use it yet</b>
-As said before, once you choose a model, it (if so) calculates routes for you. But maybe you want to define some of your routes, which will be specific. You may also want to bypass some routes defined in lower level AS at an upper stage : <b>bypassRoute</b> is the tag you're looking for. It allows to bypass routes defined between <b>host/router</b>. The principle is the same as route : <b>bypassRoute</b> contains list of links references of links that are in the path between src and dst.
+<b>Note : bypassASRoute and bypassRoute are under rewriting to perform
+better ; so you may not use it yet</b> As said before, once you choose
+a model, it (if so) calculates routes for you. But maybe you want to
+define some of your routes, which will be specific. You may also want
+to bypass some routes defined in lower level AS at an upper stage :
+<b>bypassRoute</b> is the tag you're looking for. It allows to bypass
+routes defined between <b>host/router</b>. The principle is the same
+as route : <b>bypassRoute</b> contains list of links references of
+links that are in the path between src and dst.
 
 <b>bypassRoute</b> attributes :
 \li <b>src (mandatory)</b>: the source AS id.
 \li <b>dst (mandatory)</b>: the destination AS id.
-\li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
+\li <b>symmetrical</b>: if the route is symmetric, the reverse route
+    will be the opposite of the one defined. Can be either YES or NO,
+    default is YES.
 
 <b>bypassRoute Example</b>
 \verbatim
@@ -752,15 +1039,36 @@ As said before, once you choose a model, it (if so) calculates routes for you. B
 
 \subsection pb_baroex Basic Routing Example
 
-Let's say you have an AS named AS_Big that contains two other AS, AS_1 and AS_2. If you want to make an host (h1) from AS_1 with another one (h2) from  AS_2 then you'll have to proceed as follow:
-\li First, you have to ensure that a route is defined from h1 to the AS_1's exit gateway and from h2 to AS_2's exit gateway.
-\li Then, you'll have to define a route between AS_1 to AS_2. As those AS are both resources belonging to AS_Big, then it has to be done at AS_big level. To define such a route, you have to give the source AS (AS_1), the destination AS (AS_2), and their respective gateway (as the route is effectively defined between those two entry/exit points). Elements of this route can only be elements belonging to AS_Big, so links and routers in this route should be defined inside AS_Big. If you choose some shortest-path model, this route will be computed automatically.
+Let's say you have an AS named AS_Big that contains two other AS, AS_1
+and AS_2. If you want to make an host (h1) from AS_1 with another one
+(h2) from AS_2 then you'll have to proceed as follow:
+\li First, you have to ensure that a route is defined from h1 to the
+    AS_1's exit gateway and from h2 to AS_2's exit gateway.
+\li Then, you'll have to define a route between AS_1 to AS_2. As those
+    AS are both resources belonging to AS_Big, then it has to be done
+    at AS_big level. To define such a route, you have to give the
+    source AS (AS_1), the destination AS (AS_2), and their respective
+    gateway (as the route is effectively defined between those two
+    entry/exit points). Elements of this route can only be elements
+    belonging to AS_Big, so links and routers in this route should be
+    defined inside AS_Big. If you choose some shortest-path model,
+    this route will be computed automatically.
 
 As said before, there are mainly 2 tags for routing :
 \li <b>ASroute</b>: to define routes between two  <b>AS</b>
 \li <b>route</b>: to define routes between two <b>host/router</b>
 
-As we are dealing with routes between AS, it means that those we'll have some definition at AS_Big level. Let consider AS_1  contains 1 host, 1 link and one router and AS_2 3 hosts, 4 links and one router. There will be a central router, and a cross-like topology. At the end of the crosses arms, you'll find the 3 hosts and the router that will act as a gateway. We have to define routes inside those two AS. Let say that AS_1 contains full routes, and AS_2 contains some Floyd routing (as we don't want to bother with defining all routes). As we're using some shortest path algorithms to  route into AS_2, we'll then have to define some <b>route</b> to gives some topological information to SimGrid. Here is a file doing it all :
+As we are dealing with routes between AS, it means that those we'll
+have some definition at AS_Big level. Let consider AS_1 contains 1
+host, 1 link and one router and AS_2 3 hosts, 4 links and one router.
+There will be a central router, and a cross-like topology. At the end
+of the crosses arms, you'll find the 3 hosts and the router that will
+act as a gateway. We have to define routes inside those two AS. Let
+say that AS_1 contains full routes, and AS_2 contains some Floyd
+routing (as we don't want to bother with defining all routes). As
+we're using some shortest path algorithms to route into AS_2, we'll
+then have to define some <b>route</b> to gives some topological
+information to SimGrid. Here is a file doing it all :
 
 \verbatim
 <AS  id="AS_Big"  routing="Dijsktra">
@@ -800,17 +1108,26 @@ As we are dealing with routes between AS, it means that those we'll have some de
 
 \section pf_other_tags Tags not (directly) describing the platform
 
-There are 3 tags, that you can use inside a \<platform\> tag that are not describing the platform:
-\li random: it allows you to define random generators you want to use for your simulation.
-\li config: it allows you to pass some configuration stuff like, for example, the network model and so on. It follows the
-\li include: simply allows you to include another file into the current one.
+There are 3 tags, that you can use inside a \<platform\> tag that are
+not describing the platform: 
+\li random: it allows you to define random generators you want to use
+    for your simulation. 
+\li config: it allows you to pass some configuration stuff like, for
+    example, the network model and so on. It follows the 
+\li include: simply allows you to include another file into the
+    current one. 
 
 \subsection pf_conf config
 <b>config</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the config to be used when referring to it.
+\li <b>id (mandatory)</b>: the identifier of the config to be used
+    when referring to it. 
 
 
-<b>config</b> tag only purpose is to include <b>prop</b> tags. Valid id are basically the same as the list of possible parameters you can use by command line, except that "/" are used for namespace definition. See the \ref options config and options page for more information.
+<b>config</b> tag only purpose is to include <b>prop</b> tags. Valid
+id are basically the same as the list of possible parameters you can
+use by command line, except that "/" are used for namespace
+definition. See the \ref options config and options page for more
+information.
 
 
 <b>config example</b>
@@ -836,12 +1153,19 @@ There are 3 tags, that you can use inside a \<platform\> tag that are not descri
 Not yet in use, and possibly subject to huge modifications.
 
 \subsection pf_incl include
-<b>include</b> tag allows to import into a file platform parts located in another file. This is done with the intention to help people combine their different AS and provide new platforms. Those files should contains XML part that contains either <b>include,cluster,peer,AS,trace,trace_connect</b> tags.
+<b>include</b> tag allows to import into a file platform parts located
+in another file. This is done with the intention to help people
+combine their different AS and provide new platforms. Those files
+should contains XML part that contains either
+<b>include,cluster,peer,AS,trace,trace_connect</b> tags.  
 
 <b>include</b> attributes :
-\li <b>file (mandatory)</b>: filename of the file to include. Possible values : absolute or relative path, syntax similar to the one in use on your system.
+\li <b>file (mandatory)</b>: filename of the file to include. Possible
+    values: absolute or relative path, syntax similar to the one in
+    use on your system. 
 
-<b>Note</b> : due to some obscure technical reasons, you have to open and close tag in order to let it work.
+<b>Note</b>: due to some obscure technical reasons, you have to open
+and close tag in order to let it work. 
 <b>include Example</b>
 \verbatim
 <?xml version='1.0'?>
@@ -855,7 +1179,12 @@ Not yet in use, and possibly subject to huge modifications.
 \endverbatim
 
 \subsection pf_tra trace and trace_connect
-Both tags are an alternate way to passe availability, state, and so on files to entity. Instead of refering to the file directly in the host, link, or cluster tag, you proceed by defining a trace with an id corresponding to a file, later an host/link/cluster, and finally using trace_connect you say that the file trace must be used by the entity. Get it ? Let's have a look at an example :
+Both tags are an alternate way to passe availability, state, and so on
+files to entity. Instead of refering to the file directly in the host,
+link, or cluster tag, you proceed by defining a trace with an id
+corresponding to a file, later an host/link/cluster, and finally using
+trace_connect you say that the file trace must be used by the entity.
+Get it ? Let's have a look at an example : 
 
 \verbatim
 <AS  id="AS0"  routing="Full">
@@ -865,13 +1194,19 @@ Both tags are an alternate way to passe availability, state, and so on files to
   <trace_connect trace="myTrace" element="bob" kind="POWER"/>
 \endverbatim
 
-All constraints you have is that <b>trace_connect</b> is after <b>trace</b> and <b>host</b> definitions.
+All constraints you have is that <b>trace_connect</b> is after
+<b>trace</b> and <b>host</b> definitions.
 
 
 <b>trace</b> attributes :
-\li <b>id (mandatory)</b>: the identifier of the trace to be used when referring to it.
-\li <b>file</b>: filename of the file to include. Possible values : absolute or relative path, syntax similar to the one in use on your system. If ommited, the system expects that you provide the trace values inside the trace tags (see below).
-\li <b>trace periodicity (mandatory)</b>: trace periodicity, same definition as in hosts (see upper for details).
+\li <b>id (mandatory)</b>: the identifier of the trace to be used when
+    referring to it.
+\li <b>file</b>: filename of the file to include. Possible values :
+    absolute or relative path, syntax similar to the one in use on
+    your system. If ommited, the system expects that you provide the
+    trace values inside the trace tags (see below).
+\li <b>trace periodicity (mandatory)</b>: trace periodicity, same
+    definition as in hosts (see upper for details).
 
 Here is an example  of trace when no file name is provided:
 
@@ -884,7 +1219,9 @@ Here is an example  of trace when no file name is provided:
 \endverbatim
 
 <b>trace_connect</b> attributes :
-\li <b>kind</b>: the type of trace, possible values <b>HOST_AVAIL|POWER|LINK_AVAIL|BANDWIDTH|LATENCY,</b>  default: <b>HOST_AVAIL</b>
+\li <b>kind</b>: the type of trace, possible values
+    <b>HOST_AVAIL|POWER|LINK_AVAIL|BANDWIDTH|LATENCY,</b>  default:
+    <b>HOST_AVAIL</b>  
 \li <b>trace (mandatory)</b>: the identifier of the trace referenced.
 \li <b>element (mandatory)</b>: the identifier of the entity referenced.
 
@@ -892,13 +1229,28 @@ Here is an example  of trace when no file name is provided:
 
 \section pf_hints Hints and tips, or how to write a platform efficiently
 
-Now you should know at least the syntax dans be able to create a platform. However, after having ourselves wrote some platforms, there are some best practices you should pay attention to in order to produce good platform and some choices you can make in order to have faster simulations. Here's some hints and tips, then.
+Now you should know at least the syntax dans be able to create a
+platform. However, after having ourselves wrote some platforms, there
+are some best practices you should pay attention to in order to
+produce good platform and some choices you can make in order to have
+faster simulations. Here's some hints and tips, then.
 
 \subsection pf_as_h AS Hierarchy
-The AS design allows SimGrid to go fast, because computing route is done only for the set of resources defined in this AS. If you're using only a big AS containing all resource with no AS into it and you're using Full model, then ... you'll loose all interest into it. On the other hand, designing a binary tree of AS with, at the lower level, only one host, then you'll also loose all the good AS hierarchy can give you. Remind you should always be "reasonable" in your platform definition when choosing the hierarchy. A good choice if you try to describe a real life platform is to follow the AS described in reality, since this kind og trade-off works well for real life platforms.
+The AS design allows SimGrid to go fast, because computing route is
+done only for the set of resources defined in this AS. If you're using
+only a big AS containing all resource with no AS into it and you're
+using Full model, then ... you'll loose all interest into it. On the
+other hand, designing a binary tree of AS with, at the lower level,
+only one host, then you'll also loose all the good AS hierarchy can
+give you. Remind you should always be "reasonable" in your platform
+definition when choosing the hierarchy. A good choice if you try to
+describe a real life platform is to follow the AS described in
+reality, since this kind og trade-off works well for real life
+platforms.
 
 \subsection pf_exit_as Exit AS: why and how
-Users that have looked at some of our platforms may have notice a non-intuitive schema ... Something like that :
+Users that have looked at some of our platforms may have notice a
+non-intuitive schema ... Something like that :
 
 
 \verbatim
@@ -939,11 +1291,21 @@ Users that have looked at some of our platforms may have notice a non-intuitive
 </AS>
 \endverbatim
 
-In the AS_4, you have an exitAS_4 defined, containing only one router, and routes defined to that AS from all other AS (as cluster is only a shortcut for an AS, see cluster description for details). If there was an upper AS, it would define routes to and from AS_4 with the gateway router_4. It's just because, as we did not allowed (for performances issues) to have routes from an AS to a single host/router, you have to enclose your gateway, when you have AS included in your AS, within an AS to define routes to it.
-
+In the AS_4, you have an exitAS_4 defined, containing only one router,
+and routes defined to that AS from all other AS (as cluster is only a
+shortcut for an AS, see cluster description for details). If there was
+an upper AS, it would define routes to and from AS_4 with the gateway
+router_4. It's just because, as we did not allowed (for performances
+issues) to have routes from an AS to a single host/router, you have to
+enclose your gateway, when you have AS included in your AS, within an
+AS to define routes to it.
 
 \subsection pf_P2P_tags P2P or how to use coordinates
-SimGrid allows you to use some coordinated-based system, like vivaldi, to describe a platform. The main concept is that you have some peers that are located somewhere: this is the function of the  <b>coordinates</b> of the \<peer\> or \<host\> tag. There's nothing complicated in using it, here is an example of it:
+SimGrid allows you to use some coordinated-based system, like vivaldi,
+to describe a platform. The main concept is that you have some peers
+that are located somewhere: this is the function of the 
+<b>coordinates</b> of the \<peer\> or \<host\> tag. There's nothing
+complicated in using it, here is an example of it:
 
 \verbatim
 <?xml version='1.0'?>
@@ -962,27 +1324,53 @@ SimGrid allows you to use some coordinated-based system, like vivaldi, to descri
 </platform>
 \endverbatim
 
-Coordinates are then used to calculate latency between two hosts by calculating the euclidian distance between the two hosts coordinates. The results express the latency in ms.
+Coordinates are then used to calculate latency between two hosts by
+calculating the euclidian distance between the two hosts coordinates.
+The results express the latency in ms.
 
 \subsection pf_wisely Choosing wisely the routing model to use
 
 
-Choosing wisely the routing model to use can significantly fasten your simulation/save your time when writing the platform/save tremendeous disk space. Here is the list of available model and their characteristics (lookup : time to resolve a route):
-
-\li <b>Full</b>: Full routing data (fast, large memory requirements, fully expressive)
-\li <b>Floyd</b>: Floyd routing data (slow initialization, fast lookup, lesser memory requirements, shortest path routing only). Calculates all routes at once at the beginning.
-\li <b>Dijkstra</b>: Dijkstra routing data (fast initialization, slow lookup, small memory requirements, shortest path routing only). Calculates a route when necessary.
-\li <b>DijkstraCache</b>: Dijkstra routing data (fast initialization, fast lookup, small memory requirements, shortest path routing only). Same as Dijkstra, except it handles a cache for latest used routes.
-\li <b>none</b>: No routing (usable with Constant network only). Defines that there is no routes, so if you try to determine a route without constant network within this AS, SimGrid will raie an exception.
-\li <b>RuleBased</b>: Rule-Based routing data (fast initialisation, relatively slow lookup, moderate memory requirements, fully expressive): uses regexp to define routes;
+Choosing wisely the routing model to use can significantly fasten your
+simulation/save your time when writing the platform/save tremendeous
+disk space. Here is the list of available model and their
+characteristics (lookup : time to resolve a route):
+
+\li <b>Full</b>: Full routing data (fast, large memory requirements,
+    fully expressive)    
+\li <b>Floyd</b>: Floyd routing data (slow initialization, fast
+    lookup, lesser memory requirements, shortest path routing only).
+    Calculates all routes at once at the beginning.
+\li <b>Dijkstra</b>: Dijkstra routing data (fast initialization, slow
+    lookup, small memory requirements, shortest path routing only).
+    Calculates a route when necessary.
+\li <b>DijkstraCache</b>: Dijkstra routing data (fast initialization,
+    fast lookup, small memory requirements, shortest path routing
+    only). Same as Dijkstra, except it handles a cache for latest used
+    routes.
+\li <b>none</b>: No routing (usable with Constant network only).
+    Defines that there is no routes, so if you try to determine a
+    route without constant network within this AS, SimGrid will raie
+    an exception.
+\li <b>RuleBased</b>: Rule-Based routing data (fast initialisation,
+    relatively slow lookup, moderate memory requirements, fully
+    expressive): uses regexp to define routes;
 \li <b>Vivaldi</b>: Vivaldi routing, so when you want to use coordinates
-\li <b>Cluster</b>: Cluster routing, specific to cluster tag, should not be used.
-
-
+\li <b>Cluster</b>: Cluster routing, specific to cluster tag, should
+    not be used. 
 
 \subsection pf_switch Hey, I want to describe a switch but there is no switch tag !
 
-Actually we did not include swith tag, ok. But when you're trying to simulate a switch, the only major impact it has when you're using fluid model (and SimGrid uses fluid model unless you activate GTNetS, ns-3, or constant network mode) is the impact of the upper limit of the switch motherboard speed that will eventually be reached if you're using intensively your switch. So, the switch impact is similar to a link one. That's why we are used to describe a switch using a link tag (as a link is not an edge by a hyperedge, you can connect more than 2 other links to it).
+Actually we did not include swith tag, ok. But when you're trying to
+simulate a switch, the only major impact it has when you're using
+fluid model (and SimGrid uses fluid model unless you activate GTNetS,
+ns-3, or constant network mode) is the impact of the upper limit of
+the switch motherboard speed that will eventually be reached if you're
+using intensively your switch. So, the switch impact is similar to a
+link one. That's why we are used to describe a switch using a link tag
+(as a link is not an edge by a hyperedge, you can connect more than 2
+other links to it).
+
 \subsection pf_platform_multipath How to express multipath routing in platform files?
 
 It is unfortunately impossible to express the fact that there is more
similarity index 98%
rename from doc/user_guide/doxygen/pls.doc
rename to doc/doxygen/pls.doc
index adf9661..2ce0e11 100644 (file)
@@ -69,7 +69,7 @@ make opt
 
 \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
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/<userhome>/usr/lib/
 mkdir /<userhome>/usr/include/gtnets
 cp -fr SRC/*.h /<userhome>/usr/include/gtnets
 \endverbatim
diff --git a/doc/doxygen/simgrid_modules.map b/doc/doxygen/simgrid_modules.map
new file mode 100644 (file)
index 0000000..68c2186
--- /dev/null
@@ -0,0 +1,10 @@
+<IMG style=border:0px SRC="simgrid_modules.png" USEMAP="#simgrid_modules">
+<MAP NAME="simgrid_modules">
+<AREA COORDS="536,64,574,281" href="../../ref_guide/html/group__TRACE__API.html" ALT="TRACE">
+<AREA COORDS="294,7,496,42" href="/contrib.html" ALT="Contrib">
+<AREA COORDS="10,70,171,152" href="../../ref_guide/html/group__MSG__API.html" ALT="MSG">
+<AREA COORDS="10,161,517,221" href="../../ref_guide/html/group__SURF__API.html" ALT="SMPI">
+<AREA COORDS="354,70,517,152" href="../../ref_guide/html/group__SD__API.html" ALT="SimDag">
+<AREA COORDS="180,70,344,152" href="../../ref_guide/html/group__SMPI__API.html" ALT="SMPI">
+<AREA SHAPE="poly" COORDS="1,64,1,281,527,281,527,64" href="../../ref_guide/html/group__XBT__API.html" ALT="XBT">
+</MAP>
similarity index 95%
rename from doc/user_guide/doxygen/use.doc
rename to doc/doxygen/use.doc
index f5bbdc0..e70c9d6 100644 (file)
@@ -1,19 +1,31 @@
 /*! \page use Using SimGrid
 
-SimGrid comes with many examples provided in the examples/ directory. Those examples are described in section \ref MSG_examples . Those examples are commented and should be easy to understand. for a first step into SimGrid we also provide some more detailed examples in the sections below. 
+This page is under work -- sorry for the inconvinience (FIXME).
+
+- @subpage platform
+- @subpage deployment
+- @subpage tracing
+- @subpage options
+- @subpage help
+
+\tableofcontents
+
+SimGrid comes with many examples provided in the examples/ directory.
+Those examples are described in section \ref MSG_examples . Those
+examples are commented and should be easy to understand. for a first
+step into SimGrid we also provide some more detailed examples in the
+sections below. 
 
 \htmlonly
 You should also check our online <a href="http://simgrid.gforge.inria.fr/tutorials.html"> tutorial section</a> that contains a generic tutorial about using SimGrid. 
 \endhtmlonly
 
-
 \section using_msg Using MSG
+
 \htmlonly
 You should also check our online <a href="http://simgrid.gforge.inria.fr/tutorials.html"> tutorial section</a> that contains a dedicated tutorial. 
 \endhtmlonly
 
-
-
 Here are some examples on how to use MSG, the most used API.
 
 tr
diff --git a/doc/index.doc b/doc/index.doc
deleted file mode 100644 (file)
index 36d553e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*! 
-@mainpage
-
-\htmlonly
-<center>
-<table width="100%">
-       <tr>
-               <td valign="middle" align="left">
-               </td>
-               <td valign="middle" align="left">
-               </td>
-       </tr>
-</table>
-</center>
-
-Currently, the documentation contains 3 main sections:
-<ul>
-  <li><h2><a href="../user_guide/html/index.html">SimGrid User Guide</a></h2></li>
-  <li><h2><a href="../ref_guide/html/index.html">SimGrid Reference Manual</a>.</h2></li>
-  <li><h2><a href="../dev_guide/html/index.html">SimGrid Developer Manual</a>.</h2></li>
-  <li><h2>You can also retrieve tutorials from <a href="http://simgrid.gforge.inria.fr/faq.html">here</a>.</h2></li> 
-</ul>
-\endhtmlonly
-Other information sources: 
-  - The official webpage is <a href="http://simgrid.gforge.inria.fr/">simgrid.gforge.inria.fr</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="http://simgrid.gforge.inria.fr/download.html">here</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>
-</center>
-\endhtmlonly
-
-*/
diff --git a/doc/ref_guide/doxygen/RefGuideDoxyfile.in b/doc/ref_guide/doxygen/RefGuideDoxyfile.in
deleted file mode 100644 (file)
index 4bc54db..0000000
+++ /dev/null
@@ -1,1831 +0,0 @@
-
-#               @WARNING@
-
-# Doxyfile 1.8.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = SimGrid
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-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          = "Scalable Simulation of Distributed Systems - Reference Manual"
-
-# 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
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = ../
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        = @srcdir@
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-#TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-#MARKDOWN_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-#INLINE_SIMPLE_STRUCTS  = 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
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-#LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
-#EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            = RefGuideDoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
-#CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = main.doc \                         
-                         modules.doc \
-                         module-xbt.doc \
-                         module-msg.doc \
-                         module-sd.doc \
-                         module-surf.doc \
-                         module-simix.doc \
-                         module-trace.doc \
-                         index-API.doc \
-                         @top_srcdir@/doc/ref_guide/doxygen/logcategories.doc \
-                         @top_srcdir@/src/instr/ \
-                         @top_srcdir@/include/ \
-                         @top_srcdir@/include/msg \
-                         @top_srcdir@/include/xbt \
-                         @top_srcdir@/include/simdag \
-                         @top_srcdir@/include/simgrid \
-                         @top_srcdir@/src/include/surf \
-                         @top_srcdir@/src/xbt/ \
-                         @top_srcdir@/src/surf/ \
-                         @top_srcdir@/src/msg/ \
-                         @top_srcdir@/src/simdag \
-                         @top_srcdir@/src/simix
-
-###################################################
-##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
-###################################################
-
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           = ./ \
-                         @top_srcdir@/src/surf/ \
-                         @top_srcdir@/src/xbt/ \
-                         @top_srcdir@/examples \
-                         @top_srcdir@/testsuite
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = YES
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             = @top_srcdir@/doc
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-#  for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# style sheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = stylesheet.css
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# 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       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-#HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = YES
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-#MATHJAX_EXTENSIONS     =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-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
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = pdfpages
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# 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           =
-
-# 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         = 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           = 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
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-#LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             = DOXYGEN \
-                         DOXYGEN_SKIP_IT \
-                         XBT_PUBLIC= \
-                         XBT_INLINE= \
-                         HAVE_TRACING \
-                         MSG_USE_DEPRECATED
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = ../../shared/doxygen/simgriduserguide.tag=../../user_guide/html/
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = ../../shared/doxygen/simgridrefguide.tag
-
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-#UML_LIMIT_NUM_FIELDS   = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = NO
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-#INTERACTIVE_SVG        = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
diff --git a/doc/ref_guide/doxygen/RefGuideDoxygenLayout.xml b/doc/ref_guide/doxygen/RefGuideDoxygenLayout.xml
deleted file mode 100644 (file)
index 1a80087..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-<doxygenlayout version="1.0">
-  <!-- Navigation index tabs for HTML output -->
-  <navindex>
-    <tab type="modules" visible="no" title="Modules" intro="Below is the list of all functions grouped by modules">
-      <tab type="modules" visible="yes" title="Modules" intro="Below is the list of all functions grouped by modules"/>
-    </tab>
-    <tab type="classes" visible="no" title="Data">
-      <tab type="classes" visible="yes" title="" intro=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
-      <tab type="hierarchy" visible="yes" title="" intro=""/>
-      <tab type="classmembers" visible="yes" title="" intro=""/>
-    </tab>
-    
-  </navindex>
-
-  <!-- Layout definition for a class page -->
-  <class>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <inheritancegraph visible="$CLASS_GRAPH"/>
-    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
-    <allmemberslink visible="yes"/>
-    <memberdecl>
-      <nestedclasses visible="yes" title=""/>
-      <publictypes title=""/>
-      <publicslots title=""/>
-      <signals title=""/>
-      <publicmethods title=""/>
-      <publicstaticmethods title=""/>
-      <publicattributes title=""/>
-      <publicstaticattributes title=""/>
-      <protectedtypes title=""/>
-      <protectedslots title=""/>
-      <protectedmethods title=""/>
-      <protectedstaticmethods title=""/>
-      <protectedattributes title=""/>
-      <protectedstaticattributes title=""/>
-      <packagetypes title=""/>
-      <packagemethods title=""/>
-      <packagestaticmethods title=""/>
-      <packageattributes title=""/>
-      <packagestaticattributes title=""/>
-      <properties title=""/>
-      <events title=""/>
-      <privatetypes title=""/>
-      <privateslots title=""/>
-      <privatemethods title=""/>
-      <privatestaticmethods title=""/>
-      <privateattributes title=""/>
-      <privatestaticattributes title=""/>
-      <friends title=""/>
-      <related title="" subtitle=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <constructors title=""/>
-      <functions title=""/>
-      <related title=""/>
-      <variables title=""/>
-      <properties title=""/>
-      <events title=""/>
-    </memberdef>
-    <usedfiles visible="$SHOW_USED_FILES"/>
-    <authorsection visible="yes"/>
-  </class>
-
-  <!-- Layout definition for a namespace page -->
-  <namespace>
-    <briefdescription visible="yes"/>
-    <memberdecl>
-      <nestednamespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </namespace>
-
-  <!-- Layout definition for a file page -->
-  <file>
-    <briefdescription visible="yes"/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <includegraph visible="$INCLUDE_GRAPH"/>
-    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
-    <sourcelink visible="yes"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection/>
-  </file>
-
-  <!-- Layout definition for a group page -->
-  <group>
-    <briefdescription visible="yes"/>
-    <groupgraph visible="$GROUP_GRAPHS"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <dirs visible="yes" title=""/>
-      <nestedgroups visible="yes" title=""/>
-      <files visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-      <membergroups visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-    <memberdef>
-      <pagedocs/>
-      <inlineclasses title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </group>
-
-  <!-- Layout definition for a directory page -->
-  <directory>
-    <briefdescription visible="yes"/>
-    <directorygraph visible="yes"/>
-    <memberdecl>
-      <dirs visible="yes"/>
-      <files visible="yes"/>
-    </memberdecl>
-    <detaileddescription title=""/>
-  </directory>
-</doxygenlayout>
diff --git a/doc/ref_guide/doxygen/footer.html b/doc/ref_guide/doxygen/footer.html
deleted file mode 100644 (file)
index 80222ad..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- start footer part -->
-<!--BEGIN GENERATE_TREEVIEW-->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    $navpath
-    <li class="footer">$generatedby
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
-  </ul>
-</div>
-<!--END GENERATE_TREEVIEW-->
-<!--BEGIN !GENERATE_TREEVIEW-->
-<hr class="footer"/><address class="footer"><small>
-$generatedby &#160;<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
-</a> $doxygenversion
-</small></address>
-<!--END !GENERATE_TREEVIEW-->
-</body>
-</html>
diff --git a/doc/ref_guide/doxygen/main.doc b/doc/ref_guide/doxygen/main.doc
deleted file mode 100644 (file)
index d6e0e6a..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*! 
-@mainpage SimGrid Reference Manual
-
-<center>
-\htmlonly
-<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
-\htmlonly
-               </td>
-       </tr>
-</table>
-\endhtmlonly
-</center>
-
-\section ref_guide_welcome SimGrid Reference Guide
-
-Welcome to the SimGrid Reference Guide. This guide contains a detailed list of functions, macros and structs provided by SimGrid. This guide is supposed to help you to code your simulator using SimGrid primitives, so it means that you already know the basics of SimGrid, have it installed and so on. If not, please refer either to the SimGrid user guide or to the various tutorials available either online or in the relevant doc section.
-
-\section a_quick_glance SimGrid ?
-
-SimGrid is a toolkit that provides core functionalities for the simulation
-of distributed applications in heterogeneous distributed environments.
-
-The specific goal of the project is to facilitate research in the area of
-distributed and parallel application scheduling on distributed computing
-platforms ranging from simple network of workstations to Computational
-Grids.
-
-
-  - The official webpage is <a href="http://simgrid.gforge.inria.fr/">simgrid.gforge.inria.fr</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="http://simgrid.gforge.inria.fr/download.html">here</a>.
-<br>
-
-<hr>
-
-\section overview Overview of the toolkit components
-
-As depicted by the following diagram, the SimGrid toolkit is basically
-three-layered (click on the picture to jump to a specific component).
-
-
-\htmlonly
-<center>
-\endhtmlonly
-\htmlinclude simgrid_modules.map
-
-\htmlonly
-<br><b>Relationships between the SimGrid components (click to jump to API)</b>
-</center>
-\endhtmlonly
-
-\subsection overview_envs Programmation environments layer
-
-SimGrid provides several programmation environments built on top of a unique
-simulation kernel. Each environment targets a specific audiance and
-constitutes a different paradigm. To choose which of them you want to use,
-you have to think about what you want to do and what would be the result of
-your work.
-
- - If you want to study a theoritical problem and compare several
-   heuristics, you probably want to try <b>\ref MSG_API</b> (yet another
-   historical name). It was designed exactly to that extend and should allow
-   you to build easily rather realistic multi-agents simulation. Yet,
-   realism is not the main goal of this environment and the most annoying
-   technical issues of real platforms are masked here. Check the \ref
-   MSG_API section for more information.
-
- - If you want to study the behaviour of a MPI application using emulation
-   technics, you should have a look at the <b>\ref SMPI_API</b> (Simulated
-   MPI) programming environment. Unfortunately, this work is still underway.
-   Check the \ref SMPI_API section for more information.
-
-If your favorite programming environment/model is not there (BSP,
-components, OpenMP, etc.) is not represented in the SimGrid toolkit yet, you may
-consider adding it. You should contact us first on the
-<a href=http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel>SimGrid
-developers mailing list</a>, though.
-
-\subsection overview_kernel Simulation kernel layer
-
-The core functionnalities to simulate a virtual platform are provided by a
-module called <b>\ref SURF_API</b>.  It is
-very low-level and is not intended to be used as such by end-users. Instead,
-it serve as a basis for the higher level layer.
-
-SURF main features are a fast max-min linear solver and the ability to
-change transparently the model used to describe the platform. This greatly
-eases the comparison of the several models existing in the litterature.
-
-See the \ref SURF_API section for more details.
-
-\subsection overview_fondation Base layer
-
-The base of the whole toolkit is constituted by the <b>\ref XBT_API
-(eXtended Bundle of Tools)</b>.
-
-It is a portable library providing some grounding features such as \ref
-XBT_log, \ref XBT_ex and \ref XBT_config. XBT also encompass
-the following convenient datastructures: \ref XBT_dynar, \ref XBT_fifo, \ref
-XBT_dict, \ref XBT_heap, \ref XBT_set and \ref XBT_swag.
-
-See the \ref XBT_API section for more details.
-
-
-\subsection lucas_layer Tracing simulation
-Finally, a transversal module allows you to trace your simulation. More documentation in the section \ref TRACE_doc
-
-\htmlonly
-<br>
-The SimGrid software package can be downloaded from
-<a href="http://simgrid.gforge.inria.fr/download.html">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="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
-mailing list</a>.
-
-\endhtmlonly
-
-<hr>
-\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>
-</center>
-\endhtmlonly
-
-*/
diff --git a/doc/ref_guide/doxygen/stylesheet.css b/doc/ref_guide/doxygen/stylesheet.css
deleted file mode 100644 (file)
index 124b725..0000000
+++ /dev/null
@@ -1,1176 +0,0 @@
-#MSearchBox {
-white-space: nowrap;
-position: absolute;
-float: none;
-display: inline;
-margin-top: 8px;
-right: 0px;
-width: 170px;
-z-index: 102;
-background-color: 
-white;
-}
-
-/* The standard CSS for doxygen */
-
-body, table, div, p, dl {
-       font: 400 14px/19px Roboto,sans-serif;
-}
-
-/* @group Heading Levels */
-
-h1 {
-       font-size: 150%;
-}
-
-.title {
-       font-size: 150%;
-       font-weight: bold;
-       margin: 10px 2px;
-}
-
-h2 {
-       border-bottom: 1px solid #879ECB;
-       color: #354C7B;
-       font-size: 150%;
-       font-weight: normal;
-       margin-top: 1.75em;
-       padding-top: 8px;
-       padding-bottom: 4px;
-       width: 100%;
-}
-
-h3 {
-       font-size: 100%;
-}
-
-h1, h2, h3, h4, h5, h6 {
-       -webkit-transition: text-shadow 0.5s linear;
-       -moz-transition: text-shadow 0.5s linear;
-       -ms-transition: text-shadow 0.5s linear;
-       -o-transition: text-shadow 0.5s linear;
-       transition: text-shadow 0.5s linear;
-       margin-right: 15px;
-}
-
-h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
-       text-shadow: 0 0 15px cyan;
-}
-
-dt {
-       font-weight: bold;
-}
-
-div.multicol {
-       -moz-column-gap: 1em;
-       -webkit-column-gap: 1em;
-       -moz-column-count: 3;
-       -webkit-column-count: 3;
-}
-
-p.startli, p.startdd, p.starttd {
-       margin-top: 2px;
-}
-
-p.endli {
-       margin-bottom: 0px;
-}
-
-p.enddd {
-       margin-bottom: 4px;
-}
-
-p.endtd {
-       margin-bottom: 2px;
-}
-
-/* @end */
-
-caption {
-       font-weight: bold;
-}
-
-span.legend {
-        font-size: 70%;
-        text-align: center;
-}
-
-h3.version {
-        font-size: 90%;
-        text-align: center;
-}
-
-div.qindex, div.navtab{
-       background-color: #EBEFF6;
-       border: 1px solid #A3B4D7;
-       text-align: center;
-}
-
-div.qindex, div.navpath {
-       width: 100%;
-       line-height: 140%;
-}
-
-div.navtab {
-       margin-right: 15px;
-}
-
-/* @group Link Styling */
-
-a {
-       color: #3D578C;
-       font-weight: normal;
-       text-decoration: none;
-}
-
-.contents a:visited {
-       color: #4665A2;
-}
-
-a:hover {
-       text-decoration: underline;
-}
-
-a.qindex {
-       font-weight: bold;
-}
-
-a.qindexHL {
-       font-weight: bold;
-       background-color: #9CAFD4;
-       color: #ffffff;
-       border: 1px double #869DCA;
-}
-
-.contents a.qindexHL:visited {
-        color: #ffffff;
-}
-
-a.el {
-       font-weight: bold;
-}
-
-a.elRef {
-}
-
-a.code, a.code:visited {
-       color: #4665A2; 
-}
-
-a.codeRef, a.codeRef:visited {
-       color: #4665A2; 
-}
-
-/* @end */
-
-dl.el {
-       margin-left: -1cm;
-}
-
-pre.fragment {
-        border: 1px solid #C4CFE5;
-        background-color: #FBFCFD;
-        padding: 4px 6px;
-        margin: 4px 8px 4px 2px;
-        overflow: auto;
-        word-wrap: break-word;
-        font-size:  9pt;
-        line-height: 125%;
-        font-family: monospace, fixed;
-        font-size: 105%;
-}
-
-div.fragment {
-        padding: 4px;
-        margin: 4px;
-       background-color: #FBFCFD;
-       border: 1px solid #C4CFE5;
-}
-
-div.line {
-       font-family: monospace, fixed;
-        font-size: 13px;
-       min-height: 13px;
-       line-height: 1.0;
-       text-wrap: unrestricted;
-       white-space: -moz-pre-wrap; /* Moz */
-       white-space: -pre-wrap;     /* Opera 4-6 */
-       white-space: -o-pre-wrap;   /* Opera 7 */
-       white-space: pre-wrap;      /* CSS3  */
-       word-wrap: break-word;      /* IE 5.5+ */
-       text-indent: -53px;
-       padding-left: 53px;
-       padding-bottom: 0px;
-       margin: 0px;
-       -webkit-transition-property: background-color, box-shadow;
-       -webkit-transition-duration: 0.5s;
-       -moz-transition-property: background-color, box-shadow;
-       -moz-transition-duration: 0.5s;
-       -ms-transition-property: background-color, box-shadow;
-       -ms-transition-duration: 0.5s;
-       -o-transition-property: background-color, box-shadow;
-       -o-transition-duration: 0.5s;
-       transition-property: background-color, box-shadow;
-       transition-duration: 0.5s;
-}
-
-div.line.glow {
-       background-color: cyan;
-       box-shadow: 0 0 10px cyan;
-}
-
-
-span.lineno {
-       padding-right: 4px;
-       text-align: right;
-       border-right: 2px solid #0F0;
-       background-color: #E8E8E8;
-        white-space: pre;
-}
-span.lineno a {
-       background-color: #D8D8D8;
-}
-
-span.lineno a:hover {
-       background-color: #C8C8C8;
-}
-
-div.ah {
-       background-color: black;
-       font-weight: bold;
-       color: #ffffff;
-       margin-bottom: 3px;
-       margin-top: 3px;
-       padding: 0.2em;
-       border: solid thin #333;
-       border-radius: 0.5em;
-       -webkit-border-radius: .5em;
-       -moz-border-radius: .5em;
-       box-shadow: 2px 2px 3px #999;
-       -webkit-box-shadow: 2px 2px 3px #999;
-       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
-       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
-}
-
-div.groupHeader {
-       margin-left: 16px;
-       margin-top: 12px;
-       font-weight: bold;
-}
-
-div.groupText {
-       margin-left: 16px;
-       font-style: italic;
-}
-
-body {
-       background-color: white;
-       color: black;
-        margin: 0;
-}
-
-div.contents {
-       margin-top: 10px;
-       margin-left: 12px;
-       margin-right: 8px;
-}
-
-td.indexkey {
-       background-color: #EBEFF6;
-       font-weight: bold;
-       border: 1px solid #C4CFE5;
-       margin: 2px 0px 2px 0;
-       padding: 2px 10px;
-        white-space: nowrap;
-        vertical-align: top;
-}
-
-td.indexvalue {
-       background-color: #EBEFF6;
-       border: 1px solid #C4CFE5;
-       padding: 2px 10px;
-       margin: 2px 0px;
-}
-
-tr.memlist {
-       background-color: #EEF1F7;
-}
-
-p.formulaDsp {
-       text-align: center;
-}
-
-img.formulaDsp {
-       
-}
-
-img.formulaInl {
-       vertical-align: middle;
-}
-
-div.center {
-       text-align: center;
-        margin-top: 0px;
-        margin-bottom: 0px;
-        padding: 0px;
-}
-
-div.center img {
-       border: 0px;
-}
-
-address.footer {
-       text-align: right;
-       padding-right: 12px;
-}
-
-img.footer {
-       border: 0px;
-       vertical-align: middle;
-}
-
-/* @group Code Colorization */
-
-span.keyword {
-       color: #008000
-}
-
-span.keywordtype {
-       color: #604020
-}
-
-span.keywordflow {
-       color: #e08000
-}
-
-span.comment {
-       color: #800000
-}
-
-span.preprocessor {
-       color: #806020
-}
-
-span.stringliteral {
-       color: #002080
-}
-
-span.charliteral {
-       color: #008080
-}
-
-span.vhdldigit { 
-       color: #ff00ff 
-}
-
-span.vhdlchar { 
-       color: #000000 
-}
-
-span.vhdlkeyword { 
-       color: #700070 
-}
-
-span.vhdllogic { 
-       color: #ff0000 
-}
-
-blockquote {
-        background-color: #F7F8FB;
-        border-left: 2px solid #9CAFD4;
-        margin: 0 24px 0 4px;
-        padding: 0 12px 0 16px;
-}
-
-/* @end */
-
-/*
-.search {
-       color: #003399;
-       font-weight: bold;
-}
-
-form.search {
-       margin-bottom: 0px;
-       margin-top: 0px;
-}
-
-input.search {
-       font-size: 75%;
-       color: #000080;
-       font-weight: normal;
-       background-color: #e8eef2;
-}
-*/
-
-td.tiny {
-       font-size: 75%;
-}
-
-.dirtab {
-       padding: 4px;
-       border-collapse: collapse;
-       border: 1px solid #A3B4D7;
-}
-
-th.dirtab {
-       background: #EBEFF6;
-       font-weight: bold;
-}
-
-hr {
-       height: 0px;
-       border: none;
-       border-top: 1px solid #4A6AAA;
-}
-
-hr.footer {
-       height: 1px;
-}
-
-/* @group Member Descriptions */
-
-table.memberdecls {
-       border-spacing: 0px;
-       padding: 0px;
-}
-
-.memberdecls td, .fieldtable tr {
-       -webkit-transition-property: background-color, box-shadow;
-       -webkit-transition-duration: 0.5s;
-       -moz-transition-property: background-color, box-shadow;
-       -moz-transition-duration: 0.5s;
-       -ms-transition-property: background-color, box-shadow;
-       -ms-transition-duration: 0.5s;
-       -o-transition-property: background-color, box-shadow;
-       -o-transition-duration: 0.5s;
-       transition-property: background-color, box-shadow;
-       transition-duration: 0.5s;
-}
-
-.memberdecls td.glow, .fieldtable tr.glow {
-       background-color: cyan;
-       box-shadow: 0 0 15px cyan;
-}
-
-.mdescLeft, .mdescRight,
-.memItemLeft, .memItemRight,
-.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
-       background-color: #F9FAFC;
-       border: none;
-       margin: 4px;
-       padding: 1px 0 0 8px;
-}
-
-.mdescLeft, .mdescRight {
-       padding: 0px 8px 4px 8px;
-       color: #555;
-}
-
-.memItemLeft, .memItemRight, .memTemplParams {
-       border-bottom: 1px solid #DEE4F0;
-}
-
-.memItemLeft, .memTemplItemLeft {
-        white-space: nowrap;
-}
-
-.memItemRight {
-       width: 100%;
-}
-
-.memTemplParams {
-       color: #4665A2;
-        white-space: nowrap;
-}
-
-/* @end */
-
-/* @group Member Details */
-
-/* Styles for detailed member documentation */
-
-.memtemplate {
-       font-size: 80%;
-       color: #4665A2;
-       font-weight: normal;
-       margin-left: 9px;
-}
-
-.memnav {
-       background-color: #EBEFF6;
-       border: 1px solid #A3B4D7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-
-.mempage {
-       width: 100%;
-}
-
-.memitem {
-       padding: 0;
-       margin-bottom: 10px;
-       margin-right: 5px;
-        -webkit-transition: box-shadow 0.5s linear;
-        -moz-transition: box-shadow 0.5s linear;
-        -ms-transition: box-shadow 0.5s linear;
-        -o-transition: box-shadow 0.5s linear;
-        transition: box-shadow 0.5s linear;
-        display: table !important;
-        width: 100%;
-}
-
-.memitem.glow {
-         box-shadow: 0 0 15px cyan;
-}
-
-.memname {
-        font-weight: bold;
-        margin-left: 6px;
-}
-
-.memname td {
-       vertical-align: bottom;
-}
-
-.memproto, dl.reflist dt {
-        border-top: 1px solid #A8B8D9;
-        border-left: 1px solid #A8B8D9;
-        border-right: 1px solid #A8B8D9;
-        padding: 6px 0px 6px 0px;
-        color: #253555;
-        font-weight: bold;
-        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #E2E8F2;
-        /* opera specific markup */
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        /* firefox specific markup */
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        -moz-border-radius-topright: 4px;
-        -moz-border-radius-topleft: 4px;
-        /* webkit specific markup */
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        -webkit-border-top-right-radius: 4px;
-        -webkit-border-top-left-radius: 4px;
-
-}
-
-.memdoc, dl.reflist dd {
-        border-bottom: 1px solid #A8B8D9;      
-        border-left: 1px solid #A8B8D9;      
-        border-right: 1px solid #A8B8D9; 
-        padding: 6px 10px 2px 10px;
-        background-color: #FBFCFD;
-        border-top-width: 0;
-        background-image:url('nav_g.png');
-        background-repeat:repeat-x;
-        background-color: #FFFFFF;
-        /* opera specific markup */
-        border-bottom-left-radius: 4px;
-        border-bottom-right-radius: 4px;
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        /* firefox specific markup */
-        -moz-border-radius-bottomleft: 4px;
-        -moz-border-radius-bottomright: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        /* webkit specific markup */
-        -webkit-border-bottom-left-radius: 4px;
-        -webkit-border-bottom-right-radius: 4px;
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-}
-
-dl.reflist dt {
-        padding: 5px;
-}
-
-dl.reflist dd {
-        margin: 0px 0px 10px 0px;
-        padding: 5px;
-}
-
-.paramkey {
-       text-align: right;
-}
-
-.paramtype {
-       white-space: nowrap;
-}
-
-.paramname {
-       color: #602020;
-       white-space: nowrap;
-}
-.paramname em {
-       font-style: normal;
-}
-.paramname code {
-        line-height: 14px;
-}
-
-.params, .retval, .exception, .tparams {
-        margin-left: 0px;
-        padding-left: 0px;
-}       
-
-.params .paramname, .retval .paramname {
-        font-weight: bold;
-        vertical-align: top;
-}
-        
-.params .paramtype {
-        font-style: italic;
-        vertical-align: top;
-}       
-        
-.params .paramdir {
-        font-family: "courier new",courier,monospace;
-        vertical-align: top;
-}
-
-table.mlabels {
-       border-spacing: 0px;
-}
-
-td.mlabels-left {
-       width: 100%;
-       padding: 0px;
-}
-
-td.mlabels-right {
-       vertical-align: bottom;
-       padding: 0px;
-       white-space: nowrap;
-}
-
-span.mlabels {
-        margin-left: 8px;
-}
-
-span.mlabel {
-        background-color: #728DC1;
-        border-top:1px solid #5373B4;
-        border-left:1px solid #5373B4;
-        border-right:1px solid #C4CFE5;
-        border-bottom:1px solid #C4CFE5;
-       text-shadow: none;
-        color: white;
-        margin-right: 4px;
-        padding: 2px 3px;
-        border-radius: 3px;
-        font-size: 7pt;
-       white-space: nowrap;
-}
-
-
-
-/* @end */
-
-/* these are for tree view when not used as main index */
-
-div.directory {
-        margin: 10px 0px;
-        border-top: 1px solid #A8B8D9;
-        border-bottom: 1px solid #A8B8D9;
-        width: 100%;
-}
-
-.directory table {
-        border-collapse:collapse;
-}
-
-.directory td {
-        margin: 0px;
-        padding: 0px;
-       vertical-align: top;
-}
-
-.directory td.entry {
-        white-space: nowrap;
-        padding-right: 6px;
-}
-
-.directory td.entry a {
-        outline:none;
-}
-
-.directory td.entry a img {
-        border: none;
-}
-
-.directory td.desc {
-        width: 100%;
-        padding-left: 6px;
-       padding-right: 6px;
-       padding-top: 3px;
-       border-left: 1px solid rgba(0,0,0,0.05);
-}
-
-.directory tr.even {
-       padding-left: 6px;
-       background-color: #F7F8FB;
-}
-
-.directory img {
-       vertical-align: -30%;
-}
-
-.directory .levels {
-        white-space: nowrap;
-        width: 100%;
-        text-align: right;
-        font-size: 9pt;
-}
-
-.directory .levels span {
-        cursor: pointer;
-        padding-left: 2px;
-        padding-right: 2px;
-       color: #3D578C;
-}
-
-div.dynheader {
-        margin-top: 8px;
-       -webkit-touch-callout: none;
-       -webkit-user-select: none;
-       -khtml-user-select: none;
-       -moz-user-select: none;
-       -ms-user-select: none;
-       user-select: none;
-}
-
-address {
-       font-style: normal;
-       color: #2A3D61;
-}
-
-table.doxtable {
-       border-collapse:collapse;
-        margin-top: 4px;
-        margin-bottom: 4px;
-}
-
-table.doxtable td, table.doxtable th {
-       border: 1px solid #2D4068;
-       padding: 3px 7px 2px;
-}
-
-table.doxtable th {
-       background-color: #374F7F;
-       color: #FFFFFF;
-       font-size: 110%;
-       padding-bottom: 4px;
-       padding-top: 5px;
-}
-
-table.fieldtable {
-        width: 100%;
-        margin-bottom: 10px;
-        border: 1px solid #A8B8D9;
-        border-spacing: 0px;
-        -moz-border-radius: 4px;
-        -webkit-border-radius: 4px;
-        border-radius: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-}
-
-.fieldtable td, .fieldtable th {
-        padding: 3px 7px 2px;
-}
-
-.fieldtable td.fieldtype, .fieldtable td.fieldname {
-        white-space: nowrap;
-        border-right: 1px solid #A8B8D9;
-        border-bottom: 1px solid #A8B8D9;
-        vertical-align: top;
-}
-
-.fieldtable td.fielddoc {
-        border-bottom: 1px solid #A8B8D9;
-        width: 100%;
-}
-
-.fieldtable tr:last-child td {
-        border-bottom: none;
-}
-
-.fieldtable th {
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #E2E8F2;
-        font-size: 90%;
-        color: #253555;
-        padding-bottom: 4px;
-        padding-top: 5px;
-        text-align:left;
-        -moz-border-radius-topleft: 4px;
-        -moz-border-radius-topright: 4px;
-        -webkit-border-top-left-radius: 4px;
-        -webkit-border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        border-top-right-radius: 4px;
-        border-bottom: 1px solid #A8B8D9;
-}
-
-
-.tabsearch {
-       top: 0px;
-       left: 10px;
-       height: 36px;
-       background-image: url('tab_b.png');
-       z-index: 101;
-       overflow: hidden;
-       font-size: 13px;
-}
-
-.navpath ul
-{
-       font-size: 11px;
-       background-image:url('tab_b.png');
-       background-repeat:repeat-x;
-       height:30px;
-       line-height:30px;
-       color:#8AA0CC;
-       border:solid 1px #C2CDE4;
-       overflow:hidden;
-       margin:0px;
-       padding:0px;
-}
-
-.navpath li
-{
-       list-style-type:none;
-       float:left;
-       padding-left:10px;
-       padding-right:15px;
-       background-image:url('bc_s.png');
-       background-repeat:no-repeat;
-       background-position:right;
-       color:#364D7C;
-}
-
-.navpath li.navelem a
-{
-       height:32px;
-       display:block;
-       text-decoration: none;
-       outline: none;
-       font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
-}
-
-.navpath li.navelem a:hover
-{
-       color:#6884BD;
-}
-
-.navpath li.footer
-{
-        list-style-type:none;
-        float:right;
-        padding-left:10px;
-        padding-right:15px;
-        background-image:none;
-        background-repeat:no-repeat;
-        background-position:right;
-        color:#364D7C;
-        font-size: 8pt;
-}
-
-
-div.summary
-{
-       float: right;
-       font-size: 8pt;
-       padding-right: 5px;
-       width: 50%;
-       text-align: right;
-}       
-
-div.summary a
-{
-       white-space: nowrap;
-}
-
-div.ingroups
-{
-       font-size: 8pt;
-       width: 50%;
-       text-align: left;
-}
-
-div.ingroups a
-{
-       white-space: nowrap;
-}
-
-div.header
-{
-        background-image:url('nav_h.png');
-        background-repeat:repeat-x;
-       background-color: #F9FAFC;
-       margin:  0px;
-       border-bottom: 1px solid #C4CFE5;
-}
-
-div.headertitle
-{
-       padding: 5px 5px 5px 10px;
-}
-
-dl
-{
-        padding: 0 0 0 10px;
-}
-
-/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
-dl.section
-{
-       margin-left: 0px;
-       padding-left: 0px;
-}
-
-dl.note
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #D0C000;
-}
-
-dl.warning, dl.attention
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #FF0000;
-}
-
-dl.pre, dl.post, dl.invariant
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00D000;
-}
-
-dl.deprecated
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #505050;
-}
-
-dl.todo
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00C0E0;
-}
-
-dl.test
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #3030E0;
-}
-
-dl.bug
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #C08050;
-}
-
-dl.section dd {
-       margin-bottom: 6px;
-}
-
-
-#projectlogo
-{
-       text-align: center;
-       vertical-align: bottom;
-       border-collapse: separate;
-}
-#projectlogo img
-{ 
-       border: 0px none;
-}
-#projectname
-{
-       font: 300% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 2px 0px;
-}
-    
-#projectbrief
-{
-       font: 120% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 0px;
-}
-
-#projectnumber
-{
-       font: 50% Tahoma, Arial,sans-serif;
-       margin: 0px;
-       padding: 0px;
-}
-
-#titlearea
-{
-       padding: 0px;
-       margin: 0px;
-       width: 100%;
-       border-bottom: 1px solid #5373B4;
-}
-
-.image
-{
-        text-align: center;
-}
-
-.dotgraph
-{
-        text-align: center;
-}
-
-.mscgraph
-{
-        text-align: center;
-}
-
-.caption
-{
-       font-weight: bold;
-}
-
-div.zoom
-{
-       border: 1px solid #90A5CE;
-}
-
-dl.citelist {
-        margin-bottom:50px;
-}
-
-dl.citelist dt {
-        color:#334975;
-        float:left;
-        font-weight:bold;
-        margin-right:10px;
-        padding:5px;
-}
-
-dl.citelist dd {
-        margin:2px 0;
-        padding:5px 0;
-}
-
-div.toc {
-        padding: 14px 25px;
-        background-color: #F4F6FA;
-        border: 1px solid #D8DFEE;
-        border-radius: 7px 7px 7px 7px;
-        float: right;
-        height: auto;
-        margin: 0 20px 10px 10px;
-        width: 200px;
-}
-
-div.toc li {
-        background: url("bdwn.png") no-repeat scroll 0 5px transparent;
-        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
-        margin-top: 5px;
-        padding-left: 10px;
-        padding-top: 2px;
-}
-
-div.toc h3 {
-        font: bold 12px/1.2 Arial,FreeSans,sans-serif;
-       color: #4665A2;
-        border-bottom: 0 none;
-        margin: 0;
-}
-
-div.toc ul {
-        list-style: none outside none;
-        border: medium none;
-        padding: 0px;
-}       
-
-div.toc li.level1 {
-        margin-left: 0px;
-}
-
-div.toc li.level2 {
-        margin-left: 15px;
-}
-
-div.toc li.level3 {
-        margin-left: 30px;
-}
-
-div.toc li.level4 {
-        margin-left: 45px;
-}
-
-.inherit_header {
-        font-weight: bold;
-        color: gray;
-        cursor: pointer;
-       -webkit-touch-callout: none;
-       -webkit-user-select: none;
-       -khtml-user-select: none;
-       -moz-user-select: none;
-       -ms-user-select: none;
-       user-select: none;
-}
-
-.inherit_header td {
-        padding: 6px 0px 2px 5px;
-}
-
-.inherit {
-        display: none;
-}
-
-tr.heading h2 {
-        margin-top: 12px;
-        margin-bottom: 4px;
-}
-
-@media print
-{
-  #top { display: none; }
-  #side-nav { display: none; }
-  #nav-path { display: none; }
-  body { overflow:visible; }
-  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
-  .summary { display: none; }
-  .memitem { page-break-inside: avoid; }
-  #doc-content
-  {
-    margin-left:0 !important;
-    height:auto !important;
-    width:auto !important;
-    overflow:inherit;
-    display:inline;
-  }
-}
-
index e3b9102..5d1b5cc 100644 (file)
@@ -24,10 +24,10 @@ Single
 4 1 0 50 -1 4 12 0.0000 2 150 1245 5377 2835 Framework for\001
 4 1 0 50 -1 4 12 0.0000 2 195 1965 5377 3105 DAGs of parallel tasks\001
 -6
-# href="../../ref_guide/html/group__SMPI__API.html" ALT="SMPI"
+# href="group__SMPI__API.html" ALT="SMPI"
 2 2 0 1 0 36 60 -1 20 0.000 0 0 -1 0 0 5
         1755 2205 4095 2205 4095 3375 1755 3375 1755 2205
-# href="../../ref_guide/html/group__SD__API.html" ALT="SimDag"
+# href="group__SD__API.html" ALT="SimDag"
 2 2 0 1 0 23 60 -1 30 0.000 0 0 -1 0 0 5
         4230 2205 6570 2205 6570 3375 4230 3375 4230 2205
 4 1 0 50 -1 4 12 0.0000 2 195 1860 2925 2955 applications on top of\001
@@ -50,19 +50,19 @@ Single
 4 1 0 50 -1 4 14 0.0000 2 180 480 3014 4740 XBT\001
 -6
 6 6840 2115 7380 5220
-# href="../../ref_guide/html/group__TRACE__API.html" ALT="TRACE"
+# href="group__TRACE__API.html" ALT="TRACE"
 2 2 0 1 0 3 50 -1 30 0.000 0 0 -1 0 0 5
         6840 2115 7380 2115 7380 5220 6840 5220 6840 2115
 4 0 0 50 -1 4 15 1.5708 2 180 840 7200 5083 TRACE\001
 4 0 0 50 -1 4 12 1.5708 2 195 1590 7155 4033 Tracing simulation\001
 -6
-# href="../../ref_guide/html/group__XBT__API.html" ALT="XBT"
+# href="group__XBT__API.html" ALT="XBT"
 2 3 0 1 0 33 80 -1 20 0.000 0 0 -1 0 0 5
         -810 2115 -810 5220 6705 5220 6705 2115 -810 2115
-# href="../../ref_guide/html/group__SURF__API.html" ALT="SMPI"
+# href="group__SURF__API.html" ALT="SMPI"
 2 2 0 1 0 34 60 -1 20 0.000 0 0 -1 0 0 5
         -675 3510 6570 3510 6570 4365 -675 4365 -675 3510
-# href="../../ref_guide/html/group__MSG__API.html" ALT="MSG"
+# href="group__MSG__API.html" ALT="MSG"
 2 2 0 1 0 32 60 -1 20 0.000 0 0 -1 0 0 5
         -675 2205 1620 2205 1620 3375 -675 3375 -675 2205
 2 2 0 1 0 31 70 -1 20 0.000 0 0 -1 0 0 5
diff --git a/doc/user_guide/doxygen/UserGuideDoxyfile.in b/doc/user_guide/doxygen/UserGuideDoxyfile.in
deleted file mode 100644 (file)
index 1d8c816..0000000
+++ /dev/null
@@ -1,1846 +0,0 @@
-
-#               @WARNING@
-
-# Doxyfile 1.8.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = SimGrid
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-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          = "Scalable Simulation of Distributed Systems - User Guide"
-
-# 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
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           = 
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = ../
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        = @srcdir@
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-#TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-#MARKDOWN_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-#INLINE_SIMPLE_STRUCTS  = 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
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-#LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
-#EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            = UserGuideDoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
-#CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = index.doc \
-                         install.doc \
-                         use.doc \   
-                         examples.doc \            
-                         options.doc \
-                         platform.doc \
-                         deployment.doc \
-                         tracing.doc \
-                         pls.doc \
-                         bindings.doc
-                        
-
-###################################################
-##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
-###################################################
-
-INPUT +=                 @top_srcdir@/examples/msg/sendrecv/sendrecv.c \
-                         @top_srcdir@/examples/msg/masterslave/masterslave_forwarder.c \
-                         @top_srcdir@/examples/msg/masterslave/masterslave_console.c \
-                         @top_srcdir@/examples/msg/migration \
-                         @top_srcdir@/examples/msg/suspend \
-                         @top_srcdir@/examples/msg/properties \
-                         @top_srcdir@/examples/msg/parallel_task \
-                         @top_srcdir@/examples/msg/priority \
-                         @top_srcdir@/examples/msg/icomms/peer.c \
-                         @top_srcdir@/examples/msg/icomms/peer2.c \
-                         @top_srcdir@/examples/msg/icomms/peer3.c \
-                         @top_srcdir@/examples/msg/tracing/simple.c \
-                         @top_srcdir@/examples/msg/tracing/ms.c \
-                         @top_srcdir@/examples/msg/tracing/categories.c \
-                         @top_srcdir@/examples/msg/tracing/procmig.c \
-                         @top_srcdir@/examples/msg/tracing/trace_platform.c \
-                         @top_srcdir@/examples/msg/tracing/user_variables.c \
-                         @top_srcdir@/examples/msg/tracing/link_user_variables.c \
-                         @top_srcdir@/examples/msg/tracing/link_srcdst_user_variables.c \
-                         @top_srcdir@/examples/msg/ns3 \
-                         @top_srcdir@/examples/msg/gtnets \
-                         @top_srcdir@/examples/msg/io \
-                         @top_srcdir@/examples/msg/gpu \
-                         @top_srcdir@/examples/msg/actions \
-                         @top_srcdir@/examples/msg/token_ring \
-                         @top_srcdir@/examples/msg/pmm \
-                         @top_srcdir@/examples/msg/chord
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           = ./ \
-                         @top_srcdir@/src/surf/ \
-                         @top_srcdir@/src/xbt/ \
-                         @top_srcdir@/examples \
-                         @top_srcdir@/testsuite
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = YES
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             = @top_srcdir@/doc
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-#  for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# style sheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = stylesheet.css
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# 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       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-#HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = YES
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-#MATHJAX_EXTENSIONS     =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-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
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = pdfpages
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# 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           =
-
-# 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         = 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           = 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
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = YES
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-#LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             = DOXYGEN \
-                         DOXYGEN_SKIP_IT \
-                         XBT_PUBLIC= \
-                         XBT_INLINE= \
-                         HAVE_TRACING \
-                         MSG_USE_DEPRECATED
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each
-# tag file the location of the external documentation should be added. The
-# format of a tag file without this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths
-# or URLs. Note that each tag file must have a unique name (where the name does
-# NOT include the path). If a tag file is not located in the directory in which
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = ../../shared/doxygen/simgridrefguide.tag=../../ref_guide/html/
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = ../../shared/doxygen/simgriduserguide.tag
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = NO
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-#UML_LIMIT_NUM_FIELDS   = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = NO
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-#INTERACTIVE_SVG        = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
diff --git a/doc/user_guide/doxygen/examples.doc b/doc/user_guide/doxygen/examples.doc
deleted file mode 100644 (file)
index e9053e9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
-\defgroup MSG_examples MSG examples
-\brief MSG examples from examples directory examples/msg
-
-MSG comes with an extensive set of examples. It is sometimes difficult to find the one you need. This list aims at helping you finding the example from which you can learn what you want to.
-
-\section msg_bsc_ex Basic examples
-
-*/
-
diff --git a/doc/user_guide/doxygen/footer.html b/doc/user_guide/doxygen/footer.html
deleted file mode 100644 (file)
index 80222ad..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- start footer part -->
-<!--BEGIN GENERATE_TREEVIEW-->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
-  <ul>
-    $navpath
-    <li class="footer">$generatedby
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
-  </ul>
-</div>
-<!--END GENERATE_TREEVIEW-->
-<!--BEGIN !GENERATE_TREEVIEW-->
-<hr class="footer"/><address class="footer"><small>
-$generatedby &#160;<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
-</a> $doxygenversion
-</small></address>
-<!--END !GENERATE_TREEVIEW-->
-</body>
-</html>
diff --git a/doc/user_guide/doxygen/header.html b/doc/user_guide/doxygen/header.html
deleted file mode 100644 (file)
index 446c929..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<!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">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
-<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
-<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="$relpath$jquery.js"></script>
-<script type="text/javascript" src="$relpath$dynsections.js"></script>
-$treeview
-$search
-$mathjax
-<link href="stylesheet.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-
-<!--BEGIN TITLEAREA-->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-  <!--BEGIN PROJECT_LOGO-->
-  <td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td>
-  <!--END PROJECT_LOGO-->
-  <!--BEGIN PROJECT_NAME-->
-  <td style="padding-left: 0.5em;">
-   <div id="projectname">$projectname
-   <!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
-   </div>
-   <!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
-  </td>
-  <!--END PROJECT_NAME-->
-  <!--BEGIN !PROJECT_NAME-->
-   <!--BEGIN PROJECT_BRIEF-->
-    <td style="padding-left: 0.5em;">
-    <div id="projectbrief">$projectbrief</div>
-    </td>
-   <!--END PROJECT_BRIEF-->
-  <!--END !PROJECT_NAME-->
-  <!--BEGIN DISABLE_INDEX-->
-  <!--END DISABLE_INDEX-->
- </tr>
- </tbody>
-</table>
-</div>
-<!--END TITLEAREA-->
-
-<div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="../../doc/index.html"><span>Home</span></a></li>
-      <li><a href="../../ref_guide/html/index.html"><span>Reference&nbsp;Manual</span></a></li>
-      <li class="current"><a href="../../user_guide/html/index.html"><span>User&nbsp;Guide</span></a></li>
-      <li><a href="../../dev_guide/html/index.html"><span>Developer&nbsp;Guide</span></a></li>
-      <li><a href="http://simgrid.gforge.inria.fr/tutorials.html"><span>Tutorials</span></a></li>
-      <li><a href="https://gforge.inria.fr/projects/simgrid"><span>Forge</span></a></li>
-      <li><a href="http://simgrid.gforge.inria.fr/"><span>Website</span></a></li>
-      <li>$searchbox</li>
-    </ul>
-  </div>
-<!-- end header part -->
diff --git a/doc/user_guide/doxygen/install.doc b/doc/user_guide/doxygen/install.doc
deleted file mode 100644 (file)
index cfa4526..0000000
+++ /dev/null
@@ -1,455 +0,0 @@
-/*! 
-\page install Installing Simgrid
-
-\section install_cmake Installing the SimGrid library
-
-\subsection install_intro Some generality
-
-\subsubsection install_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 install_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 install_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>
-
-On MacOSX some users reported that it is still possible to build with clang, provided that you
-use at least clang3.0 installed with macport or with xcode. If it fails on you, try to
- use gcc47.
-\verbatim
-port install clang-3.0
-port install gcc47
-\endverbatim
-
-For Windows :
-  \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
-  \li MinGW <a href="http://sourceforge.net/projects/mingw/files/MinGW/">(download page)</a>
-  \li perl <a href="http://www.activestate.com/activeperl/downloads">(download page)</a>
-  \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
-
-Note that if you want change the compiler, you can simply specify the environment variables CC and CXX.
-\verbatim
-       export CC=gcc-4.4
-       export CXX=g++-4.4
-       export CC=clang
-       export CXX=clang++
-\endverbatim
-
-\subsubsection install_cmakeoption1 Liste of options
-
-\verbatim
-"cmake -D[name]=[value] ... ./"
-
-[name]         enable_gtnets           [value] ON/OFF or TRUE/FALSE or 1/0
-       enable_ns3                      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
-       enable_supernovae               ON/OFF or TRUE/FALSE or 1/0
-       enable_msg_deprecated           ON/OFF or TRUE/FALSE or 1/0
-       enable_print_message            ON/OFF or TRUE/FALSE or 1/0
-       gtnets_path                     <path_to_gtnets_directory>
-       ns3_path                        <path_to_ns3_directory>
-       CMAKE_INSTALL_PREFIX            <path_to_install_directory>
-       pipol_user                      <pipol_username>
-\endverbatim
-
-\subsubsection install_cmakeoption2 Options explaination
-
-  \li enable_gtnets : set to true implie that user wants to use gtnets.
-
-  \li enable_ns3 : set to true implie that user wants to use ns3.
-
-  \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 enable_supernovae : Set to true make one file for each lib and compile with those generated files.
-
-  \li enable_msg_deprecated : Simgrid is compiled with msg deprecated functions.
-
-  \li enable_print_message : When set to true configuration print more debug output.
-
-  \li gtnets_path : Path to gtnets install directory (ex /usr)
-
-  \li ns3_path : Path to ns3 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 install_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
-gtnets_path                    null
-pipol_user                     null
-\endverbatim
-
-\subsubsection install_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 install_cmakecompilation Cmake compilation
-
-\subsubsection install_cmakecompilation1 With command line.
-
-On Unix or Mac platform:
-
-\verbatim
-cmake -D[name]=[value] ... ./
-make
-\endverbatim
-
-On Windows platform:
-
-\verbatim
-cmake -G"MinGW Makefiles" -D[name]=[value] ... ./
-mingw32-make
-\endverbatim
-
-\subsubsection install_cmakecompilation2 With ccmake tool.
-
-\verbatim
-"ccmake ./"
-\endverbatim
-Then follow instructions.
-
-\subsubsection install_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 install_cmakecompilation3 Resume of command line
-
- \li CMake
-\verbatim
-cmake <path>                   configure the project for Unix and Mac
-cmake -G"MinGW Makefiles" <path>       configure the project for Windows
-make                           build all targets for Unix and Mac
-ming32-make                            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 install_cmakeinstall How to install with cmake?
-
-\subsubsection install_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 install_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
-
-\section install_Win Installing the SimGrid framework on Windows
-
-\subsection install_Win_install Installing SimGrid with the automatic installer
-
-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 MinGW <a href="http://sourceforge.net/projects/mingw/files/MinGW/">(download page)</a>
-  \li perl <a href="http://www.activestate.com/activeperl/downloads">(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: Add CLASSPATH to environment variables.
-
-\htmlonly
-<a href="win_install_05.png" border=0><img src="win_install_05.png" border=0></a>
-\endhtmlonly
-
-Step 5: Add PATH to environment variables.
-
-\htmlonly
-<a href="win_install_06.png" border=0><img src="win_install_06.png" border=0></a>
-\endhtmlonly
-
-Step 6: Restart your computer to take in consideration environment variables.
-
-\subsection install_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 windows shell "cmd".
-\li Open HelloWorld Directory ('cd' command line).
-\li Create a build directory and change directory. (optional)
-\li Type 'cmake -G"MinGW Makefiles" \<path_to_HelloWorld_project\>'
-\li Run mingw32-make
-\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 install_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 #
-################
-#It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'
-add_executable(TARGET_NAME SOURCES)
-#Links TARGET_NAME with simgrid and pcre
-target_link_libraries(TARGET_NAME simgrid pcre)
-\endverbatim
-\li To initialize and build your project, you'll need to run
-\verbatim
-cmake -G"MinGW Makefiles" \<path_to_HelloWorld_project\>
-\endverbatim
-\li Run "mingw32-make"
-\li You should obtain "TARGET_NAME.exe".
-
-\subsection install_Win_ruby Setup a virtualbox to use SimGrid-Ruby on windows
-
-Allan Espinosa made these set of Vagrant rules available so that you
-can use the SimGrid Ruby bindings in a virtual machine using
-VirtualBox. Thanks to him for that. You can find his project here:
-https://github.com/aespinosa/simgrid-vagrant
-
-\section install_mac Installing the SimGrid framework on Mac OS X
-
-The Mac OS X system is part of the UNIX familly, but it exibits some
-specificities that complicate a bit the build of SimGrid. Current
-versions of SimGrid (3.7.x) can only be build with the GCC Compiler,
-but recent OS X version provide only an ancient version of that tool
-in the hope to see the users switch to the LLVM compiler family. The
-problem is that SimGrid uses internal libraries of GCC, for stack
-manipulation for example. We are working on removing this dependency
-onto gcc to ease the build process, but this is still ongoing.
-
-For the time being, you need to get a recent version of GCC on your
-system to build SimGrid. Version 3.7.1  was successfully built on Mac
-Lion 10.7.4 using a GCC compiler retrieved from macport. The package
-used were gcc47, and the binary in the package were gcc-mp-4.7.
-
-\section install_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_task_usage.
-\li <tt>masterslave.c</tt>: a C file with the main function, i.e.
-    the MSG initialization (MSG_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...
-
-
-
-*/
diff --git a/doc/webcruft/README b/doc/webcruft/README
deleted file mode 100644 (file)
index 3810136..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-The sources of the SimGrid 101 presentation are in the propagenda
-section. The script to generate the pngs from the pdf are on Martin's
-hard disk only (sorry). Here are the interesting bits of it:
-
-error=0
-for n in `seq 0 $NUM` ; do
- if [ x$n != x$NUM ] ; then # lame. should iterate over [0,NUM-1] the  proper way
-   m=`expr $n + 1`
-   echo -n "Page $m of $NUM... ";
-   file=${PNGDIR}_`printf %03d $m`.png
-   if [ ! -e $file ] || [ $file -ot ${PDF} ] ; then
-     convert -density 400% "${PDF}[$n]" -resize 30% $file || error=1 
-     echo "converted"
-   else
-     echo "kept previous version"
-   fi
- fi
-done
-                
\ No newline at end of file
diff --git a/doc/webcruft/simgrid-101.pdf b/doc/webcruft/simgrid-101.pdf
deleted file mode 100644 (file)
index 3799c17..0000000
Binary files a/doc/webcruft/simgrid-101.pdf and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_001.png b/doc/webcruft/simgrid-101_001.png
deleted file mode 100644 (file)
index 5dfca4d..0000000
Binary files a/doc/webcruft/simgrid-101_001.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_002.png b/doc/webcruft/simgrid-101_002.png
deleted file mode 100644 (file)
index 6015339..0000000
Binary files a/doc/webcruft/simgrid-101_002.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_003.png b/doc/webcruft/simgrid-101_003.png
deleted file mode 100644 (file)
index 02b80fc..0000000
Binary files a/doc/webcruft/simgrid-101_003.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_004.png b/doc/webcruft/simgrid-101_004.png
deleted file mode 100644 (file)
index 53f24f1..0000000
Binary files a/doc/webcruft/simgrid-101_004.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_005.png b/doc/webcruft/simgrid-101_005.png
deleted file mode 100644 (file)
index c3b3568..0000000
Binary files a/doc/webcruft/simgrid-101_005.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_006.png b/doc/webcruft/simgrid-101_006.png
deleted file mode 100644 (file)
index ce45c66..0000000
Binary files a/doc/webcruft/simgrid-101_006.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_007.png b/doc/webcruft/simgrid-101_007.png
deleted file mode 100644 (file)
index 02bc042..0000000
Binary files a/doc/webcruft/simgrid-101_007.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_008.png b/doc/webcruft/simgrid-101_008.png
deleted file mode 100644 (file)
index ffb6474..0000000
Binary files a/doc/webcruft/simgrid-101_008.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_009.png b/doc/webcruft/simgrid-101_009.png
deleted file mode 100644 (file)
index 97feb03..0000000
Binary files a/doc/webcruft/simgrid-101_009.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_010.png b/doc/webcruft/simgrid-101_010.png
deleted file mode 100644 (file)
index 9346905..0000000
Binary files a/doc/webcruft/simgrid-101_010.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_011.png b/doc/webcruft/simgrid-101_011.png
deleted file mode 100644 (file)
index 62d7958..0000000
Binary files a/doc/webcruft/simgrid-101_011.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_012.png b/doc/webcruft/simgrid-101_012.png
deleted file mode 100644 (file)
index 486b360..0000000
Binary files a/doc/webcruft/simgrid-101_012.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_013.png b/doc/webcruft/simgrid-101_013.png
deleted file mode 100644 (file)
index 658f113..0000000
Binary files a/doc/webcruft/simgrid-101_013.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_014.png b/doc/webcruft/simgrid-101_014.png
deleted file mode 100644 (file)
index 328e9e2..0000000
Binary files a/doc/webcruft/simgrid-101_014.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_015.png b/doc/webcruft/simgrid-101_015.png
deleted file mode 100644 (file)
index 7a1c8d6..0000000
Binary files a/doc/webcruft/simgrid-101_015.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_016.png b/doc/webcruft/simgrid-101_016.png
deleted file mode 100644 (file)
index 6fb2dab..0000000
Binary files a/doc/webcruft/simgrid-101_016.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_017.png b/doc/webcruft/simgrid-101_017.png
deleted file mode 100644 (file)
index 8272419..0000000
Binary files a/doc/webcruft/simgrid-101_017.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_018.png b/doc/webcruft/simgrid-101_018.png
deleted file mode 100644 (file)
index c0465bd..0000000
Binary files a/doc/webcruft/simgrid-101_018.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_019.png b/doc/webcruft/simgrid-101_019.png
deleted file mode 100644 (file)
index 14f9e26..0000000
Binary files a/doc/webcruft/simgrid-101_019.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_020.png b/doc/webcruft/simgrid-101_020.png
deleted file mode 100644 (file)
index 5716e28..0000000
Binary files a/doc/webcruft/simgrid-101_020.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_021.png b/doc/webcruft/simgrid-101_021.png
deleted file mode 100644 (file)
index 577e015..0000000
Binary files a/doc/webcruft/simgrid-101_021.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_022.png b/doc/webcruft/simgrid-101_022.png
deleted file mode 100644 (file)
index 82c0921..0000000
Binary files a/doc/webcruft/simgrid-101_022.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_023.png b/doc/webcruft/simgrid-101_023.png
deleted file mode 100644 (file)
index 7b2a614..0000000
Binary files a/doc/webcruft/simgrid-101_023.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_024.png b/doc/webcruft/simgrid-101_024.png
deleted file mode 100644 (file)
index 7de44ec..0000000
Binary files a/doc/webcruft/simgrid-101_024.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_025.png b/doc/webcruft/simgrid-101_025.png
deleted file mode 100644 (file)
index 795a7b5..0000000
Binary files a/doc/webcruft/simgrid-101_025.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_026.png b/doc/webcruft/simgrid-101_026.png
deleted file mode 100644 (file)
index 47f0b81..0000000
Binary files a/doc/webcruft/simgrid-101_026.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_027.png b/doc/webcruft/simgrid-101_027.png
deleted file mode 100644 (file)
index 658032b..0000000
Binary files a/doc/webcruft/simgrid-101_027.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_028.png b/doc/webcruft/simgrid-101_028.png
deleted file mode 100644 (file)
index bc77424..0000000
Binary files a/doc/webcruft/simgrid-101_028.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_029.png b/doc/webcruft/simgrid-101_029.png
deleted file mode 100644 (file)
index ab0cf28..0000000
Binary files a/doc/webcruft/simgrid-101_029.png and /dev/null differ
diff --git a/doc/webcruft/simgrid-101_030.png b/doc/webcruft/simgrid-101_030.png
deleted file mode 100644 (file)
index 8c00bf1..0000000
Binary files a/doc/webcruft/simgrid-101_030.png and /dev/null differ
index 26e34fc..5d46da3 100644 (file)
@@ -1,11 +1,10 @@
  dofile 'master.lua'
  dofile 'slave.lua' 
+
+  simgrid.init_application();
   --Set Application
    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();
+   simgrid.host.set_function{host="Bourassa",fct="Slave",args="0"};   
index 849b18b..2ce3118 100644 (file)
@@ -1,42 +1,40 @@
 --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);
-  local task_name = simgrid.task.get_name(tk)
-  alias = "slave "..(i%slave_count);
-  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
-
-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
+  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")
+  for i,v in ipairs(arg) do
+      simgrid.info("Got " .. v)
+  end
+
+  local nb_task, comp_size, comm_size, slave_count = unpack(arg)
+
+  simgrid.info("Argc=" .. (#arg) .. " (should be 4)")
+
+  -- Dispatch the tasks
+
+  for i = 1, nb_task do
+    task = simgrid.task.new("Task " .. i, comp_size, comm_size);
+    local task_name = simgrid.task.get_name(task)
+    alias = "slave " .. (i%slave_count);
+    simgrid.info("Master sending  '" .. task_name .. "' To '" .. alias .. "'");
+    simgrid.task.send(task, alias); -- C user data set to NULL
+    simgrid.info("Master done sending '" .. task_name .. "' 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
index 37338f1..55a79d5 100644 (file)
@@ -2,6 +2,7 @@ require "simgrid"
 dofile 'platform.lua'
 dofile 'deploy.lua'
 --Rutform.lua'
+dofile 'master.lua'
+dofile 'slave.lua'
    simgrid.run()
    simgrid.info("Simulation's over.See you.")
-
index 684ce4b..7b5044d 100644 (file)
@@ -12,97 +12,97 @@ $ lua master_slave_bypass.lua --log=surf_parse.thres:critical
 > [Fafard:Slave:(3) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 2
 > [Ginette:Slave:(4) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 3
 > [Bourassa:Slave:(5) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 0
-> [Jupiter:Slave:(2) 9.634668] [lua/INFO] Slave 'slave 1' processing Task 1
-> [Tremblay:Master:(1) 9.634668] [lua/INFO] Master done sending 'Task 1' To 'slave 1'
-> [Tremblay:Master:(1) 9.634668] [lua/INFO] Master sending  'Task 2' To 'slave 2'
-> [Jupiter:Slave:(2) 16.843434] [lua/INFO] Slave 'slave 1': task Task 1 done
-> [Fafard:Slave:(3) 182.700276] [lua/INFO] Slave 'slave 2' processing Task 2
-> [Tremblay:Master:(1) 182.700276] [lua/INFO] Master done sending 'Task 2' To 'slave 2'
-> [Tremblay:Master:(1) 182.700276] [lua/INFO] Master sending  'Task 3' To 'slave 3'
-> [Fafard:Slave:(3) 189.909042] [lua/INFO] Slave 'slave 2': task Task 2 done
-> [Ginette:Slave:(4) 298.047481] [lua/INFO] Slave 'slave 3' processing Task 3
-> [Tremblay:Master:(1) 298.047481] [lua/INFO] Master done sending 'Task 3' To 'slave 3'
-> [Tremblay:Master:(1) 298.047481] [lua/INFO] Master sending  'Task 4' To 'slave 0'
-> [Ginette:Slave:(4) 309.389558] [lua/INFO] Slave 'slave 3': task Task 3 done
-> [Bourassa:Slave:(5) 519.166957] [lua/INFO] Slave 'slave 0' processing Task 4
-> [Tremblay:Master:(1) 519.166957] [lua/INFO] Master done sending 'Task 4' To 'slave 0'
-> [Tremblay:Master:(1) 519.166957] [lua/INFO] Master sending  'Task 5' To 'slave 1'
-> [Jupiter:Slave:(2) 528.801625] [lua/INFO] Slave 'slave 1' processing Task 5
-> [Tremblay:Master:(1) 528.801625] [lua/INFO] Master done sending 'Task 5' To 'slave 1'
-> [Tremblay:Master:(1) 528.801625] [lua/INFO] Master sending  'Task 6' To 'slave 2'
-> [Bourassa:Slave:(5) 530.509034] [lua/INFO] Slave 'slave 0': task Task 4 done
-> [Jupiter:Slave:(2) 536.010391] [lua/INFO] Slave 'slave 1': task Task 5 done
-> [Fafard:Slave:(3) 701.867233] [lua/INFO] Slave 'slave 2' processing Task 6
-> [Tremblay:Master:(1) 701.867233] [lua/INFO] Master done sending 'Task 6' To 'slave 2'
-> [Tremblay:Master:(1) 701.867233] [lua/INFO] Master sending  'Task 7' To 'slave 3'
-> [Fafard:Slave:(3) 709.075999] [lua/INFO] Slave 'slave 2': task Task 6 done
-> [Ginette:Slave:(4) 817.214438] [lua/INFO] Slave 'slave 3' processing Task 7
-> [Tremblay:Master:(1) 817.214438] [lua/INFO] Master done sending 'Task 7' To 'slave 3'
-> [Tremblay:Master:(1) 817.214438] [lua/INFO] Master sending  'Task 8' To 'slave 0'
-> [Ginette:Slave:(4) 828.556515] [lua/INFO] Slave 'slave 3': task Task 7 done
-> [Bourassa:Slave:(5) 1038.333914] [lua/INFO] Slave 'slave 0' processing Task 8
-> [Tremblay:Master:(1) 1038.333914] [lua/INFO] Master done sending 'Task 8' To 'slave 0'
-> [Tremblay:Master:(1) 1038.333914] [lua/INFO] Master sending  'Task 9' To 'slave 1'
-> [Jupiter:Slave:(2) 1047.968582] [lua/INFO] Slave 'slave 1' processing Task 9
-> [Tremblay:Master:(1) 1047.968582] [lua/INFO] Master done sending 'Task 9' To 'slave 1'
-> [Tremblay:Master:(1) 1047.968582] [lua/INFO] Master sending  'Task 10' To 'slave 2'
-> [Bourassa:Slave:(5) 1049.675991] [lua/INFO] Slave 'slave 0': task Task 8 done
-> [Jupiter:Slave:(2) 1055.177348] [lua/INFO] Slave 'slave 1': task Task 9 done
-> [Fafard:Slave:(3) 1221.034190] [lua/INFO] Slave 'slave 2' processing Task 10
-> [Tremblay:Master:(1) 1221.034190] [lua/INFO] Master done sending 'Task 10' To 'slave 2'
-> [Tremblay:Master:(1) 1221.034190] [lua/INFO] Master sending  'Task 11' To 'slave 3'
-> [Fafard:Slave:(3) 1228.242956] [lua/INFO] Slave 'slave 2': task Task 10 done
-> [Ginette:Slave:(4) 1336.381395] [lua/INFO] Slave 'slave 3' processing Task 11
-> [Tremblay:Master:(1) 1336.381395] [lua/INFO] Master done sending 'Task 11' To 'slave 3'
-> [Tremblay:Master:(1) 1336.381395] [lua/INFO] Master sending  'Task 12' To 'slave 0'
-> [Ginette:Slave:(4) 1347.723472] [lua/INFO] Slave 'slave 3': task Task 11 done
-> [Bourassa:Slave:(5) 1557.500871] [lua/INFO] Slave 'slave 0' processing Task 12
-> [Tremblay:Master:(1) 1557.500871] [lua/INFO] Master done sending 'Task 12' To 'slave 0'
-> [Tremblay:Master:(1) 1557.500871] [lua/INFO] Master sending  'Task 13' To 'slave 1'
-> [Jupiter:Slave:(2) 1567.135539] [lua/INFO] Slave 'slave 1' processing Task 13
-> [Tremblay:Master:(1) 1567.135539] [lua/INFO] Master done sending 'Task 13' To 'slave 1'
-> [Tremblay:Master:(1) 1567.135539] [lua/INFO] Master sending  'Task 14' To 'slave 2'
-> [Bourassa:Slave:(5) 1568.842948] [lua/INFO] Slave 'slave 0': task Task 12 done
-> [Jupiter:Slave:(2) 1574.344305] [lua/INFO] Slave 'slave 1': task Task 13 done
-> [Fafard:Slave:(3) 1740.201147] [lua/INFO] Slave 'slave 2' processing Task 14
-> [Tremblay:Master:(1) 1740.201147] [lua/INFO] Master done sending 'Task 14' To 'slave 2'
-> [Tremblay:Master:(1) 1740.201147] [lua/INFO] Master sending  'Task 15' To 'slave 3'
-> [Fafard:Slave:(3) 1747.409913] [lua/INFO] Slave 'slave 2': task Task 14 done
-> [Ginette:Slave:(4) 1855.548352] [lua/INFO] Slave 'slave 3' processing Task 15
-> [Tremblay:Master:(1) 1855.548352] [lua/INFO] Master done sending 'Task 15' To 'slave 3'
-> [Tremblay:Master:(1) 1855.548352] [lua/INFO] Master sending  'Task 16' To 'slave 0'
-> [Ginette:Slave:(4) 1866.890429] [lua/INFO] Slave 'slave 3': task Task 15 done
-> [Bourassa:Slave:(5) 2076.667828] [lua/INFO] Slave 'slave 0' processing Task 16
-> [Tremblay:Master:(1) 2076.667828] [lua/INFO] Master done sending 'Task 16' To 'slave 0'
-> [Tremblay:Master:(1) 2076.667828] [lua/INFO] Master sending  'Task 17' To 'slave 1'
-> [Jupiter:Slave:(2) 2086.302496] [lua/INFO] Slave 'slave 1' processing Task 17
-> [Tremblay:Master:(1) 2086.302496] [lua/INFO] Master done sending 'Task 17' To 'slave 1'
-> [Tremblay:Master:(1) 2086.302496] [lua/INFO] Master sending  'Task 18' To 'slave 2'
-> [Bourassa:Slave:(5) 2088.009905] [lua/INFO] Slave 'slave 0': task Task 16 done
-> [Jupiter:Slave:(2) 2093.511262] [lua/INFO] Slave 'slave 1': task Task 17 done
-> [Fafard:Slave:(3) 2259.368104] [lua/INFO] Slave 'slave 2' processing Task 18
-> [Tremblay:Master:(1) 2259.368104] [lua/INFO] Master done sending 'Task 18' To 'slave 2'
-> [Tremblay:Master:(1) 2259.368104] [lua/INFO] Master sending  'Task 19' To 'slave 3'
-> [Fafard:Slave:(3) 2266.576870] [lua/INFO] Slave 'slave 2': task Task 18 done
-> [Ginette:Slave:(4) 2374.715308] [lua/INFO] Slave 'slave 3' processing Task 19
-> [Tremblay:Master:(1) 2374.715308] [lua/INFO] Master done sending 'Task 19' To 'slave 3'
-> [Tremblay:Master:(1) 2374.715308] [lua/INFO] Master sending  'Task 20' To 'slave 0'
-> [Ginette:Slave:(4) 2386.057386] [lua/INFO] Slave 'slave 3': task Task 19 done
-> [Bourassa:Slave:(5) 2595.834785] [lua/INFO] Slave 'slave 0' processing Task 20
-> [Tremblay:Master:(1) 2595.834785] [lua/INFO] Master done sending 'Task 20' To 'slave 0'
-> [Tremblay:Master:(1) 2595.834785] [lua/INFO] Master: All tasks have been dispatched. Let's tell everybody the computation is over.
-> [Tremblay:Master:(1) 2595.834785] [lua/INFO] Master: sending finalize to slave 0
-> [Bourassa:Slave:(5) 2607.176862] [lua/INFO] Slave 'slave 0': task Task 20 done
-> [Bourassa:Slave:(5) 2828.296338] [lua/INFO] Slave 'slave 0' got finalize msg
-> [Bourassa:Slave:(5) 2828.296338] [lua/INFO] Slave 'slave 0': I'm Done . See You !!
-> [Tremblay:Master:(1) 2828.296338] [lua/INFO] Master: sending finalize to slave 1
-> [Jupiter:Slave:(2) 2837.931006] [lua/INFO] Slave 'slave 1' got finalize msg
-> [Jupiter:Slave:(2) 2837.931006] [lua/INFO] Slave 'slave 1': I'm Done . See You !!
-> [Tremblay:Master:(1) 2837.931006] [lua/INFO] Master: sending finalize to slave 2
-> [Fafard:Slave:(3) 3010.996615] [lua/INFO] Slave 'slave 2' got finalize msg
-> [Fafard:Slave:(3) 3010.996615] [lua/INFO] Slave 'slave 2': I'm Done . See You !!
-> [Tremblay:Master:(1) 3010.996615] [lua/INFO] Master: sending finalize to slave 3
-> [Ginette:Slave:(4) 3126.343819] [lua/INFO] Slave 'slave 3' got finalize msg
-> [Ginette:Slave:(4) 3126.343819] [lua/INFO] Slave 'slave 3': I'm Done . See You !!
-> [Tremblay:Master:(1) 3126.343819] [lua/INFO] Master: Everything's done.
-> [3126.343819] [lua/INFO] Simulation's over.See you.
+> [Jupiter:Slave:(2) 5.405202] [lua/INFO] Slave 'slave 1' processing Task 1
+> [Tremblay:Master:(1) 5.405202] [lua/INFO] Master done sending 'Task 1' To 'slave 1'
+> [Tremblay:Master:(1) 5.405202] [lua/INFO] Master sending  'Task 2' To 'slave 2'
+> [Jupiter:Slave:(2) 12.613968] [lua/INFO] Slave 'slave 1': task Task 1 done
+> [Fafard:Slave:(3) 30.082767] [lua/INFO] Slave 'slave 2' processing Task 2
+> [Tremblay:Master:(1) 30.082767] [lua/INFO] Master done sending 'Task 2' To 'slave 2'
+> [Tremblay:Master:(1) 30.082767] [lua/INFO] Master sending  'Task 3' To 'slave 3'
+> [Fafard:Slave:(3) 37.291533] [lua/INFO] Slave 'slave 2': task Task 2 done
+> [Ginette:Slave:(4) 47.919864] [lua/INFO] Slave 'slave 3' processing Task 3
+> [Tremblay:Master:(1) 47.919864] [lua/INFO] Master done sending 'Task 3' To 'slave 3'
+> [Tremblay:Master:(1) 47.919864] [lua/INFO] Master sending  'Task 4' To 'slave 0'
+> [Ginette:Slave:(4) 59.261941] [lua/INFO] Slave 'slave 3': task Task 3 done
+> [Bourassa:Slave:(5) 78.260299] [lua/INFO] Slave 'slave 0' processing Task 4
+> [Tremblay:Master:(1) 78.260299] [lua/INFO] Master done sending 'Task 4' To 'slave 0'
+> [Tremblay:Master:(1) 78.260299] [lua/INFO] Master sending  'Task 5' To 'slave 1'
+> [Jupiter:Slave:(2) 83.665501] [lua/INFO] Slave 'slave 1' processing Task 5
+> [Tremblay:Master:(1) 83.665501] [lua/INFO] Master done sending 'Task 5' To 'slave 1'
+> [Tremblay:Master:(1) 83.665501] [lua/INFO] Master sending  'Task 6' To 'slave 2'
+> [Bourassa:Slave:(5) 89.602376] [lua/INFO] Slave 'slave 0': task Task 4 done
+> [Jupiter:Slave:(2) 90.874267] [lua/INFO] Slave 'slave 1': task Task 5 done
+> [Fafard:Slave:(3) 108.343066] [lua/INFO] Slave 'slave 2' processing Task 6
+> [Tremblay:Master:(1) 108.343066] [lua/INFO] Master done sending 'Task 6' To 'slave 2'
+> [Tremblay:Master:(1) 108.343066] [lua/INFO] Master sending  'Task 7' To 'slave 3'
+> [Fafard:Slave:(3) 115.551832] [lua/INFO] Slave 'slave 2': task Task 6 done
+> [Ginette:Slave:(4) 126.180163] [lua/INFO] Slave 'slave 3' processing Task 7
+> [Tremblay:Master:(1) 126.180163] [lua/INFO] Master done sending 'Task 7' To 'slave 3'
+> [Tremblay:Master:(1) 126.180163] [lua/INFO] Master sending  'Task 8' To 'slave 0'
+> [Ginette:Slave:(4) 137.522240] [lua/INFO] Slave 'slave 3': task Task 7 done
+> [Bourassa:Slave:(5) 156.520598] [lua/INFO] Slave 'slave 0' processing Task 8
+> [Tremblay:Master:(1) 156.520598] [lua/INFO] Master done sending 'Task 8' To 'slave 0'
+> [Tremblay:Master:(1) 156.520598] [lua/INFO] Master sending  'Task 9' To 'slave 1'
+> [Jupiter:Slave:(2) 161.925800] [lua/INFO] Slave 'slave 1' processing Task 9
+> [Tremblay:Master:(1) 161.925800] [lua/INFO] Master done sending 'Task 9' To 'slave 1'
+> [Tremblay:Master:(1) 161.925800] [lua/INFO] Master sending  'Task 10' To 'slave 2'
+> [Bourassa:Slave:(5) 167.862675] [lua/INFO] Slave 'slave 0': task Task 8 done
+> [Jupiter:Slave:(2) 169.134566] [lua/INFO] Slave 'slave 1': task Task 9 done
+> [Fafard:Slave:(3) 186.603365] [lua/INFO] Slave 'slave 2' processing Task 10
+> [Tremblay:Master:(1) 186.603365] [lua/INFO] Master done sending 'Task 10' To 'slave 2'
+> [Tremblay:Master:(1) 186.603365] [lua/INFO] Master sending  'Task 11' To 'slave 3'
+> [Fafard:Slave:(3) 193.812131] [lua/INFO] Slave 'slave 2': task Task 10 done
+> [Ginette:Slave:(4) 204.440462] [lua/INFO] Slave 'slave 3' processing Task 11
+> [Tremblay:Master:(1) 204.440462] [lua/INFO] Master done sending 'Task 11' To 'slave 3'
+> [Tremblay:Master:(1) 204.440462] [lua/INFO] Master sending  'Task 12' To 'slave 0'
+> [Ginette:Slave:(4) 215.782540] [lua/INFO] Slave 'slave 3': task Task 11 done
+> [Bourassa:Slave:(5) 234.780897] [lua/INFO] Slave 'slave 0' processing Task 12
+> [Tremblay:Master:(1) 234.780897] [lua/INFO] Master done sending 'Task 12' To 'slave 0'
+> [Tremblay:Master:(1) 234.780897] [lua/INFO] Master sending  'Task 13' To 'slave 1'
+> [Jupiter:Slave:(2) 240.186099] [lua/INFO] Slave 'slave 1' processing Task 13
+> [Tremblay:Master:(1) 240.186099] [lua/INFO] Master done sending 'Task 13' To 'slave 1'
+> [Tremblay:Master:(1) 240.186099] [lua/INFO] Master sending  'Task 14' To 'slave 2'
+> [Bourassa:Slave:(5) 246.122974] [lua/INFO] Slave 'slave 0': task Task 12 done
+> [Jupiter:Slave:(2) 247.394865] [lua/INFO] Slave 'slave 1': task Task 13 done
+> [Fafard:Slave:(3) 264.863664] [lua/INFO] Slave 'slave 2' processing Task 14
+> [Tremblay:Master:(1) 264.863664] [lua/INFO] Master done sending 'Task 14' To 'slave 2'
+> [Tremblay:Master:(1) 264.863664] [lua/INFO] Master sending  'Task 15' To 'slave 3'
+> [Fafard:Slave:(3) 272.072430] [lua/INFO] Slave 'slave 2': task Task 14 done
+> [Ginette:Slave:(4) 282.700762] [lua/INFO] Slave 'slave 3' processing Task 15
+> [Tremblay:Master:(1) 282.700762] [lua/INFO] Master done sending 'Task 15' To 'slave 3'
+> [Tremblay:Master:(1) 282.700762] [lua/INFO] Master sending  'Task 16' To 'slave 0'
+> [Ginette:Slave:(4) 294.042839] [lua/INFO] Slave 'slave 3': task Task 15 done
+> [Bourassa:Slave:(5) 313.041196] [lua/INFO] Slave 'slave 0' processing Task 16
+> [Tremblay:Master:(1) 313.041196] [lua/INFO] Master done sending 'Task 16' To 'slave 0'
+> [Tremblay:Master:(1) 313.041196] [lua/INFO] Master sending  'Task 17' To 'slave 1'
+> [Jupiter:Slave:(2) 318.446398] [lua/INFO] Slave 'slave 1' processing Task 17
+> [Tremblay:Master:(1) 318.446398] [lua/INFO] Master done sending 'Task 17' To 'slave 1'
+> [Tremblay:Master:(1) 318.446398] [lua/INFO] Master sending  'Task 18' To 'slave 2'
+> [Bourassa:Slave:(5) 324.383273] [lua/INFO] Slave 'slave 0': task Task 16 done
+> [Jupiter:Slave:(2) 325.655164] [lua/INFO] Slave 'slave 1': task Task 17 done
+> [Fafard:Slave:(3) 343.123963] [lua/INFO] Slave 'slave 2' processing Task 18
+> [Tremblay:Master:(1) 343.123963] [lua/INFO] Master done sending 'Task 18' To 'slave 2'
+> [Tremblay:Master:(1) 343.123963] [lua/INFO] Master sending  'Task 19' To 'slave 3'
+> [Fafard:Slave:(3) 350.332729] [lua/INFO] Slave 'slave 2': task Task 18 done
+> [Ginette:Slave:(4) 360.961061] [lua/INFO] Slave 'slave 3' processing Task 19
+> [Tremblay:Master:(1) 360.961061] [lua/INFO] Master done sending 'Task 19' To 'slave 3'
+> [Tremblay:Master:(1) 360.961061] [lua/INFO] Master sending  'Task 20' To 'slave 0'
+> [Ginette:Slave:(4) 372.303138] [lua/INFO] Slave 'slave 3': task Task 19 done
+> [Bourassa:Slave:(5) 391.301495] [lua/INFO] Slave 'slave 0' processing Task 20
+> [Tremblay:Master:(1) 391.301495] [lua/INFO] Master done sending 'Task 20' To 'slave 0'
+> [Tremblay:Master:(1) 391.301495] [lua/INFO] Master: All tasks have been dispatched. Let's tell everybody the computation is over.
+> [Tremblay:Master:(1) 391.301495] [lua/INFO] Master: sending finalize to slave 0
+> [Bourassa:Slave:(5) 402.643572] [lua/INFO] Slave 'slave 0': task Task 20 done
+> [Tremblay:Master:(1) 432.984007] [lua/INFO] Master: sending finalize to slave 1
+> [Bourassa:Slave:(5) 432.984007] [lua/INFO] Slave 'slave 0' got finalize msg
+> [Bourassa:Slave:(5) 432.984007] [lua/INFO] Slave 'slave 0': I'm Done . See You !!
+> [Jupiter:Slave:(2) 438.389209] [lua/INFO] Slave 'slave 1' got finalize msg
+> [Jupiter:Slave:(2) 438.389209] [lua/INFO] Slave 'slave 1': I'm Done . See You !!
+> [Tremblay:Master:(1) 438.389209] [lua/INFO] Master: sending finalize to slave 2
+> [Fafard:Slave:(3) 463.066774] [lua/INFO] Slave 'slave 2' got finalize msg
+> [Fafard:Slave:(3) 463.066774] [lua/INFO] Slave 'slave 2': I'm Done . See You !!
+> [Tremblay:Master:(1) 463.066774] [lua/INFO] Master: sending finalize to slave 3
+> [Ginette:Slave:(4) 480.903871] [lua/INFO] Slave 'slave 3' got finalize msg
+> [Ginette:Slave:(4) 480.903871] [lua/INFO] Slave 'slave 3': I'm Done . See You !!
+> [Tremblay:Master:(1) 480.903871] [lua/INFO] Master: Everything's done.
+> [480.903871] [lua/INFO] Simulation's over.See you.
index 60e66b9..6e0f88b 100644 (file)
@@ -15,31 +15,31 @@ 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.platf.route_new{src="Tremblay",dest="Jupiter",links="1"};
+simgrid.platf.route_new{src="Tremblay",dest="Fafard",links="0,1,2,3,4,8"};
+simgrid.platf.route_new{src="Tremblay",dest="Ginette",links="3,4,5"};
+simgrid.platf.route_new{src="Tremblay",dest="Bourassa",links="0,1,3,2,4,6,7"};
+
+simgrid.platf.route_new{src="Jupiter",dest="Tremblay",links="1"};
+simgrid.platf.route_new{src="Jupiter",dest="Fafard",links="0,1,2,3,4,8,9"};
+simgrid.platf.route_new{src="Jupiter",dest="Ginette",links="3,4,5,9"};
+simgrid.platf.route_new{src="Jupiter",dest="Bourassa",links="0,1,2,3,4,6,7,9"};
  
-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.platf.route_new{src="Fafard",dest="Tremblay",links="0,1,2,3,4,8"};
+simgrid.platf.route_new{src="Fafard",dest="Jupiter",links="0,1,2,3,4,8,9"};
+simgrid.platf.route_new{src="Fafard",dest="Ginette",links="0,1,2,5,8"};
+simgrid.platf.route_new{src="Fafard",dest="Bourassa",links="6,7,8"};
   
-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.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.route_new{src="Ginette",dest="Tremblay",links="3,4,5"};
+simgrid.platf.route_new{src="Ginette",dest="Jupiter",links="3,4,5,9"};
+simgrid.platf.route_new{src="Ginette",dest="Fafard",links="0,1,2,5,8"};
+simgrid.platf.route_new{src="Ginette",dest="Bourassa",links="0,1,2,5,6,7"};
+
+simgrid.platf.route_new{src="Bourassa",dest="Tremblay",links="0,1,3,2,4,6,7"};
+simgrid.platf.route_new{src="Bourassa",dest="Jupiter",links="0,1,2,3,4,6,7,9"};
+simgrid.platf.route_new{src="Bourassa",dest="Fafard",links="6,7,8"};
+simgrid.platf.route_new{src="Bourassa",dest="Ginette",links="0,1,2,5,6,7"};
 simgrid.platf.AS_close();
-   
+
 simgrid.platf.close();
   
index 1c77467..816fbda 100644 (file)
@@ -3,23 +3,29 @@
 -- 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
 
-while true do
+  local my_mailbox = "slave " .. arg[1]
+  simgrid.info("Hello from lua, I'm a poor slave with mbox: " .. my_mailbox)
 
-  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.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
+  while true do
+
+    local task = simgrid.task.recv(my_mailbox);
+    --print(task)
+    local task_name = task:get_name()
+    if (task:get_name() == "finalize") then
+      simgrid.info("Slave '" .. my_mailbox .. "' got finalize msg");
+      break
+    end
+    --local tk_name = simgrid.task.get_name(tk) 
+    simgrid.info("Slave '" .. my_mailbox .. "' processing " .. task:get_name())
+    simgrid.task.execute(task)
+    simgrid.info("Slave '"  .. my_mailbox .. "': task " .. task:get_name() .. " done")
+  end -- while
 
-simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
+  simgrid.info("Slave '" .. my_mailbox .. "': I'm Done . See You !!");
 
 end 
 -- end_of_slave
index 984dba7..2aeb917 100644 (file)
@@ -4,8 +4,8 @@ dofile 'slave.lua'
 
 require "simgrid"
 
-simgrid.platform(arg[1] or "../../msg/small_platform.xml")
-simgrid.application(arg[2] or "../deploy.xml")
+simgrid.platform(arg[1])
+simgrid.application(arg[2])
 simgrid.run()
 simgrid.info("Simulation's over. See you.")
 -- end-of-master-slave
index 746afe2..c700d63 100644 (file)
@@ -7,7 +7,7 @@
 #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 "simgrid/simix.h"        /* semaphores for the barrier */
+#include "simgrid/simix.h"      /* semaphores for the barrier */
 #include "xbt.h"                /* calloc, printf */
 #include "instr/instr_private.h"
 #include <xbt/replay.h>
  * 
  */
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(actions,
-                             "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(actions, "Messages specific for this msg example");
 int communicator_size = 0;
 
 static void action_Isend(const char *const *action);
 
-typedef struct  {
+typedef struct {
   int last_Irecv_sender_id;
   int bcast_counter;
   int reduce_counter;
   int allReduce_counter;
-  xbt_dynar_t isends; /* of msg_comm_t */
+  xbt_dynar_t isends;           /* of msg_comm_t */
   /* Used to implement irecv+wait */
-  xbt_dynar_t irecvs; /* of msg_comm_t */
-  xbt_dynar_t tasks; /* of msg_task_t */
+  xbt_dynar_t irecvs;           /* of msg_comm_t */
+  xbt_dynar_t tasks;            /* of msg_task_t */
 } s_process_globals_t, *process_globals_t;
 
 /* Helper function */
@@ -69,19 +68,21 @@ static double parse_double(const char *string)
   return value;
 }
 
-static int get_rank (const char *process_name)
+static int get_rank(const char *process_name)
 {
   return atoi(&(process_name[1]));
-} 
+}
 
-static void asynchronous_cleanup(void) {
-  process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
+static void asynchronous_cleanup(void)
+{
+  process_globals_t globals =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   /* Destroy any isend which correspond to completed communications */
   int found;
   msg_comm_t comm;
   while ((found = MSG_comm_testany(globals->isends)) != -1) {
-    xbt_dynar_remove_at(globals->isends,found,&comm);
+    xbt_dynar_remove_at(globals->isends, found, &comm);
     MSG_comm_destroy(comm);
   }
 }
@@ -92,36 +93,24 @@ static void action_send(const char *const *action)
   char *name = NULL;
   char to[250];
   const char *size_str = action[3];
-  double size=parse_double(size_str);
-  double clock = MSG_get_clock(); /* this "call" is free thanks to inlining */
+  double size = parse_double(size_str);
+  double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
 
-  sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()),action[2]);
+  sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()), action[2]);
 
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
     name = xbt_str_join_array(action, " ");
 
-#ifdef HAVE_TRACING
-  int rank = get_rank(MSG_process_get_name(MSG_process_self()));
-  int dst_traced = get_rank(action[2]);
-  TRACE_smpi_ptp_in(rank, rank, dst_traced, "send");
-  TRACE_smpi_send(rank, rank, dst_traced);
-#endif
-
   XBT_DEBUG("Entering Send: %s (size: %lg)", name, size);
-   if (size<65536) {
-     action_Isend(action);
-   } else {
-     MSG_task_send(MSG_task_create(name, 0, size, NULL), to);
-   }
-   
-   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
-
-  free(name);
+  if (size < 65536) {
+    action_Isend(action);
+  } else {
+    MSG_task_send(MSG_task_create(name, 0, size, NULL), to);
+  }
 
-#ifdef HAVE_TRACING
-  TRACE_smpi_ptp_out(rank, rank, dst_traced, "send");
-#endif
+  XBT_VERB("%s %f", name, MSG_get_clock() - clock);
 
+  free(name);
   asynchronous_cleanup();
 }
 
@@ -130,13 +119,14 @@ static void action_Isend(const char *const *action)
   char to[250];
   const char *size = action[3];
   double clock = MSG_get_clock();
-  process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t globals =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
 
-  sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()),action[2]);
+  sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()), action[2]);
   msg_comm_t comm =
-      MSG_task_isend( MSG_task_create(to,0,parse_double(size),NULL), to);
-  xbt_dynar_push(globals->isends,&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()));
   XBT_VERB("%s %f", xbt_str_join_array(action, " "), MSG_get_clock() - clock);
@@ -158,12 +148,6 @@ static void action_recv(const char *const *action)
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
     name = xbt_str_join_array(action, " ");
 
-#ifdef HAVE_TRACING
-  int rank = get_rank(MSG_process_get_name(MSG_process_self()));
-  int src_traced = get_rank(action[2]);
-  TRACE_smpi_ptp_in(rank, src_traced, rank, "recv");
-#endif
-
   XBT_DEBUG("Receiving: %s", name);
   msg_error_t res = MSG_task_receive(&task, mailbox_name);
   //  MSG_task_receive(&task, MSG_process_get_name(MSG_process_self()));
@@ -174,11 +158,6 @@ static void action_recv(const char *const *action)
   }
 
   free(name);
-#ifdef HAVE_TRACING
-  TRACE_smpi_ptp_out(rank, src_traced, rank, "recv");
-  TRACE_smpi_recv(rank, src_traced, rank);
-#endif
-
   asynchronous_cleanup();
 }
 
@@ -186,34 +165,23 @@ static void action_Irecv(const char *const *action)
 {
   char mailbox[250];
   double clock = MSG_get_clock();
-  process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t globals =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   XBT_DEBUG("Irecv on %s", MSG_process_get_name(MSG_process_self()));
-#ifdef HAVE_TRACING
-  int rank = get_rank(MSG_process_get_name(MSG_process_self()));
-  int src_traced = get_rank(action[2]);
-  globals->last_Irecv_sender_id = src_traced;
-  MSG_process_set_data(MSG_process_self(), (void *) globals);
-
-  TRACE_smpi_ptp_in(rank, src_traced, rank, "Irecv");
-#endif
 
   sprintf(mailbox, "%s_%s", action[2],
           MSG_process_get_name(MSG_process_self()));
-  msg_task_t t=NULL;
-  xbt_dynar_push(globals->tasks,&t);
+  msg_task_t t = NULL;
+  xbt_dynar_push(globals->tasks, &t);
   msg_comm_t c =
-      MSG_task_irecv(
-          xbt_dynar_get_ptr(globals->tasks, xbt_dynar_length(globals->tasks)-1),
-          mailbox);
-  xbt_dynar_push(globals->irecvs,&c);
+      MSG_task_irecv(xbt_dynar_get_ptr
+                     (globals->tasks, xbt_dynar_length(globals->tasks) - 1),
+                     mailbox);
+  xbt_dynar_push(globals->irecvs, &c);
 
   XBT_VERB("%s %f", xbt_str_join_array(action, " "), MSG_get_clock() - clock);
 
-#ifdef HAVE_TRACING
-  TRACE_smpi_ptp_out(rank, src_traced, rank, "Irecv");
-#endif
-
   asynchronous_cleanup();
 }
 
@@ -224,34 +192,25 @@ static void action_wait(const char *const *action)
   msg_task_t task = NULL;
   msg_comm_t comm;
   double clock = MSG_get_clock();
-  process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t globals =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   xbt_assert(xbt_dynar_length(globals->irecvs),
-      "action wait not preceded by any irecv: %s", xbt_str_join_array(action," "));
+             "action wait not preceded by any irecv: %s",
+             xbt_str_join_array(action, " "));
 
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
     name = xbt_str_join_array(action, " ");
-#ifdef HAVE_TRACING
-  process_globals_t counters = (process_globals_t) MSG_process_get_data(MSG_process_self());
-  int src_traced = counters->last_Irecv_sender_id;
-  int rank = get_rank(MSG_process_get_name(MSG_process_self()));
-  TRACE_smpi_ptp_in(rank, src_traced, rank, "wait");
-#endif
 
   XBT_DEBUG("Entering %s", name);
-  comm = xbt_dynar_pop_as(globals->irecvs,msg_comm_t);
-  MSG_comm_wait(comm,-1);
-  task = xbt_dynar_pop_as(globals->tasks,msg_task_t);
+  comm = xbt_dynar_pop_as(globals->irecvs, msg_comm_t);
+  MSG_comm_wait(comm, -1);
+  task = xbt_dynar_pop_as(globals->tasks, msg_task_t);
   MSG_comm_destroy(comm);
   MSG_task_destroy(task);
 
   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
   free(name);
-#ifdef HAVE_TRACING
-  TRACE_smpi_ptp_out(rank, src_traced, rank, "wait");
-  TRACE_smpi_recv(rank, src_traced, rank);
-#endif
-
 }
 
 /* FIXME: that's a poor man's implementation: we should take the message exchanges into account */
@@ -260,24 +219,25 @@ static void action_barrier(const char *const *action)
   char *name = NULL;
   static smx_mutex_t mutex = NULL;
   static smx_cond_t cond = NULL;
-  static int processes_arrived_sofar=0;
+  static int processes_arrived_sofar = 0;
 
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
     name = xbt_str_join_array(action, " ");
 
-  if (mutex == NULL) {       // first arriving on the barrier
+  if (mutex == NULL) {          // first arriving on the barrier
     mutex = simcall_mutex_init();
     cond = simcall_cond_init();
-    processes_arrived_sofar=0;
+    processes_arrived_sofar = 0;
   }
-  XBT_DEBUG("Entering barrier: %s (%d already there)", name,processes_arrived_sofar);
+  XBT_DEBUG("Entering barrier: %s (%d already there)", name,
+            processes_arrived_sofar);
 
   simcall_mutex_lock(mutex);
   if (++processes_arrived_sofar == communicator_size) {
     simcall_cond_broadcast(cond);
     simcall_mutex_unlock(mutex);
   } else {
-    simcall_cond_wait(cond,mutex);
+    simcall_cond_wait(cond, mutex);
     simcall_mutex_unlock(mutex);
   }
 
@@ -287,7 +247,7 @@ static void action_barrier(const char *const *action)
   if (!processes_arrived_sofar) {
     simcall_cond_destroy(cond);
     simcall_mutex_destroy(mutex);
-    mutex=NULL;
+    mutex = NULL;
   }
 
   free(name);
@@ -305,10 +265,11 @@ static void action_reduce(const char *const *action)
   const char *process_name;
   double clock = MSG_get_clock();
 
-  process_globals_t counters = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t counters =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   xbt_assert(communicator_size, "Size of Communicator is not defined, "
-      "can't use collective operations");
+             "can't use collective operations");
 
   process_name = MSG_process_get_name(MSG_process_self());
 
@@ -317,31 +278,31 @@ static void action_reduce(const char *const *action)
   if (!strcmp(process_name, "p0")) {
     XBT_DEBUG("%s: %s is the Root", reduce_identifier, process_name);
 
-    msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
-      msg_task_t *tasks = xbt_new0(msg_task_t,communicator_size-1);
-      for (i = 1; i < communicator_size; i++) {
-        sprintf(mailbox, "%s_p%d_p0", reduce_identifier, i);
-        comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
-      }
-      MSG_comm_waitall(comms,communicator_size-1,-1);
-      for (i = 1; i < communicator_size; i++) {
-        MSG_comm_destroy(comms[i-1]);
-        MSG_task_destroy(tasks[i-1]);
-      }
-      free(tasks);
-
-      comp_task = MSG_task_create("reduce_comp", comp_size, 0, NULL);
-      XBT_DEBUG("%s: computing 'reduce_comp'", reduce_identifier);
-      MSG_task_execute(comp_task);
-      MSG_task_destroy(comp_task);
-      XBT_DEBUG("%s: computed", reduce_identifier);
+    msg_comm_t *comms = xbt_new0(msg_comm_t, communicator_size - 1);
+    msg_task_t *tasks = xbt_new0(msg_task_t, communicator_size - 1);
+    for (i = 1; i < communicator_size; i++) {
+      sprintf(mailbox, "%s_p%d_p0", reduce_identifier, i);
+      comms[i - 1] = MSG_task_irecv(&(tasks[i - 1]), mailbox);
+    }
+    MSG_comm_waitall(comms, communicator_size - 1, -1);
+    for (i = 1; i < communicator_size; i++) {
+      MSG_comm_destroy(comms[i - 1]);
+      MSG_task_destroy(tasks[i - 1]);
+    }
+    free(tasks);
+
+    comp_task = MSG_task_create("reduce_comp", comp_size, 0, NULL);
+    XBT_DEBUG("%s: computing 'reduce_comp'", reduce_identifier);
+    MSG_task_execute(comp_task);
+    MSG_task_destroy(comp_task);
+    XBT_DEBUG("%s: computed", reduce_identifier);
 
   } else {
     XBT_DEBUG("%s: %s sends", reduce_identifier, process_name);
     sprintf(mailbox, "%s_%s_p0", reduce_identifier, process_name);
-      XBT_DEBUG("put on %s", mailbox);
-      MSG_task_send(MSG_task_create(reduce_identifier, 0, comm_size, NULL),
-                    mailbox);
+    XBT_DEBUG("put on %s", mailbox);
+    MSG_task_send(MSG_task_create(reduce_identifier, 0, comm_size, NULL),
+                  mailbox);
   }
 
   XBT_VERB("%s %f", xbt_str_join_array(action, " "), MSG_get_clock() - clock);
@@ -358,10 +319,11 @@ static void action_bcast(const char *const *action)
   const char *process_name;
   double clock = MSG_get_clock();
 
-  process_globals_t counters = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t counters =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   xbt_assert(communicator_size, "Size of Communicator is not defined, "
-      "can't use collective operations");
+             "can't use collective operations");
 
   process_name = MSG_process_get_name(MSG_process_self());
 
@@ -370,27 +332,26 @@ static void action_bcast(const char *const *action)
   if (!strcmp(process_name, "p0")) {
     XBT_DEBUG("%s: %s is the Root", bcast_identifier, process_name);
 
-      msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
+    msg_comm_t *comms = xbt_new0(msg_comm_t, communicator_size - 1);
 
-      for (i = 1; i < communicator_size; i++) {
-        sprintf(mailbox, "%s_p0_p%d", bcast_identifier, i);
-        comms[i-1] =
-            MSG_task_isend(MSG_task_create(mailbox,0,comm_size,NULL),
-                mailbox);
-      }
-      MSG_comm_waitall(comms,communicator_size-1,-1);
+    for (i = 1; i < communicator_size; i++) {
+      sprintf(mailbox, "%s_p0_p%d", bcast_identifier, i);
+      comms[i - 1] =
+          MSG_task_isend(MSG_task_create(mailbox, 0, comm_size, NULL), mailbox);
+    }
+    MSG_comm_waitall(comms, communicator_size - 1, -1);
     for (i = 1; i < communicator_size; i++)
-         MSG_comm_destroy(comms[i-1]);
-      free(comms);
+      MSG_comm_destroy(comms[i - 1]);
+    free(comms);
 
-      XBT_DEBUG("%s: all messages sent by %s have been received",
-             bcast_identifier, process_name);
+    XBT_DEBUG("%s: all messages sent by %s have been received",
+              bcast_identifier, process_name);
 
   } else {
-      sprintf(mailbox, "%s_p0_%s", bcast_identifier, process_name);
-      MSG_task_receive(&task, mailbox);
-      MSG_task_destroy(task);
-      XBT_DEBUG("%s: %s has received", bcast_identifier, process_name);
+    sprintf(mailbox, "%s_p0_%s", bcast_identifier, process_name);
+    MSG_task_receive(&task, mailbox);
+    MSG_task_destroy(task);
+    XBT_DEBUG("%s: %s has received", bcast_identifier, process_name);
   }
 
   XBT_VERB("%s %f", xbt_str_join_array(action, " "), MSG_get_clock() - clock);
@@ -414,7 +375,8 @@ static void action_sleep(const char *const *action)
   free(name);
 }
 
-static void action_allReduce(const char *const *action) {
+static void action_allReduce(const char *const *action)
+{
   int i;
   char *allreduce_identifier;
   char mailbox[80];
@@ -424,10 +386,11 @@ static void action_allReduce(const char *const *action) {
   const char *process_name;
   double clock = MSG_get_clock();
 
-  process_globals_t counters = (process_globals_t) MSG_process_get_data(MSG_process_self());
+  process_globals_t counters =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
 
   xbt_assert(communicator_size, "Size of Communicator is not defined, "
-              "can't use collective operations");
+             "can't use collective operations");
 
   process_name = MSG_process_get_name(MSG_process_self());
 
@@ -436,16 +399,16 @@ static void action_allReduce(const char *const *action) {
   if (!strcmp(process_name, "p0")) {
     XBT_DEBUG("%s: %s is the Root", allreduce_identifier, process_name);
 
-    msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
-    msg_task_t *tasks = xbt_new0(msg_task_t,communicator_size-1);
+    msg_comm_t *comms = xbt_new0(msg_comm_t, communicator_size - 1);
+    msg_task_t *tasks = xbt_new0(msg_task_t, communicator_size - 1);
     for (i = 1; i < communicator_size; i++) {
       sprintf(mailbox, "%s_p%d_p0", allreduce_identifier, i);
-      comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
+      comms[i - 1] = MSG_task_irecv(&(tasks[i - 1]), mailbox);
     }
-    MSG_comm_waitall(comms,communicator_size-1,-1);
+    MSG_comm_waitall(comms, communicator_size - 1, -1);
     for (i = 1; i < communicator_size; i++) {
-      MSG_comm_destroy(comms[i-1]);
-      MSG_task_destroy(tasks[i-1]);
+      MSG_comm_destroy(comms[i - 1]);
+      MSG_task_destroy(tasks[i - 1]);
     }
     free(tasks);
 
@@ -457,17 +420,16 @@ static void action_allReduce(const char *const *action) {
 
     for (i = 1; i < communicator_size; i++) {
       sprintf(mailbox, "%s_p0_p%d", allreduce_identifier, i);
-      comms[i-1] =
-          MSG_task_isend(MSG_task_create(mailbox,0,comm_size,NULL),
-              mailbox);
+      comms[i - 1] =
+          MSG_task_isend(MSG_task_create(mailbox, 0, comm_size, NULL), mailbox);
     }
-    MSG_comm_waitall(comms,communicator_size-1,-1);
+    MSG_comm_waitall(comms, communicator_size - 1, -1);
     for (i = 1; i < communicator_size; i++)
-       MSG_comm_destroy(comms[i-1]);
+      MSG_comm_destroy(comms[i - 1]);
     free(comms);
 
     XBT_DEBUG("%s: all messages sent by %s have been received",
-           allreduce_identifier, process_name);
+              allreduce_identifier, process_name);
 
   } else {
     XBT_DEBUG("%s: %s sends", allreduce_identifier, process_name);
@@ -482,8 +444,8 @@ static void action_allReduce(const char *const *action) {
     XBT_DEBUG("%s: %s has received", allreduce_identifier, process_name);
   }
 
-  if (XBT_LOG_ISENABLED(actions,xbt_log_priority_verbose)) {
-    char *a =  xbt_str_join_array(action, " ");
+  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) {
+    char *a = xbt_str_join_array(action, " ");
     XBT_VERB("%s %f", a, MSG_get_clock() - clock);
     free(a);
   }
@@ -520,26 +482,22 @@ static void action_compute(const char *const *action)
 }
 
 static void action_init(const char *const *action)
-{ 
-#ifdef HAVE_TRACING
-  TRACE_smpi_init(get_rank(MSG_process_get_name(MSG_process_self())));
-#endif
+{
   XBT_DEBUG("Initialize the counters");
-  process_globals_t globals = (process_globals_t) calloc(1, sizeof(s_process_globals_t));
-  globals->isends = xbt_dynar_new(sizeof(msg_comm_t),NULL);
-  globals->irecvs = xbt_dynar_new(sizeof(msg_comm_t),NULL);
-  globals->tasks  = xbt_dynar_new(sizeof(msg_task_t),NULL);
-  MSG_process_set_data(MSG_process_self(),globals);
+  process_globals_t globals =
+      (process_globals_t) calloc(1, sizeof(s_process_globals_t));
+  globals->isends = xbt_dynar_new(sizeof(msg_comm_t), NULL);
+  globals->irecvs = xbt_dynar_new(sizeof(msg_comm_t), NULL);
+  globals->tasks = xbt_dynar_new(sizeof(msg_task_t), NULL);
+  MSG_process_set_data(MSG_process_self(), globals);
 
 }
 
 static void action_finalize(const char *const *action)
 {
-#ifdef HAVE_TRACING
-  TRACE_smpi_finalize(get_rank(MSG_process_get_name(MSG_process_self())));
-#endif
-  process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
-  if (globals){
+  process_globals_t globals =
+      (process_globals_t) MSG_process_get_data(MSG_process_self());
+  if (globals) {
     xbt_dynar_free_container(&(globals->isends));
     xbt_dynar_free_container(&(globals->irecvs));
     xbt_dynar_free_container(&(globals->tasks));
@@ -555,8 +513,7 @@ int main(int argc, char *argv[])
   /* Check the given arguments */
   MSG_init(&argc, argv);
   if (argc < 3) {
-    printf("Usage: %s platform_file deployment_file [action_files]\n",
-           argv[0]);
+    printf("Usage: %s platform_file deployment_file [action_files]\n", argv[0]);
     printf
         ("example: %s msg_platform.xml msg_deployment.xml actions # if all actions are in the same file\n",
          argv[0]);
@@ -573,20 +530,20 @@ int main(int argc, char *argv[])
   MSG_launch_application(argv[2]);
 
   /*   Action registration */
-  xbt_replay_action_register("init",     action_init);
+  xbt_replay_action_register("init", action_init);
   xbt_replay_action_register("finalize", action_finalize);
-  xbt_replay_action_register("comm_size",action_comm_size);
-  xbt_replay_action_register("send",     action_send);
-  xbt_replay_action_register("Isend",    action_Isend);
-  xbt_replay_action_register("recv",     action_recv);
-  xbt_replay_action_register("Irecv",    action_Irecv);
-  xbt_replay_action_register("wait",     action_wait);
-  xbt_replay_action_register("barrier",  action_barrier);
-  xbt_replay_action_register("bcast",    action_bcast);
-  xbt_replay_action_register("reduce",   action_reduce);
-  xbt_replay_action_register("allReduce",action_allReduce);
-  xbt_replay_action_register("sleep",    action_sleep);
-  xbt_replay_action_register("compute",  action_compute);
+  xbt_replay_action_register("comm_size", action_comm_size);
+  xbt_replay_action_register("send", action_send);
+  xbt_replay_action_register("Isend", action_Isend);
+  xbt_replay_action_register("recv", action_recv);
+  xbt_replay_action_register("Irecv", action_Irecv);
+  xbt_replay_action_register("wait", action_wait);
+  xbt_replay_action_register("barrier", action_barrier);
+  xbt_replay_action_register("bcast", action_bcast);
+  xbt_replay_action_register("reduce", action_reduce);
+  xbt_replay_action_register("allReduce", action_allReduce);
+  xbt_replay_action_register("sleep", action_sleep);
+  xbt_replay_action_register("compute", action_compute);
 
 
   /* Actually do the simulation using MSG_action_trace_run */
index 7147b50..77d2da5 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright (c) 2012. 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 "bittorrent.h"
diff --git a/examples/msg/chainsend/CMakeLists.txt b/examples/msg/chainsend/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2272988
--- /dev/null
@@ -0,0 +1,44 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(chainsend chainsend.c iterator.c common.c messages.c broadcaster.c peer.c)
+
+### Add definitions for compile
+target_link_libraries(chainsend simgrid m )
+
+set(tesh_files
+  ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/chainsend.tesh
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_chainsend.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/platform_chainsend.xml
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/iterator.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/iterator.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/common.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/common.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/messages.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/messages.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/broadcaster.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/broadcaster.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/peer.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/peer.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/chainsend.c
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/README
+  PARENT_SCOPE
+  )
diff --git a/examples/msg/chainsend/README b/examples/msg/chainsend/README
new file mode 100644 (file)
index 0000000..37f09ef
--- /dev/null
@@ -0,0 +1,12 @@
+====================================================
+           Chainsend MSG implementation
+====================================================
+Directory : SG_INSTALL_DIR/examples/msg/chainsend
+Content   : Chainsend MSG implementation
+Author    : Maximiliano Geier
+====================================================
+
+
+This directory contains an implementation of a
+file broadcasting system, similar to Kastafior, 
+the one found in Kadeploy, using MSG. 
diff --git a/examples/msg/chainsend/broadcaster.c b/examples/msg/chainsend/broadcaster.c
new file mode 100644 (file)
index 0000000..8ab4f44
--- /dev/null
@@ -0,0 +1,156 @@
+#include "broadcaster.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_broadcaster,
+                             "Messages specific for the broadcaster");
+
+xbt_dynar_t build_hostlist_from_hostcount(int hostcount)
+{
+  xbt_dynar_t host_list = xbt_dynar_new(sizeof(char*), NULL);
+  char *hostname = NULL;
+  int i = 1;
+  
+  for (; i < hostcount+1; i++) {
+    hostname = xbt_new(char, HOSTNAME_LENGTH);
+    snprintf(hostname, HOSTNAME_LENGTH, "host%d", i);
+    XBT_DEBUG("%s", hostname);
+    xbt_dynar_push(host_list, &hostname);
+  }
+  return host_list;
+}
+
+int broadcaster_build_chain(broadcaster_t bc)
+{
+  msg_task_t task = NULL;
+  char **cur = (char**)xbt_dynar_iterator_next(bc->it);
+  const char *me = "host0"; /* FIXME: hardcoded*/ /*MSG_host_get_name(MSG_host_self());*/
+  const char *current_host = NULL;
+  const char *prev = NULL;
+  const char *next = NULL;
+  const char *last = NULL;
+
+  /* Build the chain if there's at least one peer */
+  if (cur != NULL) {
+    /* init: prev=NULL, host=current cur, next=next cur */
+    next = *cur;
+    bc->first = next;
+
+    /* This iterator iterates one step ahead: cur is current iterated element, 
+       but it's actually the next one in the chain */
+    do {
+      /* following steps: prev=last, host=next, next=cur */
+      cur = (char**)xbt_dynar_iterator_next(bc->it);
+      prev = last;
+      current_host = next;
+      if (cur != NULL)
+        next = *cur;
+      else
+        next = NULL;
+      XBT_DEBUG("Building chain -- broadcaster:\"%s\" dest:\"%s\" prev:\"%s\" next:\"%s\"", me, current_host, prev, next);
+    
+      /* Send message to current peer */
+      task = task_message_chain_new(me, current_host, prev, next);
+      //MSG_task_set_category(task, current_host);
+      MSG_task_send(task, current_host);
+
+      last = current_host;
+    } while (cur != NULL);
+  }
+
+  return MSG_OK;
+}
+
+int broadcaster_send_file(broadcaster_t bc)
+{
+  const char *me = "host0"; /* FIXME: hardcoded*/ /*MSG_host_get_name(MSG_host_self());*/
+  //msg_comm_t comm = NULL;
+  msg_task_t task = NULL;
+
+  bc->current_piece = 0;
+
+  while (bc->current_piece < bc->piece_count) {
+    task = task_message_data_new(me, bc->first, NULL, PIECE_SIZE);
+    XBT_DEBUG("Sending (send) piece %d from %s into mailbox %s", bc->current_piece, me, bc->first);
+    MSG_task_send(task, bc->first);
+    bc->current_piece++;
+  }
+
+  return MSG_OK;
+}
+
+int broadcaster_finish(broadcaster_t bc)
+{
+  msg_task_t task = NULL;
+  const char *me = "host0"; /* FIXME: hardcoded*/ /*MSG_host_get_name(MSG_host_self());*/
+  const char *current_host = NULL;
+  char **cur = NULL;
+
+  xbt_dynar_iterator_seek(bc->it, 0);
+
+  /* Send goodbye message to every peer in the order generated by iterator it */
+  for (cur = (char**)xbt_dynar_iterator_next(bc->it); cur != NULL; cur = (char**)xbt_dynar_iterator_next(bc->it)) {
+    /* Send message to current peer */
+    current_host = *cur;
+    task = task_message_end_data_new(me, current_host);
+    //MSG_task_set_category(task, current_host);
+    MSG_task_send(task, current_host);
+  }
+
+  return MSG_OK;
+}
+
+broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count)
+{
+  int status;
+  broadcaster_t bc = xbt_new(s_broadcaster_t, 1);
+
+  bc->piece_count = piece_count;
+  bc->current_piece = 0;
+  bc->host_list = host_list;
+  bc->it = xbt_dynar_iterator_new(bc->host_list, forward_indices_list);
+  bc->max_pending_sends = MAX_PENDING_SENDS;
+  bc->pending_sends = xbt_dynar_new(sizeof(msg_comm_t), NULL);
+
+  status = broadcaster_build_chain(bc);
+  xbt_assert(status == MSG_OK, "Chain initialization failed");
+
+  return bc;
+}
+
+static void broadcaster_destroy(broadcaster_t bc)
+{
+  /* Destroy iterator and hostlist */
+  xbt_dynar_iterator_delete(bc->it);
+  xbt_dynar_free(&bc->pending_sends);
+  xbt_dynar_free(&bc->host_list);
+}
+
+/** Emitter function  */
+int broadcaster(int argc, char *argv[])
+{
+  broadcaster_t bc = NULL;
+  xbt_dynar_t host_list = NULL;
+  int status;
+  unsigned int piece_count = PIECE_COUNT;
+
+  XBT_DEBUG("broadcaster");
+
+  /* Add every mailbox given by the hostcount in argv[1] to a dynamic array */
+  host_list = build_hostlist_from_hostcount(atoi(argv[1]));
+
+  /* argv[2] is the number of pieces */
+  if (argc > 2) {
+    piece_count = atoi(argv[2]);
+    XBT_DEBUG("piece_count set to %d", piece_count);
+  } else {
+    XBT_DEBUG("No piece_count specified, defaulting to %d", piece_count);
+  }
+  bc = broadcaster_init(host_list, piece_count);
+
+  /* TODO: Error checking */
+  status = broadcaster_send_file(bc);
+  status = broadcaster_finish(bc);
+
+  broadcaster_destroy(bc);
+
+  return status;
+}
diff --git a/examples/msg/chainsend/broadcaster.h b/examples/msg/chainsend/broadcaster.h
new file mode 100644 (file)
index 0000000..44fe4cc
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef KADEPLOY_BROADCASTER_H
+#define KADEPLOY_BROADCASTER_H
+
+#include "msg/msg.h"
+#include "xbt/sysdep.h"
+
+/* Create a log channel to have nice outputs. */
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+
+#include "messages.h"
+#include "iterator.h"
+#include "common.h"
+
+/* Connection parameters */
+#define MAX_PENDING_SENDS 10
+
+/* Default values for the ``file'' details */
+#define PIECE_SIZE 65536
+#define PIECE_COUNT 16384
+
+/* Broadcaster struct */
+typedef struct s_broadcaster {
+  const char *first;
+  int piece_count;
+  int current_piece;
+  xbt_dynar_t host_list;
+  xbt_dynar_iterator_t it;
+  int max_pending_sends;
+  xbt_dynar_t pending_sends;
+} s_broadcaster_t, *broadcaster_t;
+
+xbt_dynar_t build_hostlist_from_hostcount(int hostcount); 
+
+/* Broadcaster: helper functions */
+broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count);
+int broadcaster_build_chain(broadcaster_t bc);
+int broadcaster_send_file(broadcaster_t bc);
+int broadcaster_finish(broadcaster_t bc);
+static void broadcaster_destroy(broadcaster_t bc);
+
+/* Tasks */
+int broadcaster(int argc, char *argv[]);
+
+#endif /* KADEPLOY_BROADCASTER_H */
diff --git a/examples/msg/chainsend/chainsend.c b/examples/msg/chainsend/chainsend.c
new file mode 100644 (file)
index 0000000..ae6f7d3
--- /dev/null
@@ -0,0 +1,120 @@
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * Copyright (c) 2012. Maximiliano Geier.
+ * 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"            /* 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"
+#include "xbt/asserts.h"
+
+#include "iterator.h"
+#include "messages.h"
+#include "broadcaster.h"
+#include "peer.h"
+
+/** @addtogroup MSG_examples
+ * 
+ *  - <b>chainsend/chainsend.c: Chainsend implementation</b>.
+ */
+
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_chainsend,
+                             "Messages specific for chainsend");
+
+/*
+ Data structures
+ */
+
+/* Initialization stuff */
+msg_error_t test_all(const char *platform_file,
+                     const char *application_file);
+
+
+/** Test function */
+msg_error_t test_all(const char *platform_file,
+                     const char *application_file)
+{
+
+  msg_error_t res = MSG_OK;
+
+
+
+  XBT_DEBUG("test_all");
+
+  /*  Simulation setting */
+  MSG_create_environment(platform_file);
+
+  /* Trace categories */
+  TRACE_category_with_color("host0", "0 0 1");
+  TRACE_category_with_color("host1", "0 1 0");
+  TRACE_category_with_color("host2", "0 1 1");
+  TRACE_category_with_color("host3", "1 0 0");
+  TRACE_category_with_color("host4", "1 0 1");
+  TRACE_category_with_color("host5", "0 0 0");
+  TRACE_category_with_color("host6", "1 1 0");
+  TRACE_category_with_color("host7", "1 1 1");
+  TRACE_category_with_color("host8", "0 1 0");
+
+  /*   Application deployment */
+  MSG_function_register("broadcaster", broadcaster);
+  MSG_function_register("peer", peer);
+
+  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;
+
+#ifdef _MSC_VER
+  unsigned int prev_exponent_format =
+      _set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
+
+  MSG_init(&argc, argv);
+
+  /*if (argc <= 3) {
+    XBT_CRITICAL("Usage: %s platform_file deployment_file <model>\n",
+              argv[0]);
+    XBT_CRITICAL
+        ("example: %s msg_platform.xml msg_deployment.xml KCCFLN05_Vegas\n",
+         argv[0]);
+    exit(1);
+  }*/
+
+  /* Options for the workstation/model:
+
+     KCCFLN05              => for maxmin
+     KCCFLN05_proportional => for proportional (Vegas)
+     KCCFLN05_Vegas        => for TCP Vegas
+     KCCFLN05_Reno         => for TCP Reno
+   */
+  //MSG_config("workstation/model", argv[3]);
+
+  res = test_all(argv[1], argv[2]);
+
+  XBT_INFO("Total simulation time: %le", MSG_get_clock());
+
+#ifdef _MSC_VER
+  _set_output_format(prev_exponent_format);
+#endif
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
diff --git a/examples/msg/chainsend/chainsend.tesh b/examples/msg/chainsend/chainsend.tesh
new file mode 100644 (file)
index 0000000..538becf
--- /dev/null
@@ -0,0 +1,16 @@
+#! ./tesh
+
+p Testing the chainsend MSG implementation
+
+! timeout 10
+! output sort
+$ $SG_TEST_EXENV ${bindir:=.}/chainsend ${srcdir:=.}/platform_chainsend.xml ${srcdir:=.}/deployment_tesh.xml "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n"
+> [    5.683972] (2:peer@host1) ### 5.683972 536870912 bytes (Avg 90.077856 MB/s); copy finished (simulated).
+> [    6.936704] (3:peer@host2) ### 6.936704 536870912 bytes (Avg 73.810274 MB/s); copy finished (simulated).
+> [    6.951030] (4:peer@host3) ### 6.951030 536870912 bytes (Avg 73.658146 MB/s); copy finished (simulated).
+> [    6.951486] (5:peer@host4) ### 6.951486 536870912 bytes (Avg 73.653321 MB/s); copy finished (simulated).
+> [    7.170536] (9:peer@host8) ### 7.170536 536870912 bytes (Avg 71.403309 MB/s); copy finished (simulated).
+> [    7.952668] (6:peer@host5) ### 7.952668 536870912 bytes (Avg 64.380908 MB/s); copy finished (simulated).
+> [    7.972487] (7:peer@host6) ### 7.972486 536870912 bytes (Avg 64.220868 MB/s); copy finished (simulated).
+> [    8.972948] (0:@) Total simulation time: 8.972948e+00
+> [    8.972948] (8:peer@host7) ### 8.972948 536870912 bytes (Avg 57.060399 MB/s); copy finished (simulated).
diff --git a/examples/msg/chainsend/common.c b/examples/msg/chainsend/common.c
new file mode 100644 (file)
index 0000000..37f2b74
--- /dev/null
@@ -0,0 +1,21 @@
+#include "common.h"
+
+int process_pending_connections(xbt_dynar_t q)
+{
+  unsigned int iter;
+  int status;
+  int empty = 0;
+  msg_comm_t comm;
+
+  xbt_dynar_foreach(q, iter, comm) {
+    empty = 1;
+    if (MSG_comm_test(comm)) {
+      MSG_comm_destroy(comm);
+      status = MSG_comm_get_status(comm);
+      xbt_assert(status == MSG_OK, "process_pending_connections() failed");
+      xbt_dynar_cursor_rm(q, &iter);
+      empty = 0;
+    }
+  }
+  return empty;
+}
diff --git a/examples/msg/chainsend/common.h b/examples/msg/chainsend/common.h
new file mode 100644 (file)
index 0000000..eaf2de1
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef KADEPLOY_COMMON_H
+#define KADEPLOY_COMMON_H
+
+#include "msg/msg.h"
+#include "xbt/sysdep.h"
+
+static XBT_INLINE void queue_pending_connection(msg_comm_t comm, xbt_dynar_t q)
+{
+  xbt_dynar_push(q, &comm);
+}
+
+int process_pending_connections(xbt_dynar_t q);
+
+#define MESSAGE_SIZE 1
+#define HOSTNAME_LENGTH 20
+
+#endif /* KADEPLOY_COMMON_H */
diff --git a/examples/msg/chainsend/deployment_chainsend.xml b/examples/msg/chainsend/deployment_chainsend.xml
new file mode 100644 (file)
index 0000000..e190c88
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3"><!-- For using with chainsend, platform_chainsend.xml -->
+
+  <!-- Broadcaster -->
+  <process host="host0" function="broadcaster">
+       <argument value="8"/> <!-- number of peers -->
+  </process>
+
+  <!-- Peers -->
+  <process host="host1" function="peer">
+       <argument value="1"/>
+  </process>
+  <process host="host2" function="peer">
+       <argument value="2"/>
+  </process>
+  <process host="host3" function="peer">
+       <argument value="3"/>
+  </process>
+  <process host="host4" function="peer">
+       <argument value="4"/>
+  </process>
+  <process host="host5" function="peer">
+       <argument value="5"/>
+  </process>
+  <process host="host6" function="peer">
+       <argument value="6"/>
+  </process>
+  <process host="host7" function="peer">
+       <argument value="7"/>
+  </process>
+  <process host="host8" function="peer">
+       <argument value="8"/>
+  </process>
+  <!--<process host="host9" function="peer">
+       <argument value="9"/>
+  </process>-->
+</platform>
diff --git a/examples/msg/chainsend/deployment_tesh.xml b/examples/msg/chainsend/deployment_tesh.xml
new file mode 100644 (file)
index 0000000..72825f5
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3"><!-- For using with chainsend -->
+
+  <!-- Broadcaster -->
+  <process host="host0" function="broadcaster">
+       <argument value="8"/> <!-- number of peers -->
+       <argument value="8192"/> <!-- number of pieces -->
+  </process>
+
+  <!-- Peers -->
+  <process host="host1" function="peer">
+       <argument value="1"/>
+  </process>
+  <process host="host2" function="peer">
+       <argument value="2"/>
+  </process>
+  <process host="host3" function="peer">
+       <argument value="3"/>
+  </process>
+  <process host="host4" function="peer">
+       <argument value="4"/>
+  </process>
+  <process host="host5" function="peer">
+       <argument value="5"/>
+  </process>
+  <process host="host6" function="peer">
+       <argument value="6"/>
+  </process>
+  <process host="host7" function="peer">
+       <argument value="7"/>
+  </process>
+  <process host="host8" function="peer">
+       <argument value="8"/>
+  </process>
+</platform>
diff --git a/examples/msg/chainsend/generate_deployment_file.rb b/examples/msg/chainsend/generate_deployment_file.rb
new file mode 100755 (executable)
index 0000000..3adb0d7
--- /dev/null
@@ -0,0 +1,105 @@
+#!/usr/bin/env ruby
+
+require 'rexml/document'
+
+class HostsExtractor
+  @@doc = nil
+  @@hosts = []
+
+  def initialize(xml)
+    @@doc = REXML::Document.new(xml)
+    @@doc.elements.each('platform') do |platform|
+      extract_hosts(platform)
+    end
+  end
+
+  def extract_hosts(doc)
+    doc.elements.each('AS') do |as|
+      extract_hosts_from_AS(as)
+      extract_hosts(as)
+    end
+  end
+
+  def extract_hosts_from_AS(doc)
+    doc.elements.each('host') do |h|
+      @@hosts << h.attributes['id']
+      puts "hosts %s" % h.attributes['id']
+    end
+
+    doc.elements.each('cluster') do |c|
+      prefix = c.attributes['prefix']
+      suffix = c.attributes['suffix']
+      puts "%s %s %s" % [prefix, c.attributes['radical'], suffix]
+      expand_radical(c.attributes['radical']).each do |num|
+        @@hosts << "%s%s%s" % [prefix, num, suffix]
+      end
+    end
+  end
+
+  def hosts
+    return @@hosts
+  end
+
+  def expand_radical(radical)
+   l = []
+   puts radical
+   radical.split(',').each do |range|
+     range.scan(/^\d+$/) { |x| l << x }
+     range.scan(/^(\d+)-(\d+)$/) { |x, y| (x..y).each do |i| l << i end }
+   end
+   return l
+  end
+end
+
+class DeploymentGenerator
+  @@outfile = nil
+
+  def initialize(fname)
+    @@outfile = File.new(fname, "w")
+  end
+
+  def write_header
+    @@outfile.puts "<?xml version='1.0'?>"
+    @@outfile.puts "<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid.dtd\">"
+    @@outfile.puts "<platform version=\"3\">"
+  end
+
+  def write_process(name, function, hosts, args)
+    @@outfile.puts "  <!-- %s -->" % name
+    hosts.zip(args).each do |h, a|
+      @@outfile.puts "  <process host=\"%s\" function=\"%s\">" % [h, function]
+      @@outfile.puts "    <argument value=\"%s\"/>" % [a]
+      @@outfile.puts "  </process>"
+    end
+  end
+
+  def write_footer
+    @@outfile.puts "</platform>"
+  end
+end
+
+xml = File.read(ARGV.shift)
+he = HostsExtractor.new(xml)
+
+raise "Cannot run with less than 2 hosts" unless he.hosts.size > 1
+
+output = ARGV.shift
+n = ARGV.shift
+if n == nil or n.to_i < 2
+  n = he.hosts.size - 1
+else
+  n = n.to_i - 1
+end
+puts n
+
+dg = DeploymentGenerator.new(output)
+dg.write_header
+
+puts he.hosts
+broadcaster = he.hosts.shift
+peers = he.hosts
+
+dg.write_process("Broadcaster", "broadcaster", [broadcaster], [n])
+dg.write_process("Peers", "peer", peers[0..n-1], (1..n))
+
+dg.write_footer
diff --git a/examples/msg/chainsend/iterator.c b/examples/msg/chainsend/iterator.c
new file mode 100644 (file)
index 0000000..47dfe04
--- /dev/null
@@ -0,0 +1,96 @@
+#include "iterator.h"
+
+/* http://stackoverflow.com/a/3348142 */
+static int rand_int(int n)
+{
+  int limit = RAND_MAX - RAND_MAX % n;
+  int rnd;
+
+  do {
+    rnd = rand();
+  } while (rnd >= limit);
+  
+  return rnd % n;
+}
+
+void xbt_dynar_shuffle_in_place(xbt_dynar_t indices_list)
+{
+  int i, j;
+
+  for (i = xbt_dynar_length(indices_list) - 1; i > 0; i--) {
+    j = rand_int(i + 1);
+    xbt_dynar_swap_elements(indices_list, int, i, j);
+  }
+}
+/**************************************/
+
+/* Allocates and initializes a new xbt_dynar iterator for list, using criteria_fn as iteration criteria
+   criteria_fn: given an array size, it must generate a list containing the indices of every item in some order */
+xbt_dynar_iterator_t xbt_dynar_iterator_new(xbt_dynar_t list, xbt_dynar_t (*criteria_fn)(int))
+{
+  xbt_dynar_iterator_t it = xbt_new(xbt_dynar_iterator_s, 1);
+  
+  it->list = list;
+  it->length = xbt_dynar_length(list);
+  it->indices_list = criteria_fn(it->length); //xbt_dynar_new(sizeof(int), NULL);
+  it->criteria_fn = criteria_fn;
+  it->current = 0;
+
+  return it;
+}
+
+void xbt_dynar_iterator_reset(xbt_dynar_iterator_t it)
+{
+  xbt_dynar_free_container(&(it->indices_list));
+  it->indices_list = it->criteria_fn(it->length);
+  it->current = 0;
+}
+
+void xbt_dynar_iterator_seek(xbt_dynar_iterator_t it, int pos)
+{
+  it->current = pos;
+}
+
+/* Returns the next element iterated by iterator it, NULL if there are no more elements */
+void *xbt_dynar_iterator_next(xbt_dynar_iterator_t it)
+{
+  int *next;
+  if (it->current >= it->length) {
+    return NULL;
+  } else {
+    next = xbt_dynar_get_ptr(it->indices_list, it->current);
+    it->current++;
+    return xbt_dynar_get_ptr(it->list, *next);
+  }
+}
+
+void xbt_dynar_iterator_delete(xbt_dynar_iterator_t it)
+{
+  xbt_dynar_free_container(&(it->indices_list));
+  xbt_free_ref(&it);
+}
+
+xbt_dynar_t forward_indices_list(int size)
+{
+  xbt_dynar_t indices_list = xbt_dynar_new(sizeof(int), NULL);
+  int i;
+  for (i = 0; i < size; i++)
+    xbt_dynar_push_as(indices_list, int, i);
+  return indices_list;
+}
+
+xbt_dynar_t reverse_indices_list(int size)
+{
+  xbt_dynar_t indices_list = xbt_dynar_new(sizeof(int), NULL);
+  int i;
+  for (i = size-1; i >= 0; i--)
+    xbt_dynar_push_as(indices_list, int, i);
+  return indices_list;
+}
+
+xbt_dynar_t random_indices_list(int size)
+{
+  xbt_dynar_t indices_list = forward_indices_list(size);
+  xbt_dynar_shuffle_in_place(indices_list);
+  return indices_list;
+}
diff --git a/examples/msg/chainsend/iterator.h b/examples/msg/chainsend/iterator.h
new file mode 100644 (file)
index 0000000..3267913
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef KADEPLOY_ITERATOR_H
+#define KADEPLOY_ITERATOR_H
+
+#include <stdlib.h>
+
+#include "xbt/dynar.h"
+#include "xbt/sysdep.h"
+
+/* Random iterator for xbt_dynar */
+typedef struct xbt_dynar_iterator_struct {
+  xbt_dynar_t list;
+  xbt_dynar_t indices_list;
+  int current;
+  unsigned long length;
+  xbt_dynar_t (*criteria_fn)(int size);
+} *xbt_dynar_iterator_t;
+typedef struct xbt_dynar_iterator_struct xbt_dynar_iterator_s;
+
+/* Iterator methods */
+xbt_dynar_iterator_t xbt_dynar_iterator_new(xbt_dynar_t list, xbt_dynar_t (*criteria_fn)(int));
+void xbt_dynar_iterator_reset(xbt_dynar_iterator_t it);
+void xbt_dynar_iterator_seek(xbt_dynar_iterator_t it, int pos);
+void *xbt_dynar_iterator_next(xbt_dynar_iterator_t it);
+void xbt_dynar_iterator_delete(xbt_dynar_iterator_t it);
+
+/* Iterator generators */
+xbt_dynar_t forward_indices_list(int size);
+xbt_dynar_t reverse_indices_list(int size);
+xbt_dynar_t random_indices_list(int size);
+
+/* Shuffle */
+/**************************************/
+static int rand_int(int n);
+void xbt_dynar_shuffle_in_place(xbt_dynar_t indices_list);
+
+#define xbt_dynar_swap_elements(d, type, i, j) \
+  type tmp; \
+  tmp = xbt_dynar_get_as(indices_list, (unsigned int)j, type); \
+  xbt_dynar_set_as(indices_list, (unsigned int)j, type, \
+    xbt_dynar_get_as(indices_list, (unsigned int)i, type)); \
+  xbt_dynar_set_as(indices_list, (unsigned int)i, type, tmp);
+
+#endif /* KADEPLOY_ITERATOR_H */
diff --git a/examples/msg/chainsend/messages.c b/examples/msg/chainsend/messages.c
new file mode 100644 (file)
index 0000000..0bc23cd
--- /dev/null
@@ -0,0 +1,46 @@
+#include "messages.h"
+
+msg_task_t task_message_new(e_message_type type, unsigned int len, const char *issuer_hostname, const char *mailbox)
+{
+  message_t msg = xbt_new(s_message_t, 1);
+  msg->type = type;
+  msg->issuer_hostname = issuer_hostname;
+  msg->mailbox = mailbox;
+  msg_task_t task = MSG_task_create(NULL, 0, len, msg);
+
+  return task;
+}
+
+msg_task_t task_message_chain_new(const char *issuer_hostname, const char *mailbox, const char* prev, const char *next)
+{
+  msg_task_t task = task_message_new(MESSAGE_BUILD_CHAIN, MESSAGE_BUILD_CHAIN_SIZE, issuer_hostname, mailbox);
+  message_t msg = MSG_task_get_data(task);
+  msg->prev_hostname = prev;
+  msg->next_hostname = next;
+
+  return task;
+}
+
+msg_task_t task_message_data_new(const char *issuer_hostname, const char *mailbox, const char *block, unsigned int len)
+{
+  msg_task_t task = task_message_new(MESSAGE_SEND_DATA, MESSAGE_SEND_DATA_HEADER_SIZE + len, issuer_hostname, mailbox);
+  //if (strcmp(mailbox, "host4") == 0) 
+  //MSG_task_set_category(task, mailbox);
+  message_t msg = MSG_task_get_data(task);
+  msg->data_block = block;
+  msg->data_length = len;
+
+  return task;
+}
+
+msg_task_t task_message_end_data_new(const char *issuer_hostname, const char *mailbox)
+{
+  return task_message_new(MESSAGE_END_DATA, MESSAGE_END_DATA_SIZE, issuer_hostname, mailbox);
+}
+
+void task_message_delete(void *task)
+{
+  message_t msg = MSG_task_get_data(task);
+  xbt_free(msg);
+  MSG_task_destroy(task);
+}
diff --git a/examples/msg/chainsend/messages.h b/examples/msg/chainsend/messages.h
new file mode 100644 (file)
index 0000000..52ba874
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef KADEPLOY_MESSAGES_H
+#define KADEPLOY_MESSAGES_H
+
+#include "msg/msg.h"
+#include "xbt/sysdep.h"
+
+#define MESSAGE_BUILD_CHAIN_SIZE 40
+#define MESSAGE_SEND_DATA_HEADER_SIZE 1
+#define MESSAGE_END_DATA_SIZE 1
+
+/* Messages enum */
+typedef enum {
+  MESSAGE_BUILD_CHAIN = 0,
+  MESSAGE_SEND_DATA,
+  MESSAGE_END_DATA
+} e_message_type;
+
+/* Message struct */
+typedef struct s_message {
+  e_message_type type;
+  const char *issuer_hostname;
+  const char *mailbox;
+  const char *prev_hostname;
+  const char *next_hostname;
+  const char *data_block;
+  unsigned int data_length;
+} s_message_t, *message_t;
+
+/* Message methods */
+msg_task_t task_message_new(e_message_type type, unsigned int len, const char *issuer_hostname, const char *mailbox);
+msg_task_t task_message_chain_new(const char *issuer_hostname, const char *mailbox, const char* prev, const char *next);
+msg_task_t task_message_data_new(const char *issuer_hostname, const char *mailbox, const char *block, unsigned int len);
+msg_task_t task_message_end_data_new(const char *issuer_hostname, const char *mailbox);
+void task_message_delete(void *);
+
+#endif /* KADEPLOY_MESSAGES_H */
diff --git a/examples/msg/chainsend/peer.c b/examples/msg/chainsend/peer.c
new file mode 100644 (file)
index 0000000..43c055d
--- /dev/null
@@ -0,0 +1,153 @@
+#include "peer.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_peer,
+                             "Messages specific for the peer");
+
+/*******************************************************
+ *                     Peer                            *
+ *******************************************************/
+
+void peer_init_chain(peer_t peer, message_t msg)
+{
+  peer->prev = msg->prev_hostname;
+  peer->next = msg->next_hostname;
+  peer->init = 1;
+}
+
+static void peer_forward_msg(peer_t peer, message_t msg)
+{
+  msg_task_t task = task_message_data_new(peer->me, peer->next, NULL, msg->data_length);
+  msg_comm_t comm = NULL;
+  XBT_DEBUG("Sending (isend) from %s into mailbox %s", peer->me, peer->next);
+  comm = MSG_task_isend(task, peer->next);
+  queue_pending_connection(comm, peer->pending_sends);
+}
+
+int peer_execute_task(peer_t peer, msg_task_t task)
+{
+  int done = 0;
+  message_t msg = MSG_task_get_data(task);
+  
+  XBT_DEBUG("Peer %s got message of type %d\n", peer->me, msg->type);
+  switch (msg->type) {
+    case MESSAGE_BUILD_CHAIN:
+      peer_init_chain(peer, msg);
+      break;
+    case MESSAGE_SEND_DATA:
+      xbt_assert(peer->init, "peer_execute_task() failed: got msg_type %d before initialization", msg->type);
+      if (peer->next != NULL)
+        peer_forward_msg(peer, msg);
+      peer->pieces++;
+      peer->bytes += msg->data_length;
+      break;
+    case MESSAGE_END_DATA:
+      xbt_assert(peer->init, "peer_execute_task() failed: got msg_type %d before initialization", msg->type);
+      done = 1;
+      XBT_DEBUG("%d pieces receieved", peer->pieces);
+      break;
+  }
+
+  MSG_task_execute(task);
+
+  return done;
+}
+
+msg_error_t peer_wait_for_message(peer_t peer)
+{
+  msg_error_t status;
+  msg_comm_t comm = NULL;
+  msg_task_t task = NULL;
+  int idx = -1;
+  int done = 0;
+
+  while (!done) {
+    comm = MSG_task_irecv(&task, peer->me);
+    queue_pending_connection(comm, peer->pending_recvs);
+
+    if ((idx = MSG_comm_waitany(peer->pending_recvs)) != -1) {
+      comm = xbt_dynar_get_as(peer->pending_recvs, idx, msg_comm_t);
+      status = MSG_comm_get_status(comm);
+      XBT_DEBUG("peer_wait_for_message: error code = %d", status);
+      xbt_assert(status == MSG_OK, "peer_wait_for_message() failed");
+
+      task = MSG_comm_get_task(comm);
+      MSG_comm_destroy(comm);
+      xbt_dynar_cursor_rm(peer->pending_recvs, (unsigned int*)&idx);
+      done = peer_execute_task(peer, task);
+
+      task_message_delete(task);
+      task = NULL;
+    }
+    process_pending_connections(peer->pending_sends);
+  }
+
+  return status;
+}
+
+void peer_init(peer_t p, int argc, char *argv[])
+{
+  p->init = 0;
+  p->prev = NULL;
+  p->next = NULL;
+  p->pieces = 0;
+  p->bytes = 0;
+  p->close_asap = 0;
+  p->pending_recvs = xbt_dynar_new(sizeof(msg_comm_t), NULL);
+  p->pending_sends = xbt_dynar_new(sizeof(msg_comm_t), NULL);
+  p->me = xbt_new(char, HOSTNAME_LENGTH);
+  /* Set mailbox name: use host number from argv or hostname if no argument given */
+  if (argc > 1) {
+    snprintf(p->me, HOSTNAME_LENGTH, "host%s", argv[1]);
+  } else {
+    strncpy(p->me, MSG_host_get_name(MSG_host_self()), HOSTNAME_LENGTH);
+  }
+}
+
+void peer_shutdown(peer_t p)
+{
+  float start_time = MSG_get_clock();
+  float end_time = start_time + PEER_SHUTDOWN_DEADLINE;
+
+  XBT_DEBUG("Waiting for sends to finish before shutdown...");
+  /* MSG_comm_waitall(p->pending_sends, PEER_SHUTDOWN_DEADLINE); FIXME: this doesn't work */
+  while (xbt_dynar_length(p->pending_sends) && MSG_get_clock() < end_time) {
+    process_pending_connections(p->pending_sends);
+    MSG_process_sleep(1);
+  }
+
+  xbt_assert(xbt_dynar_length(p->pending_sends) == 0, "Shutdown failed, sends still pending after deadline");
+}
+
+void peer_delete(peer_t p)
+{
+  xbt_dynar_free(&p->pending_recvs);
+  xbt_dynar_free(&p->pending_sends);
+  xbt_free(p->me);
+
+  xbt_free(p);
+}
+
+void peer_print_stats(peer_t p, float elapsed_time)
+{
+  XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", elapsed_time, p->bytes, p->bytes / 1024.0 / 1024.0 / elapsed_time); 
+}
+
+/** Peer function  */
+int peer(int argc, char *argv[])
+{
+  float start_time, end_time;
+  peer_t p = xbt_new(s_peer_t, 1);
+  msg_error_t status;
+
+  XBT_DEBUG("peer");
+
+  peer_init(p, argc, argv);
+  start_time = MSG_get_clock();
+  status = peer_wait_for_message(p);
+  peer_shutdown(p);
+  end_time = MSG_get_clock();
+  peer_print_stats(p, end_time - start_time);
+  peer_delete(p);
+
+  return status;
+}                               /* end_of_receiver */
diff --git a/examples/msg/chainsend/peer.h b/examples/msg/chainsend/peer.h
new file mode 100644 (file)
index 0000000..8727e15
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef KADEPLOY_PEER_H
+#define KADEPLOY_PEER_H
+
+#include "msg/msg.h"
+#include "xbt/sysdep.h"
+
+#include "messages.h"
+#include "common.h"
+
+#define PEER_SHUTDOWN_DEADLINE 60000
+
+/* Peer struct */
+typedef struct s_peer {
+  int init;
+  const char *prev;
+  const char *next;
+  char *me;
+  int pieces;
+  unsigned long long bytes;
+  xbt_dynar_t pending_recvs;
+  xbt_dynar_t pending_sends;
+  int close_asap; /* TODO: unused */
+} s_peer_t, *peer_t;
+
+/* Peer: helper functions */
+msg_error_t peer_wait_for_message(peer_t peer);
+int peer_execute_task(peer_t peer, msg_task_t task);
+void peer_init_chain(peer_t peer, message_t msg);
+void peer_delete(peer_t p);
+void peer_shutdown(peer_t p);
+void peer_init(peer_t p, int argc, char *argv[]);
+void peer_print_stats(peer_t p, float elapsed_time);
+
+int peer(int argc, char *argv[]);
+
+#endif /* KADEPLOY_PEER_H */
diff --git a/examples/msg/chainsend/platform_chainsend.xml b/examples/msg/chainsend/platform_chainsend.xml
new file mode 100644 (file)
index 0000000..98febad
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <AS  id="AS0"  routing="Floyd">
+   <!-- For using with chainsend, very simple 8-node platform -->
+   <host id="host0" power="98095000"/>
+   <host id="host1" power="76296000"/>
+   <host id="host2" power="96296000"/>
+   <host id="host3" power="97296000"/>
+   <host id="host4" power="97296000"/>
+   <host id="host5" power="97296000"/>
+   <host id="host6" power="97296000"/>
+   <host id="host7" power="97296000"/>
+   <host id="host8" power="97296000"/>
+   <link id="link1" bandwidth="1000000000" latency="0.00001"/>
+   <link id="link2" bandwidth="1000000000" latency="0.00002"/>
+   <link id="link3" bandwidth="1000000000" latency="0.00002"/>
+   <link id="link4" bandwidth="1000000000" latency="0.000015"/>
+   <link id="link5" bandwidth="1000000000" latency="0.00004"/>
+   <link id="link6" bandwidth="1000000000" latency="0.00001"/>
+   <link id="link7" bandwidth="1000000000" latency="0.000015"/>
+   <link id="link8" bandwidth="1000000000" latency="0.00003"/>
+   <route src="host0" dst="host1">
+     <link_ctn id="link1"/>
+   </route>
+   <route src="host0" dst="host2">
+     <link_ctn id="link2"/>
+   </route>
+   <route src="host0" dst="host3">
+     <link_ctn id="link3"/>
+   </route>
+   <route src="host0" dst="host4">
+     <link_ctn id="link4"/>
+   </route>
+   <route src="host4" dst="host5">
+     <link_ctn id="link5"/>
+   </route>
+   <route src="host4" dst="host6">
+     <link_ctn id="link6"/>
+   </route>
+   <route src="host4" dst="host7">
+     <link_ctn id="link7"/>
+   </route>
+   <route src="host0" dst="host8">
+     <link_ctn id="link8"/>
+   </route>
+ </AS>
+ </platform>
index b062bf8..9efb438 100644 (file)
@@ -6,7 +6,6 @@ add_executable(masterslave_failure "masterslave_failure.c")
 add_executable(masterslave_forwarder "masterslave_forwarder.c")
 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")
@@ -19,7 +18,6 @@ if(WIN32)
   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 )
   target_link_libraries(masterslave_platfgen simgrid )
@@ -29,7 +27,6 @@ else()
   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 )
   target_link_libraries(masterslave_platfgen simgrid m )
@@ -47,7 +44,6 @@ set(tesh_files
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_crosstraffic.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_forwarder.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_multicore.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_console.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_failure_crosstraffic.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
@@ -74,7 +70,6 @@ set(examples_src
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_arg.c
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_bypass.c
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cluster.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_console.c
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_failure.c
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_forwarder.c
   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.c
@@ -85,10 +80,10 @@ set(examples_src
   )
 set(bin_files
   ${bin_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua
   PARENT_SCOPE
   )
 set(txt_files
   ${txt_files}
   PARENT_SCOPE
   )
+
index 41cb1f8..a5e71ea 100644 (file)
@@ -35,10 +35,10 @@ static int surf_parse_bypass_platform(void)
   SURFXML_BUFFER_SET(host_id, "host A");
   SURFXML_BUFFER_SET(host_power, "100000000.00");
   SURFXML_BUFFER_SET(host_availability, "1.0");
-  SURFXML_BUFFER_SET(host_availability_file, "");
+  SURFXML_BUFFER_SET(host_availability___file, "");
   SURFXML_BUFFER_SET(host_core, "1");
   A_surfxml_host_state = A_surfxml_host_state_ON;
-  SURFXML_BUFFER_SET(host_state_file, "");
+  SURFXML_BUFFER_SET(host_state___file, "");
   SURFXML_BUFFER_SET(host_coordinates, "");
   SURFXML_START_TAG(host);
   SURFXML_END_TAG(host);
@@ -47,10 +47,10 @@ static int surf_parse_bypass_platform(void)
   SURFXML_BUFFER_SET(host_id, "host B");
   SURFXML_BUFFER_SET(host_power, "100000000.00");
   SURFXML_BUFFER_SET(host_availability, "1.0");
-  SURFXML_BUFFER_SET(host_availability_file, "");
+  SURFXML_BUFFER_SET(host_availability___file, "");
   SURFXML_BUFFER_SET(host_core, "1");
   A_surfxml_host_state = A_surfxml_host_state_ON;
-  SURFXML_BUFFER_SET(host_state_file, "");
+  SURFXML_BUFFER_SET(host_state___file, "");
   SURFXML_BUFFER_SET(host_coordinates, "");
   SURFXML_START_TAG(host);
   SURFXML_END_TAG(host);
@@ -58,12 +58,12 @@ static int surf_parse_bypass_platform(void)
   XBT_DEBUG("<link id=\"LinkA\" bandwidth=\"10000000.0\" latency=\"0.2\"/>");
   SURFXML_BUFFER_SET(link_id, "LinkA");
   SURFXML_BUFFER_SET(link_bandwidth, "10000000.0");
-  SURFXML_BUFFER_SET(link_bandwidth_file, "");
+  SURFXML_BUFFER_SET(link_bandwidth___file, "");
   SURFXML_BUFFER_SET(link_latency, "0.2");
-  SURFXML_BUFFER_SET(link_latency_file, "");
+  SURFXML_BUFFER_SET(link_latency___file, "");
   A_surfxml_link_state = A_surfxml_link_state_ON;
-  SURFXML_BUFFER_SET(link_state_file, "");
-  A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+  SURFXML_BUFFER_SET(link_state___file, "");
+  A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_SHARED;
   SURFXML_START_TAG(link);
   SURFXML_END_TAG(link);
 
@@ -73,10 +73,10 @@ static int surf_parse_bypass_platform(void)
   A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
   SURFXML_START_TAG(route);
   XBT_DEBUG("  <link:ctn id=\"LinkA\"/>");
-  SURFXML_BUFFER_SET(link_ctn_id, "LinkA");
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
+  SURFXML_BUFFER_SET(link___ctn_id, "LinkA");
+  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);
 
@@ -106,8 +106,8 @@ static int surf_parse_bypass_application(void)
 /*   <process host="host A" function="master"> */
   SURFXML_BUFFER_SET(process_host, "host A");
   SURFXML_BUFFER_SET(process_function, "master");
-  SURFXML_BUFFER_SET(process_start_time, "-1.0");
-  SURFXML_BUFFER_SET(process_kill_time, "-1.0");
+  SURFXML_BUFFER_SET(process_start___time, "-1.0");
+  SURFXML_BUFFER_SET(process_kill___time, "-1.0");
   SURFXML_START_TAG(process);
 
 /*      <argument value="20"/> */
@@ -136,8 +136,8 @@ static int surf_parse_bypass_application(void)
 /*   <process host="host B" function="slave"/> */
   SURFXML_BUFFER_SET(process_host, "host B");
   SURFXML_BUFFER_SET(process_function, "slave");
-  SURFXML_BUFFER_SET(process_start_time, "-1.0");
-  SURFXML_BUFFER_SET(process_kill_time, "-1.0");
+  SURFXML_BUFFER_SET(process_start___time, "-1.0");
+  SURFXML_BUFFER_SET(process_kill___time, "-1.0");
   SURFXML_START_TAG(process);
   SURFXML_END_TAG(process);
 
index d05ec6a..9b1089c 100644 (file)
@@ -149,8 +149,8 @@ static int bypass_deployment(void)
     XBT_DEBUG("  <process host=\"c-0.me\" function=\"master\">");
     SURFXML_BUFFER_SET(process_host, "c-0.me");
     SURFXML_BUFFER_SET(process_function, "master");
-    SURFXML_BUFFER_SET(process_start_time, "-1.0");
-    SURFXML_BUFFER_SET(process_kill_time, "-1.0");
+    SURFXML_BUFFER_SET(process_start___time, "-1.0");
+    SURFXML_BUFFER_SET(process_kill___time, "-1.0");
     SURFXML_START_TAG(process);
 
     XBT_DEBUG("    <argument value=\"%s\"/>",bprintf("%d",nb_host-1));
@@ -183,8 +183,8 @@ static int bypass_deployment(void)
     XBT_DEBUG("  <process host=\"%s.me\" function=\"slave\"/>",bprintf("c-%d",i));
     SURFXML_BUFFER_SET(process_host, bprintf("c-%d.me",i));
     SURFXML_BUFFER_SET(process_function, "slave");
-    SURFXML_BUFFER_SET(process_start_time, "-1.0");
-    SURFXML_BUFFER_SET(process_kill_time, "-1.0");
+    SURFXML_BUFFER_SET(process_start___time, "-1.0");
+    SURFXML_BUFFER_SET(process_kill___time, "-1.0");
     SURFXML_START_TAG(process);
     SURFXML_END_TAG(process);
   }
diff --git a/examples/msg/masterslave/masterslave_console.c b/examples/msg/masterslave/masterslave_console.c
deleted file mode 100644 (file)
index d49df00..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright (c) 2007-2012. 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. */
-
-/** @addtogroup MSG_examples
- * 
- * - <b>masterslave/masterslave_console.c</b>: demonstrate how to use
- *   lua files instead of XML for the platform and deployment
- *   declaration using @ref MSG_load_platform_script. The most
- *   interesting part is probably not the C code, but rather the
- *   <b>masterslave/masterslave_script.lua</b>, which demonstrates
- *   how to express the platform and deployment in lua. 
- *
- */
-
-#include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
-#include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
-
-/* 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");
-#define FINALIZE ((void*)221297)        /* a magic number to tell people to stop working */
-
-int master(int argc, char *argv[]);
-int slave(int argc, char *argv[]);
-msg_error_t test_all(const char *);
-
-/** Emitter function  */
-int master(int argc, char *argv[])
-{
-  long number_of_tasks = atol(argv[1]);
-  double task_comp_size = atof(argv[2]);
-  double task_comm_size = atof(argv[3]);
-  long slaves_count = atol(argv[4]);
-  int i;
-
-  XBT_INFO("Got %ld slaves and %ld tasks to process", slaves_count,
-        number_of_tasks);
-  for (i = 0; i < number_of_tasks; i++) {
-    char mailbox[256];
-    char sprintf_buffer[256];
-    msg_task_t task = NULL;
-
-    sprintf(mailbox, "slave-%ld", i % slaves_count);
-    sprintf(sprintf_buffer, "Task_%d", i);
-    task =
-        MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size,
-                        NULL);
-    if (number_of_tasks < 10000 || i % 10000 == 0)
-      XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name,
-            number_of_tasks, mailbox);
-    MSG_task_send(task, mailbox);
-  }
-
-  XBT_INFO
-      ("All tasks have been dispatched. Let's tell everybody the computation is over.");
-  for (i = 0; i < slaves_count; i++) {
-    char mailbox[80];
-
-    sprintf(mailbox, "slave-%ld", i % slaves_count);
-    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
-    MSG_task_send(finalize, mailbox);
-  }
-
-  XBT_INFO("Goodbye now!");
-  return 0;
-}                               /* end_of_master */
-
-/** Receiver function  */
-int slave(int argc, char *argv[])
-{
-  msg_task_t task = NULL;
-  _XBT_GNUC_UNUSED int res;
-  int id = -1;
-  char mailbox[80];
-  _XBT_GNUC_UNUSED int read;
-
-  read = sscanf(argv[1], "%d", &id);
-  xbt_assert(read, "Invalid argument %s\n", argv[1]);
-
-  sprintf(mailbox, "slave-%d", id);
-
-  while (1) {
-    res = MSG_task_receive(&(task), mailbox);
-    xbt_assert(res == MSG_OK, "MSG_task_get failed");
-
-    XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
-    if (!strcmp(MSG_task_get_name(task), "finalize")) {
-      MSG_task_destroy(task);
-      break;
-    }
-
-    XBT_INFO("Processing \"%s\"", MSG_task_get_name(task));
-    MSG_task_execute(task);
-    XBT_INFO("\"%s\" done", MSG_task_get_name(task));
-    MSG_task_destroy(task);
-    task = NULL;
-  }
-  XBT_INFO("I'm done. See you!");
-  return 0;
-}                               /* end_of_slave */
-
-/** Test function */
-msg_error_t test_all(const char *file)  //(void)
-{
-  msg_error_t res = MSG_OK;
-
-  /*start by registering functions before loading script */
-  MSG_function_register("master", master);
-  MSG_function_register("slave", slave);
-  MSG_load_platform_script(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_init(&argc, argv);
-  if (argc < 2) {
-    printf("Usage: %s platform_script[.lua]\n", argv[0]);
-    printf("example: %s platform_script.lua\n", argv[0]);
-    exit(1);
-  }
-  res = test_all(argv[1]);
-
-  if (res == MSG_OK)
-    return 0;
-  else
-    return 1;
-}                               /* end_of_main */
diff --git a/examples/msg/masterslave/masterslave_console.tesh b/examples/msg/masterslave/masterslave_console.tesh
deleted file mode 100644 (file)
index 2470994..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#! ./tesh
-
-! output sort
-$ $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"
-> [ 221.119476] (5:slave@Bourassa) Received "Task_0"
-> [ 221.119476] (5:slave@Bourassa) Processing "Task_0"
-> [ 230.754144] (1:master@Tremblay) Sending "Task_2" (of 20) to mailbox "slave-2"
-> [ 230.754144] (2:slave@Jupiter) Received "Task_1"
-> [ 230.754144] (2:slave@Jupiter) Processing "Task_1"
-> [ 232.461553] (5:slave@Bourassa) "Task_0" done
-> [ 237.962910] (2:slave@Jupiter) "Task_1" done
-> [ 403.819753] (1:master@Tremblay) Sending "Task_3" (of 20) to mailbox "slave-3"
-> [ 403.819753] (3:slave@Fafard) Received "Task_2"
-> [ 403.819753] (3:slave@Fafard) Processing "Task_2"
-> [ 411.028519] (3:slave@Fafard) "Task_2" done
-> [ 519.166957] (1:master@Tremblay) Sending "Task_4" (of 20) to mailbox "slave-0"
-> [ 519.166957] (4:slave@Ginette) Received "Task_3"
-> [ 519.166957] (4:slave@Ginette) Processing "Task_3"
-> [ 530.509034] (4:slave@Ginette) "Task_3" done
-> [ 740.286433] (1:master@Tremblay) Sending "Task_5" (of 20) to mailbox "slave-1"
-> [ 740.286433] (5:slave@Bourassa) Received "Task_4"
-> [ 740.286433] (5:slave@Bourassa) Processing "Task_4"
-> [ 749.921101] (1:master@Tremblay) Sending "Task_6" (of 20) to mailbox "slave-2"
-> [ 749.921101] (2:slave@Jupiter) Received "Task_5"
-> [ 749.921101] (2:slave@Jupiter) Processing "Task_5"
-> [ 751.628510] (5:slave@Bourassa) "Task_4" done
-> [ 757.129867] (2:slave@Jupiter) "Task_5" done
-> [ 922.986710] (1:master@Tremblay) Sending "Task_7" (of 20) to mailbox "slave-3"
-> [ 922.986710] (3:slave@Fafard) Received "Task_6"
-> [ 922.986710] (3:slave@Fafard) Processing "Task_6"
-> [ 930.195476] (3:slave@Fafard) "Task_6" done
-> [1038.333914] (1:master@Tremblay) Sending "Task_8" (of 20) to mailbox "slave-0"
-> [1038.333914] (4:slave@Ginette) Received "Task_7"
-> [1038.333914] (4:slave@Ginette) Processing "Task_7"
-> [1049.675991] (4:slave@Ginette) "Task_7" done
-> [1259.453390] (1:master@Tremblay) Sending "Task_9" (of 20) to mailbox "slave-1"
-> [1259.453390] (5:slave@Bourassa) Received "Task_8"
-> [1259.453390] (5:slave@Bourassa) Processing "Task_8"
-> [1269.088058] (1:master@Tremblay) Sending "Task_10" (of 20) to mailbox "slave-2"
-> [1269.088058] (2:slave@Jupiter) Received "Task_9"
-> [1269.088058] (2:slave@Jupiter) Processing "Task_9"
-> [1270.795467] (5:slave@Bourassa) "Task_8" done
-> [1276.296824] (2:slave@Jupiter) "Task_9" done
-> [1442.153667] (1:master@Tremblay) Sending "Task_11" (of 20) to mailbox "slave-3"
-> [1442.153667] (3:slave@Fafard) Received "Task_10"
-> [1442.153667] (3:slave@Fafard) Processing "Task_10"
-> [1449.362433] (3:slave@Fafard) "Task_10" done
-> [1557.500871] (1:master@Tremblay) Sending "Task_12" (of 20) to mailbox "slave-0"
-> [1557.500871] (4:slave@Ginette) Received "Task_11"
-> [1557.500871] (4:slave@Ginette) Processing "Task_11"
-> [1568.842948] (4:slave@Ginette) "Task_11" done
-> [1778.620347] (1:master@Tremblay) Sending "Task_13" (of 20) to mailbox "slave-1"
-> [1778.620347] (5:slave@Bourassa) Received "Task_12"
-> [1778.620347] (5:slave@Bourassa) Processing "Task_12"
-> [1788.255015] (1:master@Tremblay) Sending "Task_14" (of 20) to mailbox "slave-2"
-> [1788.255015] (2:slave@Jupiter) Received "Task_13"
-> [1788.255015] (2:slave@Jupiter) Processing "Task_13"
-> [1789.962424] (5:slave@Bourassa) "Task_12" done
-> [1795.463781] (2:slave@Jupiter) "Task_13" done
-> [1961.320624] (1:master@Tremblay) Sending "Task_15" (of 20) to mailbox "slave-3"
-> [1961.320624] (3:slave@Fafard) Received "Task_14"
-> [1961.320624] (3:slave@Fafard) Processing "Task_14"
-> [1968.529390] (3:slave@Fafard) "Task_14" done
-> [2076.667828] (1:master@Tremblay) Sending "Task_16" (of 20) to mailbox "slave-0"
-> [2076.667828] (4:slave@Ginette) Received "Task_15"
-> [2076.667828] (4:slave@Ginette) Processing "Task_15"
-> [2088.009905] (4:slave@Ginette) "Task_15" done
-> [2297.787304] (1:master@Tremblay) Sending "Task_17" (of 20) to mailbox "slave-1"
-> [2297.787304] (5:slave@Bourassa) Received "Task_16"
-> [2297.787304] (5:slave@Bourassa) Processing "Task_16"
-> [2307.421972] (1:master@Tremblay) Sending "Task_18" (of 20) to mailbox "slave-2"
-> [2307.421972] (2:slave@Jupiter) Received "Task_17"
-> [2307.421972] (2:slave@Jupiter) Processing "Task_17"
-> [2309.129381] (5:slave@Bourassa) "Task_16" done
-> [2314.630738] (2:slave@Jupiter) "Task_17" done
-> [2480.487581] (1:master@Tremblay) Sending "Task_19" (of 20) to mailbox "slave-3"
-> [2480.487581] (3:slave@Fafard) Received "Task_18"
-> [2480.487581] (3:slave@Fafard) Processing "Task_18"
-> [2487.696347] (3:slave@Fafard) "Task_18" done
-> [2595.834785] (1:master@Tremblay) All tasks have been dispatched. Let's tell everybody the computation is over.
-> [2595.834785] (4:slave@Ginette) Received "Task_19"
-> [2595.834785] (4:slave@Ginette) Processing "Task_19"
-> [2607.176862] (4:slave@Ginette) "Task_19" done
-> [2616.664880] (5:slave@Bourassa) Received "finalize"
-> [2616.664880] (5:slave@Bourassa) I'm done. See you!
-> [2617.572494] (2:slave@Jupiter) Received "finalize"
-> [2617.572494] (2:slave@Jupiter) I'm done. See you!
-> [2633.875776] (3:slave@Fafard) Received "finalize"
-> [2633.875776] (3:slave@Fafard) I'm done. See you!
-> [2644.741817] (0:@) Simulation time 2644.74
-> [2644.741817] (1:master@Tremblay) Goodbye now!
-> [2644.741817] (4:slave@Ginette) Received "finalize"
-> [2644.741817] (4:slave@Ginette) I'm done. See you!
index 8194e32..718acd3 100644 (file)
@@ -41,7 +41,7 @@ void promoter_1(context_node_t node) {
   static int master_choosen = FALSE;
 
   host_parameters.id = NULL;
-  host_parameters.power_peak = 1000000;
+  host_parameters.power_peak = 25000000;
 
   host_parameters.core_amount = 1;
   host_parameters.power_scale = 1;
@@ -55,20 +55,6 @@ void promoter_1(context_node_t node) {
     master_choosen = TRUE;
     host_parameters.id = "host_master";
   } else {
-    /*
-     * The bug #14699 cannot allow us to set up an event trace which
-     * begin by SURF_RESOURCE_OFF, otherwise, the host will be down at startup
-     * and the associate process will fail to start. So, here, we generate a
-     * first useless event.
-     */
-    //Set a availability trace for the node
-    char* generator_id = bprintf("state_host_%ld", node->id);
-    probabilist_event_generator_t date_generator =
-                            tmgr_event_generator_new_weibull(generator_id, 80, 1.5);
-    host_parameters.state_trace = tmgr_trace_generator_state(generator_id,
-                                                            date_generator,
-                                                            SURF_RESOURCE_ON);
-
     //Set a power trace
     char* pw_date_generator_id = bprintf("pw_date_host_%ld", node->id);
     char* pw_value_generator_id = bprintf("pw_value_host_%ld", node->id);
@@ -121,7 +107,6 @@ void labeler_1(context_edge_t edge) {
 
 }
 
-/** Emitter function  */
 int master(int argc, char *argv[])
 {
   int slaves_count = 0;
@@ -130,13 +115,12 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  _XBT_GNUC_UNUSED int read;
 
   number_of_tasks = TASK_COUNT_PER_HOST*argc;
   task_comp_size = TASK_COMP_SIZE;
   task_comm_size = TASK_COMM_SIZE;
 
-  {                             /* Process organisation */
+  {                             /* Process organization */
     slaves_count = argc;
     slaves = xbt_new0(msg_host_t, slaves_count);
 
@@ -223,7 +207,6 @@ int master(int argc, char *argv[])
   return 0;
 }                               /* end_of_master */
 
-/** Receiver function  */
 int slave(int argc, char *argv[])
 {
   while (1) {
@@ -283,7 +266,7 @@ int main(int argc, char *argv[])
   int connected;
   int max_tries = 10;
 
-  //MSG initialisation
+  //MSG initialization
   MSG_init(&argc, argv);
 
   //Set up the seed for the platform generation
@@ -313,7 +296,7 @@ int main(int argc, char *argv[])
   platf_graph_promoter(promoter_1);
   platf_graph_labeler(labeler_1);
 
-  XBT_INFO("protmoting...");
+  XBT_INFO("promoting...");
   platf_do_promote();
 
   XBT_INFO("labeling...");
@@ -329,7 +312,8 @@ int main(int argc, char *argv[])
   msg_host_t host_master = NULL;
   msg_process_t process = NULL;
   xbt_dynar_t host_dynar = MSG_hosts_as_dynar();
-  char** hostname_list = malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
+  char** hostname_list =
+    xbt_malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
 
   xbt_dynar_foreach(host_dynar, i, host) {
     process = MSG_process_create("slave", slave, NULL, host);
@@ -337,7 +321,9 @@ int main(int argc, char *argv[])
     hostname_list[i] = (char*) MSG_host_get_name(host);
   }
   host_master = MSG_get_host_by_name("host_master");
-  MSG_process_create_with_arguments("master", master, NULL, host_master, xbt_dynar_length(host_dynar), hostname_list);
+  MSG_process_create_with_arguments("master", master, NULL, host_master,
+                                    xbt_dynar_length(host_dynar),
+                                    hostname_list);
 
   res = MSG_main();
 
index e26fb1d..88b1010 100644 (file)
@@ -15,7 +15,6 @@ void labeler_1(context_edge_t edge);
 int master(int argc, char *argv[]);
 int slave(int argc, char *argv[]);
 
-
 /** Promoter function
  * Just promote each node into a host, with fixed power
  */
@@ -211,7 +210,7 @@ int main(int argc, char **argv) {
   msg_host_t host = NULL;
   msg_host_t host_master = NULL;
   xbt_dynar_t host_dynar = MSG_hosts_as_dynar();
-  char** hostname_list = malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
+  char** hostname_list = xbt_malloc(sizeof(char*) * xbt_dynar_length(host_dynar));
 
   xbt_dynar_foreach(host_dynar, i, host) {
     MSG_process_create("slave", slave, NULL, host);
diff --git a/examples/msg/masterslave/platform_script.lua b/examples/msg/masterslave/platform_script.lua
deleted file mode 100644 (file)
index 75dac4f..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
--- Copyright (c) 2010-2012. 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.
-
-
--- This file describes a platform very similar to the small_platform.xml, but in lua
--- It is naturally to be used with the MSG_load_platform_script function
-
--- Of course, such a flat file is maybe not very interesting wrt xml.
--- The full power of lua reveals when you describe your platform programatically. 
-
-require "simgrid"
-
-simgrid.platf.open();
-
-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.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.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.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();
-simgrid.msg_register_platform();
-
---Set Application
-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 9a246b7..2e18bb0 100644 (file)
@@ -39,7 +39,6 @@ endif()
 set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/centralized.tesh
   PARENT_SCOPE
   )
index 25a0cb4..6b0b70f 100644 (file)
@@ -13,44 +13,18 @@ $ ${bindir:=.}/bugged1 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%
 > [  0.000000] (3:client@HostC) Sent!
 > [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (3:client@HostC) Sent!
 > [  0.000000] (1:server@HostA) OK
 > [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (1:server@HostA) OK
 > [  0.000000] (3:client@HostC) Sent!
 > [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (3:client@HostC) Sent!
 > [  0.000000] (1:server@HostA) OK
 > [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (1:server@HostA) **************************
 > [  0.000000] (1:server@HostA) *** PROPERTY NOT VALID ***
 > [  0.000000] (1:server@HostA) **************************
@@ -65,7 +39,7 @@ $ ${bindir:=.}/bugged1 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%
 > [  0.000000] (1:server@HostA) [(1)server] iRecv (dst=server, buff=(verbose only), size=(verbose only))
 > [  0.000000] (1:server@HostA) [(3)client] iSend (src=client, buff=(verbose only), size=(verbose only))
 > [  0.000000] (1:server@HostA) [(1)server] Wait (comm=(verbose only) [(3)client -> (1)server])
-> [  0.000000] (1:server@HostA) Expanded states = 47
-> [  0.000000] (1:server@HostA) Visited states = 170
-> [  0.000000] (1:server@HostA) Executed transitions = 157
-> [  0.000000] (1:server@HostA) Expanded / Visited = 3.617021
+> [  0.000000] (1:server@HostA) Expanded states = 36
+> [  0.000000] (1:server@HostA) Visited states = 75
+> [  0.000000] (1:server@HostA) Executed transitions = 70
+> [  0.000000] (1:server@HostA) Expanded / Visited = 2.083333
index 5f1d3da..ac0a2cb 100644 (file)
@@ -1,10 +1,9 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 60
-$ ${bindir:=.}/bugged1_liveness --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+! timeout 200
+$ ${bindir:=.}/bugged1_liveness --cfg=model-check:1 --cfg=contexts/factory:ucontext "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela_bugged1_liveness
 > [  0.000000] (2:client@Fafard) Ask the request
 > [  0.000000] (3:client@Boivin) Ask the request
@@ -12,11 +11,11 @@ $ ${bindir:=.}/bugged1_liveness --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%
 > [  0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
 > [  0.000000] (3:client@Boivin) 2 got the answer. Sleep a bit and release it
 > [  0.000000] (1:coordinator@Tremblay) CS release. resource now idle
-> [  4.000000] (3:client@Boivin) Ask the request
+> [  0.000000] (3:client@Boivin) Ask the request
 > [  0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [  4.000000] (3:client@Boivin) 2 got the answer. Sleep a bit and release it
+> [  0.000000] (3:client@Boivin) 2 got the answer. Sleep a bit and release it
 > [  0.000000] (1:coordinator@Tremblay) CS release. resource now idle
-> [  8.000000] (3:client@Boivin) Ask the request
+> [  0.000000] (3:client@Boivin) Ask the request
 > [  0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
 > [  0.000000] (0:@) Next pair (depth = 33, 2 interleave) already reached !
 > [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
diff --git a/examples/msg/mc/bugged2.tesh b/examples/msg/mc/bugged2.tesh
deleted file mode 100644 (file)
index d156924..0000000
+++ /dev/null
@@ -1,1620 +0,0 @@
-#! ./tesh
-
-! expect signal SIGABRT
-$ ${bindir:=.}/bugged2 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) Check a safety property
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) Received 1
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (2:client@HostB) Send 1!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (3:client@HostC) Send 2!
-> [  0.000000] (1:server@HostA) Received 2
-> [  0.000000] (1:server@HostA) **************************
-> [  0.000000] (1:server@HostA) *** PROPERTY NOT VALID ***
-> [  0.000000] (1:server@HostA) **************************
-> [  0.000000] (1:server@HostA) Counter-example execution trace:
-> [  0.000000] (1:server@HostA) [(1)server] iRecv (dst=server, buff=(verbose only), size=(verbose only))
-> [  0.000000] (1:server@HostA) [(3)client] iSend (src=client, buff=(verbose only), size=(verbose only))
-> [  0.000000] (1:server@HostA) [(1)server] Wait (comm=(verbose only) [(3)client -> (1)server])
-> [  0.000000] (1:server@HostA) [(1)server] iRecv (dst=server, buff=(verbose only), size=(verbose only))
-> [  0.000000] (1:server@HostA) [(3)client] Wait (comm=(verbose only) [(3)client -> (1)server])
-> [  0.000000] (1:server@HostA) [(3)client] iSend (src=client, buff=(verbose only), size=(verbose only))
-> [  0.000000] (1:server@HostA) [(1)server] Wait (comm=(verbose only) [(3)client -> (1)server])
-> [  0.000000] (1:server@HostA) Expanded states = 1387
-> [  0.000000] (1:server@HostA) Visited states = 4071
-> [  0.000000] (1:server@HostA) Executed transitions = 3799
-> [  0.000000] (1:server@HostA) Expanded / Visited = 2.935112
index 5e64854..32c6d21 100644 (file)
@@ -1,17 +1,16 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/chord_liveness --cfg=model-check:1 --cfg=contexts/factory:ucontext "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela_chord_liveness
 > [  0.000000] (1:node@Jean_Yves) Joining the ring with id 14, knowing node 1
 > [  0.000000] (2:node@Boivin) Joining the ring with id 8, knowing node 1
 > [  0.000000] (3:node@Jacquelin) A transfer has occured
 > [  0.000000] (3:node@Jacquelin) The task was successfully received by node 1
 > [  0.000000] (1:node@Jean_Yves) Node 14 joined the ring
-> [  0.000000] (0:@) Next pair (depth = 11, 2 interleave) already reached !
+> [  0.000000] (0:@) Next pair (depth = 12, 2 interleave) already reached !
 > [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 > [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
 > [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
@@ -26,6 +25,7 @@ $ ${bindir:=.}/chord_liveness --cfg=model-check:1 --cfg=contexts/factory:ucontex
 > [  0.000000] (0:@) [(1)node] Wait (comm=(verbose only) [(3)node -> (1)node])
 > [  0.000000] (0:@) [(1)node] iRecv (dst=node, buff=(verbose only), size=(verbose only))
 > [  0.000000] (0:@) [(1)node] Test FALSE (comm=(verbose only))
-> [  0.000000] (0:@) Expanded pairs = 14
-> [  0.000000] (0:@) Visited pairs = 10
-> [  0.000000] (0:@) Expanded / Visited = 0.714286
\ No newline at end of file
+> [  0.000000] (0:@) [(1)node] Test FALSE (comm=(verbose only))
+> [  0.000000] (0:@) Expanded pairs = 16
+> [  0.000000] (0:@) Visited pairs = 11
+> [  0.000000] (0:@) Expanded / Visited = 0.687500
\ No newline at end of file
index 982b146..126c590 100644 (file)
@@ -35,7 +35,7 @@ int test(int argc, char **argv){
   
   XBT_INFO("**** End test ****");
 
-  return 0;
+  xbt_abort();
 }
 
 int main(int argc, char **argv){
index 1e50d31..119844a 100644 (file)
@@ -1,26 +1,13 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/snapshot_comparison1 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela
-> [  1.000000] (1:test@HostA) **** Start test ****
-> [  1.000000] (1:test@HostA) Take two successive snapshots (No modification)
-> [  1.000000] (1:test@HostA) First snapshot
-> [  3.000000] (1:test@HostA) Second snapshot
-> [  3.000000] (1:test@HostA) Test result : 0 (0 = state equality, 1 = different states)
-> [  3.000000] (1:test@HostA) **** End test ****
-> [  0.000000] (0:@) Next pair (depth = 5) already reached !
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) Counter-example that violates formula :
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_COMPARE_SNAPSHOTS ((null))
-> [  0.000000] (0:@) End of system requests but evolution in Büchi automaton
-> [  0.000000] (0:@) Expanded pairs = 5
-> [  0.000000] (0:@) Visited pairs = 4
-> [  0.000000] (0:@) Expanded / Visited = 0.800000
+> [  0.000000] (1:test@HostA) **** Start test ****
+> [  0.000000] (1:test@HostA) Take two successive snapshots (No modification)
+> [  0.000000] (1:test@HostA) First snapshot
+> [  0.000000] (1:test@HostA) Second snapshot
+> [  0.000000] (1:test@HostA) Test result : 0 (0 = state equality, 1 = different states)
+> [  0.000000] (1:test@HostA) **** End test ****
index e3b04b0..9c08973 100644 (file)
@@ -40,7 +40,7 @@ int test(int argc, char **argv){
 
   xbt_free(toto);
 
-  return 0;
+  xbt_abort();
 }
 
 int main(int argc, char **argv){
index bb14f75..230bbcc 100644 (file)
@@ -1,27 +1,14 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/snapshot_comparison2 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela
-> [  1.000000] (1:test@HostA) **** Start test ****
-> [  1.000000] (1:test@HostA) Malloc after first snapshot
-> [  2.000000] (1:test@HostA) First snapshot
-> [  2.000000] (1:test@HostA) Toto allocated
-> [  3.000000] (1:test@HostA) Second snapshot
-> [  3.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
-> [  3.000000] (1:test@HostA) **** End test ****
-> [  0.000000] (0:@) Next pair (depth = 5) already reached !
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) Counter-example that violates formula :
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_COMPARE_SNAPSHOTS ((null))
-> [  0.000000] (0:@) End of system requests but evolution in Büchi automaton
-> [  0.000000] (0:@) Expanded pairs = 5
-> [  0.000000] (0:@) Visited pairs = 4
-> [  0.000000] (0:@) Expanded / Visited = 0.800000
+> [  0.000000] (1:test@HostA) **** Start test ****
+> [  0.000000] (1:test@HostA) Malloc after first snapshot
+> [  0.000000] (1:test@HostA) First snapshot
+> [  0.000000] (1:test@HostA) Toto allocated
+> [  0.000000] (1:test@HostA) Second snapshot
+> [  0.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
+> [  0.000000] (1:test@HostA) **** End test ****
index 8c3efd3..e46578f 100644 (file)
@@ -46,7 +46,7 @@ int test(int argc, char **argv){
   
   XBT_INFO("**** End test ****");
 
-  return 0;
+  xbt_abort();
 }
 
 int main(int argc, char **argv){
index d6cb549..6589319 100644 (file)
@@ -1,28 +1,15 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/snapshot_comparison3 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela
-> [  1.000000] (1:test@HostA) **** Start test ****
-> [  1.000000] (1:test@HostA) Malloc and free after first snapshot
-> [  2.000000] (1:test@HostA) First snapshot
-> [  2.000000] (1:test@HostA) Toto allocated
-> [  2.000000] (1:test@HostA) Toto free
-> [  3.000000] (1:test@HostA) Second snapshot
-> [  3.000000] (1:test@HostA) Test result : 0 (0 = state equality, 1 = different states)
-> [  3.000000] (1:test@HostA) **** End test ****
-> [  0.000000] (0:@) Next pair (depth = 5) already reached !
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) Counter-example that violates formula :
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_COMPARE_SNAPSHOTS ((null))
-> [  0.000000] (0:@) End of system requests but evolution in Büchi automaton
-> [  0.000000] (0:@) Expanded pairs = 5
-> [  0.000000] (0:@) Visited pairs = 4
-> [  0.000000] (0:@) Expanded / Visited = 0.800000
+> [  0.000000] (1:test@HostA) **** Start test ****
+> [  0.000000] (1:test@HostA) Malloc and free after first snapshot
+> [  0.000000] (1:test@HostA) First snapshot
+> [  0.000000] (1:test@HostA) Toto allocated
+> [  0.000000] (1:test@HostA) Toto free
+> [  0.000000] (1:test@HostA) Second snapshot
+> [  0.000000] (1:test@HostA) Test result : 0 (0 = state equality, 1 = different states)
+> [  0.000000] (1:test@HostA) **** End test ****
index e87c65c..bff95bf 100644 (file)
@@ -44,7 +44,7 @@ int test(int argc, char **argv){
   
   XBT_INFO("**** End test ****");
 
-  return 0;
+  xbt_abort();
 }
 
 int main(int argc, char **argv){
index 146d2b8..6f4ca65 100644 (file)
@@ -1,28 +1,15 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/snapshot_comparison4 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela
-> [  1.000000] (1:test@HostA) **** Start test ****
-> [  1.000000] (1:test@HostA) Free after first snapshot
-> [  1.000000] (1:test@HostA) Toto allocated
-> [  2.000000] (1:test@HostA) First snapshot
-> [  2.000000] (1:test@HostA) Toto free
-> [  2.000000] (1:test@HostA) Second snapshot
-> [  3.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
-> [  3.000000] (1:test@HostA) **** End test ****
-> [  0.000000] (0:@) Next pair (depth = 5) already reached !
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) Counter-example that violates formula :
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_COMPARE_SNAPSHOTS ((null))
-> [  0.000000] (0:@) End of system requests but evolution in Büchi automaton
-> [  0.000000] (0:@) Expanded pairs = 5
-> [  0.000000] (0:@) Visited pairs = 4
-> [  0.000000] (0:@) Expanded / Visited = 0.800000
\ No newline at end of file
+> [  0.000000] (1:test@HostA) **** Start test ****
+> [  0.000000] (1:test@HostA) Free after first snapshot
+> [  0.000000] (1:test@HostA) Toto allocated
+> [  0.000000] (1:test@HostA) First snapshot
+> [  0.000000] (1:test@HostA) Toto free
+> [  0.000000] (1:test@HostA) Second snapshot
+> [  0.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
+> [  0.000000] (1:test@HostA) **** End test ****
\ No newline at end of file
index eef83c8..3078854 100644 (file)
@@ -44,7 +44,7 @@ int test(int argc, char **argv){
   
   XBT_INFO("**** End test ****");
 
-  return 0;
+  xbt_abort();
 }
 
 int main(int argc, char **argv){
index 8df68da..d483ae3 100644 (file)
@@ -1,28 +1,15 @@
 #! ./tesh
 
 ! expect signal SIGABRT
-! timeout 120
+! timeout 200
 $ ${bindir:=.}/snapshot_comparison5 --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'model-check' to '1'
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) Check the liveness property promela
-> [  1.000000] (1:test@HostA) **** Start test ****
-> [  1.000000] (1:test@HostA) Increment local variable
-> [  1.000000] (1:test@HostA) j = 0
-> [  2.000000] (1:test@HostA) First snapshot
-> [  2.000000] (1:test@HostA) j = 1
-> [  3.000000] (1:test@HostA) Second snapshot
-> [  3.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
-> [  3.000000] (1:test@HostA) **** End test ****
-> [  0.000000] (0:@) Next pair (depth = 5) already reached !
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) |             ACCEPTANCE CYCLE            |
-> [  0.000000] (0:@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-> [  0.000000] (0:@) Counter-example that violates formula :
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_SNAPSHOT ((null))
-> [  0.000000] (0:@) [(1)test] MC_COMPARE_SNAPSHOTS ((null))
-> [  0.000000] (0:@) End of system requests but evolution in Büchi automaton
-> [  0.000000] (0:@) Expanded pairs = 5
-> [  0.000000] (0:@) Visited pairs = 4
-> [  0.000000] (0:@) Expanded / Visited = 0.800000
+> [  0.000000] (1:test@HostA) **** Start test ****
+> [  0.000000] (1:test@HostA) Increment local variable
+> [  0.000000] (1:test@HostA) j = 0
+> [  0.000000] (1:test@HostA) First snapshot
+> [  0.000000] (1:test@HostA) j = 1
+> [  0.000000] (1:test@HostA) Second snapshot
+> [  0.000000] (1:test@HostA) Test result : 1 (0 = state equality, 1 = different states)
+> [  0.000000] (1:test@HostA) **** End test ****
index ead9710..2f85e28 100644 (file)
@@ -4,14 +4,12 @@ p Testing a simple master/slave example application
 
 ! output sort
 $ $SG_TEST_EXENV parallel_task/parallel_task$EXEEXT ${srcdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > [  0.009378] (0:@) Simulation time 0.00937836
 > [  0.009378] (1:test@Fafard) Goodbye now!
 
 ! output sort
 $ $SG_TEST_EXENV parallel_task/test_ptask$EXEEXT ${srcdir:=.}/parallel_task/test_ptask_platform.xml ${srcdir:=.}/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) type in variable = 2
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > [  1.000300] (1:execute@Ginette) execution_time=1.0003 
 > [  6.000900] (0:@) Simulation time 6.0009
index 4af8c32..075f153 100644 (file)
@@ -1,5 +1,6 @@
 #! ./tesh
 
+
 p Tracing master/slave application
 $ $SG_TEST_EXENV ${bindir:=.}/tracing/trace_platform$EXEEXT --cfg=tracing:1 --cfg=tracing/categorized:1 ${srcdir:=.}/tracing/platform.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to '1'
index a3525c5..e814baa 100644 (file)
@@ -5,6 +5,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 add_executable(ex_sd_test sd_test.c)
 add_executable(sd_test2 sd_test2.c)
 add_executable(sd_fail sd_fail.c)
+add_executable(sd_avail sd_avail.c)
 add_executable(sd_typed_tasks_test sd_typed_tasks_test.c)
 add_executable(sd_comm_throttling sd_comm_throttling.c)
 add_executable(sd_seq_access sd_seq_access.c)
@@ -16,6 +17,7 @@ if(NOT WIN32)
   target_link_libraries(ex_sd_test simgrid pthread m )
   target_link_libraries(sd_test2 simgrid pthread m )
   target_link_libraries(sd_fail simgrid pthread m )
+  target_link_libraries(sd_avail simgrid pthread m )
   target_link_libraries(sd_typed_tasks_test simgrid pthread m )
   target_link_libraries(sd_comm_throttling simgrid pthread m )
   target_link_libraries(sd_seq_access simgrid pthread m )
@@ -36,6 +38,7 @@ else()
   target_link_libraries(ex_sd_test simgrid)
   target_link_libraries(sd_test2 simgrid)
   target_link_libraries(sd_fail simgrid)
+  target_link_libraries(sd_avail simgrid)
   target_link_libraries(sd_typed_tasks_test simgrid)
   target_link_libraries(sd_comm_throttling simgrid)
   target_link_libraries(sd_seq_access simgrid)
@@ -68,11 +71,13 @@ set(tesh_files
 set(xml_files
   ${xml_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/2clusters.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/faulty_host.xml
   PARENT_SCOPE
   )
 set(examples_src
   ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/sd_avail.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_comm_throttling.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_fail.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_seq_access.c
@@ -92,5 +97,7 @@ set(bin_files
 set(txt_files
   ${txt_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/faulty_host.trace
+  ${CMAKE_CURRENT_SOURCE_DIR}/jupiter_power.trace
+  ${CMAKE_CURRENT_SOURCE_DIR}/link1_avail.trace
   PARENT_SCOPE
   )
index 42f661e..58addb1 100644 (file)
@@ -50,6 +50,7 @@ int main(int argc, char **argv)
   /* load the DOT file */
   dot = SD_dotload(argv[2]);
   if(dot == NULL){
+    SD_exit();
     xbt_die("No dot load may be you have a cycle in your graph");
   }
 
index f87bd7f..ff0dd78 100644 (file)
@@ -50,8 +50,8 @@ int main(int argc, char **argv)
   /* load the DOT file  and schedule tasks */
   dot = SD_dotload_with_sched(argv[2]);
   if(!dot){
+    SD_exit();
     xbt_die("The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose");
-    //return 0;
   }
 
   /* Display all the tasks */
index e7b6270..be7b99e 100644 (file)
@@ -1,10 +1,14 @@
-/* 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. */
+/* Example of scatter communication, accepting a large amount of processes. 
+ * This based the experiment of Fig. 4 in http://hal.inria.fr/hal-00650233/
+ * That experiment is a comparison to the LogOPSim simulator, that takes 
+ *  GOAL files as an input, thus the file name. But there is no actual link
+ *  to the GOAL formalism beside of this.
+ * 
+ * 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>
diff --git a/examples/simdag/jupiter_power.trace b/examples/simdag/jupiter_power.trace
new file mode 100644 (file)
index 0000000..8550f51
--- /dev/null
@@ -0,0 +1,2 @@
+0.0 0.5
+2.0 1.0
\ No newline at end of file
diff --git a/examples/simdag/link1_avail.trace b/examples/simdag/link1_avail.trace
new file mode 100644 (file)
index 0000000..0514220
--- /dev/null
@@ -0,0 +1,3 @@
+PERIODICITY 6.0
+2.0 62500000
+4.0 31250000
diff --git a/examples/simdag/sd_avail.c b/examples/simdag/sd_avail.c
new file mode 100644 (file)
index 0000000..096bc08
--- /dev/null
@@ -0,0 +1,108 @@
+/* Copyright (c) 2012. 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 "simdag/simdag.h"
+#include "xbt/ex.h"
+#include "xbt/log.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(sd_avail,
+                             "Logging specific to this SimDag example");
+
+/* Test of dynamic availability traces
+ * Scenario:
+ *  - A chain of tasks: t1 -> c1 -> t2 -> c2 -> t3 -> c3 -> t4 alternatively
+ *    scheduled across two workstations (Tremblay and Jupiter) connected by a
+ *    single link (link1)
+ *  - Make the characteristics of the resources change across time
+ *      Jupiter
+ *         [0.000000 -> 2.000000[ runs at half speed: 12500000
+ *         [2.000000 -> end[      runs at full speed: 25000000
+ *      Tremblay
+ *         [0.000000 -> 1.000000[ runs at half speed: 15000000
+ *         [1.000000 -> 4.000000[ runs at full speed: 25000000
+ *         [4.000000 -> 6.000000[ runs at half speed: 12500000
+ *         then loop back.
+ *      link1
+ *         [0.000000 -> 2.000000[ bandwidth = 125000000
+ *         [2.000000 -> 4.000000[ bandwidth = 62500000
+ *         [4.000000 -> 6.000000[ bandwidth = 31250000
+ *         then loop back.
+ *  - Adjust tasks' amounts to have comprehensive execution times
+ *      t1: 25000000 flops, should last 2 seconds
+ *      c1: 125000000 bytes, should last 1.0001 seconds
+ *      t2: 25000000 flops, should last 1 second
+ *      c2: 62500000 bytes, should last 1.0001 seconds
+ *      t3: 25000000 flops, should last 1 second
+ *      c3: 31250000 bytes, should last 1.0001 seconds
+ *      t4: 25000000 flops, should last 1 second
+ */
+
+int main(int argc, char **argv)
+{
+  unsigned int ctr;
+  const SD_workstation_t *workstations;
+  SD_task_t t1, c1, t2, c2, t3, c3, t4, task;
+  xbt_dynar_t changed_tasks;
+
+  SD_init(&argc, argv);
+  SD_create_environment(argv[1]);
+  workstations = SD_workstation_get_list();
+
+  t1 = SD_task_create_comp_seq("t1", NULL, 25000000);
+  c1 = SD_task_create_comm_e2e("c1", NULL, 125000000);
+  t2 = SD_task_create_comp_seq("t2", NULL, 25000000);
+  c2 = SD_task_create_comm_e2e("c2", NULL, 62500000);
+  t3 = SD_task_create_comp_seq("t3", NULL, 25000000);
+  c3 = SD_task_create_comm_e2e("c3", NULL, 31250000);
+  t4 = SD_task_create_comp_seq("t4", NULL, 25000000);
+
+  /* Add dependencies: t1->c1->t2->c2->t3 */
+  SD_task_dependency_add(NULL, NULL, t1, c1);
+  SD_task_dependency_add(NULL, NULL, c1, t2);
+  SD_task_dependency_add(NULL, NULL, t2, c2);
+  SD_task_dependency_add(NULL, NULL, c2, t3);
+  SD_task_dependency_add(NULL, NULL, t3, c3);
+  SD_task_dependency_add(NULL, NULL, c3, t4);
+
+  /* Schedule tasks t1 and w3 on first host, t2 on second host */
+  /* Transfers are auto-scheduled */
+  SD_task_schedulel(t1, 1, workstations[0]);
+  SD_task_schedulel(t2, 1, workstations[1]);
+  SD_task_schedulel(t3, 1, workstations[0]);
+  SD_task_schedulel(t4, 1, workstations[1]);
+
+  /* Add some watchpoint upon task completion */
+  SD_task_watch(t1, SD_DONE);
+  SD_task_watch(c1, SD_DONE);
+  SD_task_watch(t2, SD_DONE);
+  SD_task_watch(c2, SD_DONE);
+  SD_task_watch(t3, SD_DONE);
+  SD_task_watch(c3, SD_DONE);
+  SD_task_watch(t4, SD_DONE);
+
+  while (!xbt_dynar_is_empty((changed_tasks = SD_simulate(-1.0)))) {    
+    XBT_INFO("link1: bw=%.0f, lat=%f",
+             SD_route_get_current_bandwidth(workstations[0], workstations[1]),
+             SD_route_get_current_latency(workstations[0], workstations[1]));
+    XBT_INFO("Jupiter: power=%.0f",
+             SD_workstation_get_power(workstations[0])*
+             SD_workstation_get_available_power(workstations[0]));
+    XBT_INFO("Tremblay: power=%.0f",
+             SD_workstation_get_power(workstations[1])*
+             SD_workstation_get_available_power(workstations[1]));
+    xbt_dynar_foreach(changed_tasks, ctr, task) {
+      XBT_INFO("Task '%s' start time: %f, finish time: %f",
+           SD_task_get_name(task),
+           SD_task_get_start_time(task), SD_task_get_finish_time(task));
+      if (SD_task_get_state(task)==SD_DONE)
+        SD_task_destroy(task);
+    }
+  }
+  SD_exit();
+  return 0;
+}
index 8e15509..7c0baab 100644 (file)
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
     if (strstr(argv[1],".lua"))
       SD_load_environment_script(argv[1]);
     else
-      xbt_die("Unsupported platform description styel (neither XML nor lua): %s",
+      xbt_die("Unsupported platform description style (neither XML nor lua): %s",
               argv[1]);
 
   /* getting platform infos */
diff --git a/examples/simdag/test_simdag_avail.tesh b/examples/simdag/test_simdag_avail.tesh
new file mode 100644 (file)
index 0000000..18f7f83
--- /dev/null
@@ -0,0 +1,34 @@
+#! ./tesh
+
+p Test of the management of availability traces with simdag
+
+$ $SG_TEST_EXENV ${bindir:=.}/sd_avail two_hosts.xml
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [1.000000] [sd_avail/INFO] link1: bw=125000000, lat=0.000100
+> [1.000000] [sd_avail/INFO] Jupiter: power=12500000
+> [1.000000] [sd_avail/INFO] Tremblay: power=12500000
+> [1.000000] [sd_avail/INFO] Task 't1' start time: 0.000000, finish time: 1.000000
+> [2.000200] [sd_avail/INFO] link1: bw=62500000, lat=0.000100
+> [2.000200] [sd_avail/INFO] Jupiter: power=12500000
+> [2.000200] [sd_avail/INFO] Tremblay: power=25000000
+> [2.000200] [sd_avail/INFO] Task 'c1' start time: 1.000000, finish time: 2.000200
+> [3.000200] [sd_avail/INFO] link1: bw=62500000, lat=0.000100
+> [3.000200] [sd_avail/INFO] Jupiter: power=12500000
+> [3.000200] [sd_avail/INFO] Tremblay: power=25000000
+> [3.000200] [sd_avail/INFO] Task 't2' start time: 2.000200, finish time: 3.000200
+> [4.000600] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
+> [4.000600] [sd_avail/INFO] Jupiter: power=25000000
+> [4.000600] [sd_avail/INFO] Tremblay: power=25000000
+> [4.000600] [sd_avail/INFO] Task 'c2' start time: 3.000200, finish time: 4.000600
+> [5.000600] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
+> [5.000600] [sd_avail/INFO] Jupiter: power=25000000
+> [5.000600] [sd_avail/INFO] Tremblay: power=25000000
+> [5.000600] [sd_avail/INFO] Task 't3' start time: 4.000600, finish time: 5.000600
+> [6.000700] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
+> [6.000700] [sd_avail/INFO] Jupiter: power=25000000
+> [6.000700] [sd_avail/INFO] Tremblay: power=25000000
+> [6.000700] [sd_avail/INFO] Task 'c3' start time: 5.000600, finish time: 6.000700
+> [7.000700] [sd_avail/INFO] link1: bw=31250000, lat=0.000100
+> [7.000700] [sd_avail/INFO] Jupiter: power=25000000
+> [7.000700] [sd_avail/INFO] Tremblay: power=25000000
+> [7.000700] [sd_avail/INFO] Task 't4' start time: 6.000700, finish time: 7.000700
\ No newline at end of file
index 2f7e3b8..3fc9699 100644 (file)
@@ -1,5 +1,6 @@
 #! ./tesh
 
+
 p Simple test of simdag
 
 $ $SG_TEST_EXENV ./simdag_tracing --cfg=tracing:1 --cfg=tracing/categorized:1 ${srcdir:=.}/2clusters.xml
diff --git a/examples/simdag/two_hosts.xml b/examples/simdag/two_hosts.xml
new file mode 100644 (file)
index 0000000..408737f
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+   <AS  id="AS0"  routing="Full">
+     <host id="Tremblay" power="25000000"/>
+     <host id="Jupiter" power="25000000" 
+           availability_file="jupiter_power.trace"/>
+
+     <link id="1" bandwidth="1.25E8" latency="1.0E-4" 
+           bandwidth_file="link1_avail.trace"/>
+     
+     <route src="Tremblay" dst="Jupiter">
+       <link_ctn id="1"/>
+     </route>
+   </AS>
+
+   <trace id="Tremblay_power" periodicity="6.0">
+     1.0 0.5
+     4.0 1.0
+   </trace>
+
+   <trace_connect trace="Tremblay_power" element="Tremblay" kind="POWER"/>
+</platform>  
index 4f8d621..85ee3e6 100644 (file)
@@ -62,7 +62,9 @@ set(txt_files
   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
-  ${CMAKE_CURRENT_SOURCE_DIR}/replay/one_trace
   ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces
+  ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allReduce.txt
+  ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
+  ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
   PARENT_SCOPE
   )  
index 12c2370..07ac234 100644 (file)
@@ -76,8 +76,8 @@ inline double Summa(
     XBT_DEBUG( "pivot: %zu, iter: %zu, B_proc_col: %zu, "
                 "size_col:%zu, size_row: %zu\n",
                 pivot_row, iter, B_proc_row,size_col,size_row);
-    MPI_Barrier(row_comm);
-    MPI_Barrier(col_comm);
+/*    MPI_Barrier(row_comm);*/
+/*    MPI_Barrier(col_comm);*/
 
     start_time_intern = MPI_Wtime();
     //Broadcast the row
@@ -127,8 +127,8 @@ inline double Summa(
     end_time_intern = MPI_Wtime();
     communication_time += end_time_intern - start_time_intern;
 
-    MPI_Barrier(row_comm);
-    MPI_Barrier(col_comm);
+/*    MPI_Barrier(row_comm);*/
+/*    MPI_Barrier(col_comm);*/
     start_time_intern = MPI_Wtime();
     XBT_DEBUG("execute Gemm number: %zu\n", iter);
     //We have recieved a line of block and a colomn
diff --git a/examples/smpi/replay/actions_allReduce.txt b/examples/smpi/replay/actions_allReduce.txt
new file mode 100644 (file)
index 0000000..3bafdf8
--- /dev/null
@@ -0,0 +1,15 @@
+0 init
+1 init
+2 init
+
+0 allReduce 5e8 5e8
+1 allReduce 5e8 5e8
+2 allReduce 5e8 5e8
+
+0 compute 5e8
+1 compute 5e8
+2 compute 5e8
+
+0 finalize
+1 finalize
+2 finalize
diff --git a/examples/smpi/replay/actions_barrier.txt b/examples/smpi/replay/actions_barrier.txt
new file mode 100644 (file)
index 0000000..55a9a62
--- /dev/null
@@ -0,0 +1,16 @@
+0 init
+0 send 1 1e7
+0 barrier
+0 compute 98095000
+0 finalize
+
+1 init
+1 recv 0 1e7
+1 barrier
+1 compute 76296000
+1 finalize
+
+2 init
+2 barrier
+2 compute 76296000
+2 finalize
index 5ee22c0..f392b82 100644 (file)
@@ -2,7 +2,6 @@
 1 init
 2 init
 
-0 comm_size 3
 0 bcast 5e8
 1 bcast 5e8
 2 bcast 5e8
diff --git a/examples/smpi/replay/actions_with_isend.txt b/examples/smpi/replay/actions_with_isend.txt
new file mode 100644 (file)
index 0000000..edc93a6
--- /dev/null
@@ -0,0 +1,23 @@
+0 init
+1 init
+2 init
+
+0 send 1 1e9
+0 compute 1e9
+0 recv 2 1e9
+
+1 Irecv 0 1e9
+1 compute 1e9
+1 wait
+1 send 2 1e9
+
+2 Irecv 1 1e9
+2 compute 5e8
+2 wait
+2 Isend 0 1e9
+2 compute 5e8
+
+0 finalize
+1 finalize
+2 finalize
+
diff --git a/examples/smpi/replay/one_trace b/examples/smpi/replay/one_trace
deleted file mode 100644 (file)
index c46e677..0000000
+++ /dev/null
@@ -1 +0,0 @@
-replay/actions_bcast.txt
index 11bdb09..0ac1715 100644 (file)
@@ -1,14 +1,18 @@
 # use the tested library, not the installed one
 # (since we want to pass it to the child, it has to be redefined before each command)
 # Go for the first test
+
 p Test of trace replay with SMPI (one trace for all processes)
-$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay ${srcdir:=.}/replay/one_trace
+
+< replay/actions_bcast.txt
+$ mkfile replay/one_trace
+
+$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace
 > [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 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '1'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> [Tremblay:0:(0) 0.000000] [smpi_replay/VERBOSE] 0 comm_size 3 0.000000
 > [Fafard:2:(0) 65.176535] [smpi_replay/VERBOSE] 2 bcast 5e8 65.176535
 > [Fafard:2:(0) 71.729958] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
 > [Jupiter:1:(0) 73.739750] [smpi_replay/VERBOSE] 1 bcast 5e8 73.739750
@@ -26,9 +30,14 @@ $ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_rep
 > [Tremblay:0:(0) 231.413449] [smpi_replay/VERBOSE] 0 reduce 5e8 5e8 73.739750
 > [Tremblay:0:(0) 231.413449] [smpi_replay/INFO] Simulation time 231.413
 
+$ rm -f replay/one_trace
 
 p The same with tracing activated
-$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc  --cfg=tracing:1 --cfg=tracing/smpi:1 --cfg=tracing/smpi/computing:1 --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay ${srcdir:=.}/replay/one_trace
+
+< replay/actions_bcast.txt
+$ mkfile replay/one_trace
+
+$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc  --cfg=tracing:1 --cfg=tracing/smpi:1 --cfg=tracing/smpi/computing:1 --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace
 > [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 'network/TCP_gamma' to '4194304'
@@ -39,6 +48,8 @@ $ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 231.413449] [smpi_replay/INFO] Simulation time 231.413
 
+$ rm -f replay/one_trace
+
 
 $ tail -n +3 ./simgrid.trace
 > %EventDef PajeDefineContainerType 0
@@ -222,3 +233,75 @@ $ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_rep
 > [Jupiter:1:(0) 13.600235] [smpi_replay/VERBOSE] 1 wait 0.328926
 > [Tremblay:0:(0) 13.600235] [smpi_replay/VERBOSE] 0 send 1 1e6 0.164463
 > [Tremblay:0:(0) 13.600235] [smpi_replay/INFO] Simulation time 13.6002
+
+
+p Test of barrier replay with SMPI (one trace for all processes)
+
+< replay/actions_barrier.txt
+$ mkfile replay/one_trace
+
+$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace
+> [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 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '1'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [Tremblay:0:(0) 1.491472] [smpi_replay/VERBOSE] 0 send 1 1e7 1.491472
+> [Jupiter:1:(0) 1.491472] [smpi_replay/VERBOSE] 1 recv 0 1e7 1.491472
+> [Tremblay:0:(0) 1.495453] [smpi_replay/VERBOSE] 0 barrier 0.003981
+> [Jupiter:1:(0) 1.498398] [smpi_replay/VERBOSE] 1 barrier 0.006926
+> [Fafard:2:(0) 1.499434] [smpi_replay/VERBOSE] 2 barrier 1.499434
+> [Tremblay:0:(0) 2.495453] [smpi_replay/VERBOSE] 0 compute 98095000 1.000000
+> [Jupiter:1:(0) 2.498398] [smpi_replay/VERBOSE] 1 compute 76296000 1.000000
+> [Fafard:2:(0) 2.499434] [smpi_replay/VERBOSE] 2 compute 76296000 1.000000
+> [Fafard:2:(0) 2.499434] [smpi_replay/INFO] Simulation time 2.49943
+
+$ rm -f replay/one_trace
+
+p Test of Isend replay with SMPI (one trace for all processes)
+
+< replay/actions_with_isend.txt
+$ mkfile replay/one_trace
+
+$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace
+> [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 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '1'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [Jupiter:1:(0) 0.000000] [smpi_replay/VERBOSE] 1 Irecv 0 1e9 0.000000
+> [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Irecv 1 1e9 0.000000
+> [Fafard:2:(0) 6.553424] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Jupiter:1:(0) 13.106847] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
+> [Tremblay:0:(0) 147.462483] [smpi_replay/VERBOSE] 0 send 1 1e9 147.462483
+> [Jupiter:1:(0) 147.462483] [smpi_replay/VERBOSE] 1 wait 134.355636
+> [Tremblay:0:(0) 157.656682] [smpi_replay/VERBOSE] 0 compute 1e9 10.194200
+> [Fafard:2:(0) 294.947973] [smpi_replay/VERBOSE] 2 wait 288.394550
+> [Jupiter:1:(0) 294.947973] [smpi_replay/VERBOSE] 1 send 2 1e9 147.485491
+> [Fafard:2:(0) 294.947973] [smpi_replay/VERBOSE] 2 Isend 0 1e9 0.000000
+> [Fafard:2:(0) 301.501397] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Tremblay:0:(0) 425.278035] [smpi_replay/VERBOSE] 0 recv 2 1e9 267.621353
+> [Tremblay:0:(0) 425.278035] [smpi_replay/INFO] Simulation time 425.278
+
+$ rm -f replay/one_trace
+
+p Test of Isend replay with SMPI (one trace for all processes)
+
+< replay/actions_allReduce.txt
+$ mkfile replay/one_trace
+
+$ ../../bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace
+> [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 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '1'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [Fafard:2:(0) 144.013385] [smpi_replay/VERBOSE] 2 allReduce 5e8 5e8 144.013385
+> [Fafard:2:(0) 150.566808] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Jupiter:1:(0) 154.032923] [smpi_replay/VERBOSE] 1 allReduce 5e8 5e8 154.032923
+> [Tremblay:0:(0) 154.032923] [smpi_replay/VERBOSE] 0 allReduce 5e8 5e8 154.032923
+> [Tremblay:0:(0) 159.130023] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100
+> [Jupiter:1:(0) 160.586347] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
+> [Jupiter:1:(0) 160.586347] [smpi_replay/INFO] Simulation time 160.586
+
+$ rm -f replay/one_trace
index 84923e1..f48b710 100644 (file)
@@ -1,6 +1,7 @@
 # use the tested library, not the installed one
 # (since we want to pass it to the child, it has to be redefined before each command)
 # Go for the first test
+
 p Test instrumentation of SMPI
 $ ../../bin/smpirun -trace -trace-resource -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/tracing/platform.xml -np 3 ./smpi_traced
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
index faa4e01..afac0e9 100644 (file)
@@ -32,7 +32,7 @@ typedef enum {
 /** @} */
 
 /************************** Global ******************************************/
-XBT_PUBLIC(void) MSG_config(const char *name, ...);
+XBT_PUBLIC(void) MSG_config(const char *key, const char *value);
 /** \ingroup msg_simulation
  *  \brief Initialize the MSG internal data.
  *  \hideinitializer
index d5f8bca..ae58a10 100644 (file)
@@ -14,9 +14,9 @@
 
 #ifdef HAVE_MC
 
-extern int _surf_do_model_check; /* please don't use directly: we inline MC_is_active, but that's what you should use */
+extern int _sg_do_model_check; /* please don't use directly: we inline MC_is_active, but that's what you should use */
 
-#define MC_is_active() _surf_do_model_check
+#define MC_is_active() _sg_do_model_check
 
 XBT_PUBLIC(void) MC_assert(int);
 XBT_PUBLIC(int) MC_random(int min, int max);
index 24a5533..677ea14 100644 (file)
@@ -33,7 +33,7 @@ typedef enum {
   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
   SURF_TRACE_CONNECT_KIND_LATENCY = 0
-} e_surf_trace_connect_kin_t;
+} e_surf_trace_connect_kind_t;
 
 typedef enum {
   SURF_PROCESS_ON_FAILURE_DIE = 1,
@@ -258,7 +258,7 @@ typedef struct s_sg_platf_trace_cbarg {
 
 typedef struct s_sg_platf_trace_connect_cbarg *sg_platf_trace_connect_cbarg_t;
 typedef struct s_sg_platf_trace_connect_cbarg {
-  e_surf_trace_connect_kin_t kind;
+  e_surf_trace_connect_kind_t kind;
   const char *trace;
   const char *element;
 } s_sg_platf_trace_connect_cbarg_t;
@@ -320,7 +320,7 @@ XBT_PUBLIC(void) sg_platf_new_bypassASroute (sg_platf_route_cbarg_t bypassASrout
 XBT_PUBLIC(void) sg_platf_new_prop (sg_platf_prop_cbarg_t prop); // Add a prop
 
 XBT_PUBLIC(void) sg_platf_new_trace(sg_platf_trace_cbarg_t trace);
-XBT_PUBLIC(void) sg_platf_new_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect);
+XBT_PUBLIC(void) sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect);
 
 XBT_PUBLIC(void) sg_platf_new_storage(sg_platf_storage_cbarg_t storage); // Add a storage to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_storage(sg_platf_storage_cbarg_t storage); // Add a storage to the currently described AS
index e12eb21..cdb0a2a 100644 (file)
@@ -17,6 +17,9 @@
 
 SG_BEGIN_DECL()
 
+/**************************** Scalar Values **********************************/
+
+typedef union u_smx_scalar u_smx_scalar_t;
 
 /* ******************************** Host ************************************ */
 /** @brief Host datatype
@@ -243,7 +246,9 @@ XBT_PUBLIC(void) SIMIX_create_environment(const char *file);
 XBT_PUBLIC(void) SIMIX_function_register(const char *name, xbt_main_func_t code);
 XBT_PUBLIC(void) SIMIX_function_register_default(xbt_main_func_t code);
 XBT_PUBLIC(xbt_main_func_t) SIMIX_get_registered_function(const char *name);
+XBT_PUBLIC(void) SIMIX_init_application(void);
 XBT_PUBLIC(void) SIMIX_launch_application(const char *file);
+
 XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
                                             const char *process_function,
                                             xbt_dynar_t arguments,
@@ -251,7 +256,7 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
                                             double process_kill_time);
 
 /*********************************** Host *************************************/
-XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(void);
+//XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(u_smx_scalar_t *args);
 XBT_PUBLIC(smx_host_t) SIMIX_host_get_by_name(const char *name);
 XBT_PUBLIC(smx_host_t) SIMIX_host_self(void);
 XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void);
index 6c71f11..7c900d8 100644 (file)
@@ -7,17 +7,18 @@
 
 ! SMPI's Fortran 77 include file
 
-      integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED,
-     >        MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE
+      integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED
+      integer MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE
       parameter(MPI_THREAD_SINGLE=0)
       parameter(MPI_THREAD_FUNNELED=1)
       parameter(MPI_THREAD_SERIALIZED=2)
       parameter(MPI_THREAD_MULTIPLE=3)
 
-      integer MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING, 
-     >        MPI_MAX_DATAREP_STRIN, MPI_MAX_INFO_KEY,
-     >        MPI_MAX_INFO_VAL, MPI_MAX_OBJECT_NAME, MPI_MAX_PORT_NAME,
-     >        MPI_ANY_SOURCE, MPI_PROC_NULL, MPI_ANY_TAG, MPI_UNDEFINED
+      integer MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING
+      integer MPI_MAX_DATAREP_STRIN, MPI_MAX_INFO_KEY
+      integer MPI_MAX_INFO_VAL, MPI_MAX_OBJECT_NAME, MPI_MAX_PORT_NAME
+      integer MPI_ANY_SOURCE, MPI_PROC_NULL, MPI_ANY_TAG, MPI_UNDEFINED
+      integer MPI_TAG_UB, MPI_TAG_LB
       parameter(MPI_MAX_PROCESSOR_NAME=100)
       parameter(MPI_MAX_ERROR_STRING=100)
       parameter(MPI_MAX_DATAREP_STRIN =100)
       parameter(MPI_PROC_NULL=-2)
       parameter(MPI_ANY_TAG=-1)
       parameter(MPI_UNDEFINED=-1)
+      parameter(MPI_TAG_UB=0)
+      parameter(MPI_TAG_LB=0)
 
-      integer MPI_SUCCESS, MPI_ERR_COMM, MPI_ERR_ARG, MPI_ERR_TYPE,
-     >        MPI_ERR_REQUEST, MPI_ERR_INTERN, MPI_ERR_COUNT,
-     >        MPI_ERR_RANK, MPI_ERR_OTHER,
-     >        MPI_ERR_TAG, MPI_ERR_TRUNCATE, MPI_ERR_GROUP, MPI_ERR_OP,
-     >        MPI_IDENT, MPI_SIMILAR, MPI_UNEQUAL, MPI_CONGRUENT,
-     >        MPI_WTIME_IS_GLOBAL
+      integer MPI_SUCCESS, MPI_ERR_COMM, MPI_ERR_ARG, MPI_ERR_TYPE
+      integer MPI_ERR_REQUEST, MPI_ERR_INTERN, MPI_ERR_COUNT
+      integer MPI_ERR_RANK, MPI_ERR_OTHER, MPI_ERR_UNKNOWN
+      integer MPI_ERR_TAG, MPI_ERR_TRUNCATE, MPI_ERR_GROUP, MPI_ERR_OP
+      integer MPI_IDENT, MPI_SIMILAR, MPI_UNEQUAL, MPI_CONGRUENT
+      integer MPI_WTIME_IS_GLOBAL
       parameter(MPI_SUCCESS=0)
       parameter(MPI_ERR_COMM=1)
       parameter(MPI_ERR_ARG=2)
@@ -49,6 +52,7 @@
       parameter(MPI_ERR_GROUP=10)
       parameter(MPI_ERR_OP=11)
       parameter(MPI_ERR_OTHER=12)
+      parameter(MPI_ERR_UNKNOWN=13)
       parameter(MPI_IDENT=0)
       parameter(MPI_SIMILAR=1)
       parameter(MPI_UNEQUAL=2)
       parameter(MPI_COMM_SELF=-2)
       parameter(MPI_COMM_WORLD=0)
 
+      integer MPI_GROUP_NULL, MPI_GROUP_EMPTY
+      parameter(MPI_GROUP_NULL=-1)
+      parameter(MPI_GROUP_EMPTY=-2)
+
 ! This should be equal to the number of int fields in MPI_Status
-      integer MPI_STATUS_SIZE
+      integer MPI_STATUS_SIZE, MPI_STATUSES_IGNORE
       parameter(MPI_STATUS_SIZE=4)
+      parameter(MPI_STATUSES_IGNORE=0)
 
       integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
       common/smpi/ MPI_STATUS_IGNORE
       parameter(MPI_REQUEST_NULL=-1)
 
 ! These should be ordered as in smpi_f77.c
-      integer MPI_DATATYPE_NULL, MPI_BYTE, MPI_CHARACTER, MPI_LOGICAL,
-     >        MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
-     >        MPI_INTEGER8, MPI_REAL, MPI_REAL4, MPI_REAL8,
-     >        MPI_DOUBLE_PRECISION, MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
-     >        MPI_2INTEGER, MPI_LOGICAL1, MPI_LOGICAL2, MPI_LOGICAL4,
-     >        MPI_LOGICAL8, MPI_2REAL, MPI_2DOUBLE_PRECISION
+      integer MPI_DATATYPE_NULL, MPI_BYTE, MPI_CHARACTER, MPI_LOGICAL
+      integer MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4
+      integer MPI_INTEGER8, MPI_REAL, MPI_REAL4, MPI_REAL8
+      integer MPI_DOUBLE_PRECISION, MPI_COMPLEX, MPI_DOUBLE_COMPLEX
+      integer MPI_2INTEGER, MPI_LOGICAL1, MPI_LOGICAL2, MPI_LOGICAL4
+      integer MPI_LOGICAL8, MPI_2REAL, MPI_2DOUBLE_PRECISION
       parameter(MPI_DATATYPE_NULL=-1)
       parameter(MPI_BYTE=0)
       parameter(MPI_CHARACTER=1)
       parameter(MPI_2DOUBLE_PRECISION=19)
 
 ! These should be ordered as in smpi_f77.c
-      integer MPI_OP_NULL,MPI_MAX, MPI_MIN, MPI_MAXLOC, MPI_MINLOC,
-     >        MPI_SUM, MPI_PROD, MPI_LAND, MPI_LOR, MPI_LXOR, MPI_BAND,
-     >        MPI_BOR, MPI_BXOR
+      integer MPI_OP_NULL,MPI_MAX, MPI_MIN, MPI_MAXLOC, MPI_MINLOC
+      integer MPI_SUM, MPI_PROD, MPI_LAND, MPI_LOR, MPI_LXOR, MPI_BAND
+      integer MPI_BOR, MPI_BXOR
       parameter(MPI_OP_NULL=-1)
       parameter(MPI_MAX=0)
       parameter(MPI_MIN=1)
       parameter(MPI_BOR=10)
       parameter(MPI_BXOR=11)
 
-      external MPI_INIT, MPI_FINALIZE, MPI_ABORT,
-     >         MPI_COMM_RANK, MPI_COMM_SIZE, MPI_COMM_DUP, MPI_COMM_SPLIT
-     >         MPI_SEND_INIT, MPI_ISEND, MPI_SEND,
-     >         MPI_RECV_INIT, MPI_IRECV, MPI_RECV,
-     >         MPI_START, MPI_STARTALL,
-     >         MPI_WAIT, MPI_WAITANY, MPI_WAITALL,
-     >         MPI_BCAST, MPI_BARRIER, MPI_REDUCE, MPI_ALLREDUCE,
-     >         MPI_SCATTER, MPI_GATHER, MPI_ALLGATHER, MPI_SCAN,
-     >         MPI_ALLTOALL
+      external MPI_INIT, MPI_FINALIZE, MPI_ABORT
+      external MPI_COMM_RANK, MPI_COMM_SIZE, MPI_COMM_DUP, MPI_COMM_SPLIT
+      external MPI_SEND_INIT, MPI_ISEND, MPI_SEND
+      external MPI_RECV_INIT, MPI_IRECV, MPI_RECV
+      external MPI_START, MPI_STARTALL
+      external MPI_WAIT, MPI_WAITANY, MPI_WAITALL
+      external MPI_BCAST, MPI_BARRIER, MPI_REDUCE, MPI_ALLREDUCE
+      external MPI_SCATTER, MPI_GATHER, MPI_ALLGATHER, MPI_SCAN
+      external MPI_ALLTOALL, MPI_GATHERV, MPI_SENDRECV
 
       external MPI_WTIME
       external MPI_WTICK
index 3259705..aa601ec 100644 (file)
@@ -508,9 +508,10 @@ XBT_PUBLIC(void*) smpi_shared_set_call(const char* func, const char* input, void
                                          : smpi_shared_set_call(#func, input, func(__VA_ARGS__)))
 
 /* Fortran specific stuff */
-XBT_PUBLIC(int) __attribute__((weak)) smpi_simulated_main(int argc, char** argv);
+XBT_PUBLIC(int) __attribute__((weak)) smpi_simulated_main__(int argc, char** argv);
 XBT_PUBLIC(int) __attribute__((weak)) MAIN__(void);
 XBT_PUBLIC(int) smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]);
+XBT_PUBLIC(void) __attribute__((weak)) user_main__(void);
 
 XBT_PUBLIC(int) smpi_process_index(void);
 
index 0e5d259..5ab2199 100644 (file)
@@ -1,6 +1,6 @@
-#define main smpi_simulated_main(int argc, char **argv);\
+#define main smpi_simulated_main__(int argc, char **argv);\
 int main(int argc, char **argv){\
-MAIN__(&smpi_simulated_main,&argc,argv);\
+MAIN__(&smpi_simulated_main__,&argc,argv);\
 return 0;\
 }\
-int smpi_simulated_main
+int smpi_simulated_main__
index d6f3451..47e90bb 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.69 2012/12/20 00:13:40 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:
@@ -56,12 +56,12 @@ XBT_PUBLIC(void ) STag_surfxml_trace(void);
 XBT_PUBLIC(void ) ETag_surfxml_trace(void);
 XBT_PUBLIC(void ) STag_surfxml_random(void);
 XBT_PUBLIC(void ) ETag_surfxml_random(void);
-XBT_PUBLIC(void ) STag_surfxml_trace_connect(void);
-XBT_PUBLIC(void ) ETag_surfxml_trace_connect(void);
+XBT_PUBLIC(void ) STag_surfxml_trace___connect(void);
+XBT_PUBLIC(void ) ETag_surfxml_trace___connect(void);
 XBT_PUBLIC(void ) STag_surfxml_AS(void);
 XBT_PUBLIC(void ) ETag_surfxml_AS(void);
-XBT_PUBLIC(void ) STag_surfxml_storage_type(void);
-XBT_PUBLIC(void ) ETag_surfxml_storage_type(void);
+XBT_PUBLIC(void ) STag_surfxml_storage___type(void);
+XBT_PUBLIC(void ) ETag_surfxml_storage___type(void);
 XBT_PUBLIC(void ) STag_surfxml_storage(void);
 XBT_PUBLIC(void ) ETag_surfxml_storage(void);
 XBT_PUBLIC(void ) STag_surfxml_mount(void);
@@ -72,8 +72,8 @@ XBT_PUBLIC(void ) STag_surfxml_host(void);
 XBT_PUBLIC(void ) ETag_surfxml_host(void);
 XBT_PUBLIC(void ) STag_surfxml_gpu(void);
 XBT_PUBLIC(void ) ETag_surfxml_gpu(void);
-XBT_PUBLIC(void ) STag_surfxml_host_link(void);
-XBT_PUBLIC(void ) ETag_surfxml_host_link(void);
+XBT_PUBLIC(void ) STag_surfxml_host___link(void);
+XBT_PUBLIC(void ) ETag_surfxml_host___link(void);
 XBT_PUBLIC(void ) STag_surfxml_cluster(void);
 XBT_PUBLIC(void ) ETag_surfxml_cluster(void);
 XBT_PUBLIC(void ) STag_surfxml_cabinet(void);
@@ -90,8 +90,8 @@ XBT_PUBLIC(void ) STag_surfxml_route(void);
 XBT_PUBLIC(void ) ETag_surfxml_route(void);
 XBT_PUBLIC(void ) STag_surfxml_ASroute(void);
 XBT_PUBLIC(void ) ETag_surfxml_ASroute(void);
-XBT_PUBLIC(void ) STag_surfxml_link_ctn(void);
-XBT_PUBLIC(void ) ETag_surfxml_link_ctn(void);
+XBT_PUBLIC(void ) STag_surfxml_link___ctn(void);
+XBT_PUBLIC(void ) ETag_surfxml_link___ctn(void);
 XBT_PUBLIC(void ) STag_surfxml_bypassRoute(void);
 XBT_PUBLIC(void ) ETag_surfxml_bypassRoute(void);
 XBT_PUBLIC(void ) STag_surfxml_bypassASroute(void);
@@ -109,25 +109,25 @@ XBT_PUBLIC(void ) ETag_surfxml_prop(void);
 typedef int AT_surfxml_mount_name;
 #define AU_surfxml_mount_name NULL
 typedef enum { AU_surfxml_random_generator, A_surfxml_random_generator_DRAND48,A_surfxml_random_generator_RAND,A_surfxml_random_generator_RNGSTREAM,A_surfxml_random_generator_NONE } AT_surfxml_random_generator;
-typedef int AT_surfxml_ASroute_gw_dst;
-#define AU_surfxml_ASroute_gw_dst NULL
-typedef int AT_surfxml_trace_connect_element;
-#define AU_surfxml_trace_connect_element NULL
+typedef int AT_surfxml_ASroute_gw___dst;
+#define AU_surfxml_ASroute_gw___dst NULL
+typedef int AT_surfxml_trace___connect_element;
+#define AU_surfxml_trace___connect_element NULL
 typedef int AT_surfxml_prop_id;
 #define AU_surfxml_prop_id NULL
-typedef int AT_surfxml_host_link_up;
-#define AU_surfxml_host_link_up NULL
+typedef int AT_surfxml_host___link_up;
+#define AU_surfxml_host___link_up NULL
 typedef int AT_surfxml_host_id;
 #define AU_surfxml_host_id NULL
 typedef enum { AU_surfxml_ASroute_symmetrical, A_surfxml_ASroute_symmetrical_YES,A_surfxml_ASroute_symmetrical_NO } AT_surfxml_ASroute_symmetrical;
 typedef int AT_surfxml_peer_lat;
 #define AU_surfxml_peer_lat NULL
-typedef enum { AU_surfxml_process_on_failure, A_surfxml_process_on_failure_DIE,A_surfxml_process_on_failure_RESTART } AT_surfxml_process_on_failure;
-typedef int AT_surfxml_link_latency_file;
-#define AU_surfxml_link_latency_file NULL
-typedef int AT_surfxml_peer_availability_file;
-#define AU_surfxml_peer_availability_file NULL
-typedef enum { AU_surfxml_link_ctn_direction, A_surfxml_link_ctn_direction_UP,A_surfxml_link_ctn_direction_DOWN,A_surfxml_link_ctn_direction_NONE } AT_surfxml_link_ctn_direction;
+typedef enum { AU_surfxml_process_on___failure, A_surfxml_process_on___failure_DIE,A_surfxml_process_on___failure_RESTART } AT_surfxml_process_on___failure;
+typedef int AT_surfxml_link_latency___file;
+#define AU_surfxml_link_latency___file NULL
+typedef int AT_surfxml_peer_availability___file;
+#define AU_surfxml_peer_availability___file NULL
+typedef enum { AU_surfxml_link___ctn_direction, A_surfxml_link___ctn_direction_UP,A_surfxml_link___ctn_direction_DOWN,A_surfxml_link___ctn_direction_NONE } AT_surfxml_link___ctn_direction;
 typedef enum { AU_surfxml_host_state, A_surfxml_host_state_ON,A_surfxml_host_state_OFF } AT_surfxml_host_state;
 typedef int AT_surfxml_AS_id;
 #define AU_surfxml_AS_id NULL
@@ -139,18 +139,18 @@ typedef int AT_surfxml_gpu_name;
 #define AU_surfxml_gpu_name NULL
 typedef int AT_surfxml_router_id;
 #define AU_surfxml_router_id NULL
-typedef int AT_surfxml_storage_type_id;
-#define AU_surfxml_storage_type_id NULL
-typedef int AT_surfxml_process_start_time;
-#define AU_surfxml_process_start_time NULL
+typedef int AT_surfxml_storage___type_id;
+#define AU_surfxml_storage___type_id NULL
+typedef int AT_surfxml_process_start___time;
+#define AU_surfxml_process_start___time NULL
 typedef int AT_surfxml_cabinet_bw;
 #define AU_surfxml_cabinet_bw NULL
 typedef int AT_surfxml_cluster_suffix;
 #define AU_surfxml_cluster_suffix NULL
 typedef int AT_surfxml_bypassASroute_dst;
 #define AU_surfxml_bypassASroute_dst NULL
-typedef int AT_surfxml_host_link_id;
-#define AU_surfxml_host_link_id NULL
+typedef int AT_surfxml_host___link_id;
+#define AU_surfxml_host___link_id NULL
 typedef int AT_surfxml_ASroute_src;
 #define AU_surfxml_ASroute_src NULL
 typedef int AT_surfxml_cluster_prefix;
@@ -159,58 +159,58 @@ typedef int AT_surfxml_cabinet_prefix;
 #define AU_surfxml_cabinet_prefix NULL
 typedef int AT_surfxml_trace_file;
 #define AU_surfxml_trace_file NULL
-typedef enum { AU_surfxml_link_sharing_policy, A_surfxml_link_sharing_policy_SHARED,A_surfxml_link_sharing_policy_FATPIPE,A_surfxml_link_sharing_policy_FULLDUPLEX } AT_surfxml_link_sharing_policy;
+typedef enum { AU_surfxml_link_sharing___policy, A_surfxml_link_sharing___policy_SHARED,A_surfxml_link_sharing___policy_FATPIPE,A_surfxml_link_sharing___policy_FULLDUPLEX } AT_surfxml_link_sharing___policy;
 typedef int AT_surfxml_storage_typeId;
 #define AU_surfxml_storage_typeId NULL
 typedef int AT_surfxml_random_min;
 #define AU_surfxml_random_min NULL
-typedef int AT_surfxml_link_ctn_id;
-#define AU_surfxml_link_ctn_id NULL
-typedef int AT_surfxml_peer_bw_out;
-#define AU_surfxml_peer_bw_out NULL
-typedef int AT_surfxml_cluster_availability_file;
-#define AU_surfxml_cluster_availability_file NULL
+typedef int AT_surfxml_link___ctn_id;
+#define AU_surfxml_link___ctn_id NULL
+typedef int AT_surfxml_peer_bw___out;
+#define AU_surfxml_peer_bw___out NULL
+typedef int AT_surfxml_cluster_availability___file;
+#define AU_surfxml_cluster_availability___file NULL
 typedef int AT_surfxml_storage_content;
 #define AU_surfxml_storage_content NULL
-typedef int AT_surfxml_process_kill_time;
-#define AU_surfxml_process_kill_time NULL
-typedef int AT_surfxml_cluster_bb_bw;
-#define AU_surfxml_cluster_bb_bw NULL
+typedef int AT_surfxml_process_kill___time;
+#define AU_surfxml_process_kill___time NULL
+typedef int AT_surfxml_cluster_bb___bw;
+#define AU_surfxml_cluster_bb___bw NULL
 typedef int AT_surfxml_argument_value;
 #define AU_surfxml_argument_value NULL
 typedef enum { AU_surfxml_link_state, A_surfxml_link_state_ON,A_surfxml_link_state_OFF } AT_surfxml_link_state;
-typedef int AT_surfxml_ASroute_gw_src;
-#define AU_surfxml_ASroute_gw_src NULL
+typedef int AT_surfxml_ASroute_gw___src;
+#define AU_surfxml_ASroute_gw___src NULL
 typedef enum { AU_surfxml_AS_routing, A_surfxml_AS_routing_Full,A_surfxml_AS_routing_Floyd,A_surfxml_AS_routing_Dijkstra,A_surfxml_AS_routing_DijkstraCache,A_surfxml_AS_routing_None,A_surfxml_AS_routing_RuleBased,A_surfxml_AS_routing_Vivaldi,A_surfxml_AS_routing_Cluster } AT_surfxml_AS_routing;
 typedef int AT_surfxml_link_bandwidth;
 #define AU_surfxml_link_bandwidth NULL
 typedef int AT_surfxml_cluster_id;
 #define AU_surfxml_cluster_id NULL
-typedef int AT_surfxml_peer_bw_in;
-#define AU_surfxml_peer_bw_in NULL
+typedef int AT_surfxml_peer_bw___in;
+#define AU_surfxml_peer_bw___in NULL
 typedef int AT_surfxml_random_mean;
 #define AU_surfxml_random_mean NULL
-typedef int AT_surfxml_storage_type_size;
-#define AU_surfxml_storage_type_size NULL
-typedef int AT_surfxml_cluster_bb_lat;
-#define AU_surfxml_cluster_bb_lat NULL
+typedef int AT_surfxml_storage___type_size;
+#define AU_surfxml_storage___type_size NULL
+typedef int AT_surfxml_cluster_bb___lat;
+#define AU_surfxml_cluster_bb___lat NULL
 typedef int AT_surfxml_link_latency;
 #define AU_surfxml_link_latency NULL
 typedef int AT_surfxml_backbone_bandwidth;
 #define AU_surfxml_backbone_bandwidth NULL
 typedef int AT_surfxml_backbone_id;
 #define AU_surfxml_backbone_id NULL
-typedef enum { AU_surfxml_trace_connect_kind, A_surfxml_trace_connect_kind_HOST_AVAIL,A_surfxml_trace_connect_kind_POWER,A_surfxml_trace_connect_kind_LINK_AVAIL,A_surfxml_trace_connect_kind_BANDWIDTH,A_surfxml_trace_connect_kind_LATENCY } AT_surfxml_trace_connect_kind;
+typedef enum { AU_surfxml_trace___connect_kind, A_surfxml_trace___connect_kind_HOST___AVAIL,A_surfxml_trace___connect_kind_POWER,A_surfxml_trace___connect_kind_LINK___AVAIL,A_surfxml_trace___connect_kind_BANDWIDTH,A_surfxml_trace___connect_kind_LATENCY } AT_surfxml_trace___connect_kind;
 typedef int AT_surfxml_cabinet_lat;
 #define AU_surfxml_cabinet_lat NULL
 typedef int AT_surfxml_random_seed;
 #define AU_surfxml_random_seed NULL
-typedef int AT_surfxml_cluster_state_file;
-#define AU_surfxml_cluster_state_file NULL
-typedef int AT_surfxml_link_bandwidth_file;
-#define AU_surfxml_link_bandwidth_file NULL
-typedef int AT_surfxml_storage_type_content;
-#define AU_surfxml_storage_type_content NULL
+typedef int AT_surfxml_cluster_state___file;
+#define AU_surfxml_cluster_state___file NULL
+typedef int AT_surfxml_link_bandwidth___file;
+#define AU_surfxml_link_bandwidth___file NULL
+typedef int AT_surfxml_storage___type_content;
+#define AU_surfxml_storage___type_content NULL
 typedef enum { AU_surfxml_route_symmetrical, A_surfxml_route_symmetrical_YES,A_surfxml_route_symmetrical_NO } AT_surfxml_route_symmetrical;
 typedef int AT_surfxml_random_id;
 #define AU_surfxml_random_id NULL
@@ -224,17 +224,17 @@ typedef int AT_surfxml_process_host;
 #define AU_surfxml_process_host NULL
 typedef int AT_surfxml_cabinet_id;
 #define AU_surfxml_cabinet_id NULL
-typedef int AT_surfxml_host_availability_file;
-#define AU_surfxml_host_availability_file NULL
+typedef int AT_surfxml_host_availability___file;
+#define AU_surfxml_host_availability___file NULL
 typedef int AT_surfxml_cluster_lat;
 #define AU_surfxml_cluster_lat NULL
 typedef int AT_surfxml_router_coordinates;
 #define AU_surfxml_router_coordinates NULL
 typedef int AT_surfxml_trace_periodicity;
 #define AU_surfxml_trace_periodicity NULL
-typedef enum { AU_surfxml_cluster_bb_sharing_policy, A_surfxml_cluster_bb_sharing_policy_SHARED,A_surfxml_cluster_bb_sharing_policy_FATPIPE } AT_surfxml_cluster_bb_sharing_policy;
-typedef int AT_surfxml_peer_state_file;
-#define AU_surfxml_peer_state_file NULL
+typedef enum { AU_surfxml_cluster_bb___sharing___policy, A_surfxml_cluster_bb___sharing___policy_SHARED,A_surfxml_cluster_bb___sharing___policy_FATPIPE } AT_surfxml_cluster_bb___sharing___policy;
+typedef int AT_surfxml_peer_state___file;
+#define AU_surfxml_peer_state___file NULL
 typedef int AT_surfxml_peer_coordinates;
 #define AU_surfxml_peer_coordinates NULL
 typedef int AT_surfxml_bypassASroute_src;
@@ -245,14 +245,14 @@ typedef int AT_surfxml_mstorage_typeId;
 #define AU_surfxml_mstorage_typeId NULL
 typedef int AT_surfxml_ASroute_dst;
 #define AU_surfxml_ASroute_dst NULL
-typedef int AT_surfxml_link_state_file;
-#define AU_surfxml_link_state_file NULL
+typedef int AT_surfxml_link_state___file;
+#define AU_surfxml_link_state___file NULL
 typedef int AT_surfxml_random_radical;
 #define AU_surfxml_random_radical NULL
-typedef int AT_surfxml_bypassASroute_gw_src;
-#define AU_surfxml_bypassASroute_gw_src NULL
-typedef int AT_surfxml_trace_connect_trace;
-#define AU_surfxml_trace_connect_trace NULL
+typedef int AT_surfxml_bypassASroute_gw___src;
+#define AU_surfxml_bypassASroute_gw___src NULL
+typedef int AT_surfxml_trace___connect_trace;
+#define AU_surfxml_trace___connect_trace NULL
 typedef int AT_surfxml_mount_id;
 #define AU_surfxml_mount_id NULL
 typedef int AT_surfxml_cluster_power;
@@ -261,19 +261,19 @@ 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 int AT_surfxml_cluster_router___id;
+#define AU_surfxml_cluster_router___id NULL
 typedef int AT_surfxml_cabinet_radical;
 #define AU_surfxml_cabinet_radical 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 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
 typedef int AT_surfxml_cabinet_power;
 #define AU_surfxml_cabinet_power NULL
 typedef int AT_surfxml_host_core;
 #define AU_surfxml_host_core NULL
-typedef int AT_surfxml_storage_type_model;
-#define AU_surfxml_storage_type_model NULL
+typedef int AT_surfxml_storage___type_model;
+#define AU_surfxml_storage___type_model NULL
 typedef int AT_surfxml_host_availability;
 #define AU_surfxml_host_availability NULL
 typedef int AT_surfxml_bypassRoute_src;
@@ -294,18 +294,18 @@ typedef int AT_surfxml_cluster_radical;
 #define AU_surfxml_cluster_radical NULL
 typedef int AT_surfxml_config_id;
 #define AU_surfxml_config_id NULL
-typedef int AT_surfxml_bypassASroute_gw_dst;
-#define AU_surfxml_bypassASroute_gw_dst NULL
-typedef int AT_surfxml_host_link_down;
-#define AU_surfxml_host_link_down NULL
+typedef int AT_surfxml_bypassASroute_gw___dst;
+#define AU_surfxml_bypassASroute_gw___dst NULL
+typedef int AT_surfxml_host___link_down;
+#define AU_surfxml_host___link_down NULL
 typedef int AT_surfxml_include_file;
 #define AU_surfxml_include_file NULL
-typedef int AT_surfxml_random_std_deviation;
-#define AU_surfxml_random_std_deviation NULL
+typedef int AT_surfxml_random_std___deviation;
+#define AU_surfxml_random_std___deviation NULL
 typedef int AT_surfxml_cluster_core;
 #define AU_surfxml_cluster_core NULL
-typedef int AT_surfxml_host_state_file;
-#define AU_surfxml_host_state_file NULL
+typedef int AT_surfxml_host_state___file;
+#define AU_surfxml_host_state___file NULL
 typedef int AT_surfxml_route_dst;
 #define AU_surfxml_route_dst NULL
 typedef int AT_surfxml_cluster_bw;
@@ -319,222 +319,331 @@ XBT_PUBLIC_DATA(char *) surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
 XBT_PUBLIC_DATA(AT_surfxml_mount_name ) AX_surfxml_mount_name;
 #define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name)
+XBT_PUBLIC_DATA(short ) int surfxml_mount_name_isset;
 XBT_PUBLIC_DATA(AT_surfxml_random_generator ) AX_surfxml_random_generator;
 #define A_surfxml_random_generator AX_surfxml_random_generator
-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(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_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(AT_surfxml_host_link_up ) AX_surfxml_host_link_up;
-#define A_surfxml_host_link_up (surfxml_bufferstack + AX_surfxml_host_link_up)
+XBT_PUBLIC_DATA(short ) int surfxml_prop_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host___link_up ) AX_surfxml_host___link_up;
+#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
+XBT_PUBLIC_DATA(short ) int surfxml_host___link_up_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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(AT_surfxml_process_on_failure ) AX_surfxml_process_on_failure;
-#define A_surfxml_process_on_failure AX_surfxml_process_on_failure
-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(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(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_peer_lat_isset;
+XBT_PUBLIC_DATA(AT_surfxml_process_on___failure ) AX_surfxml_process_on___failure;
+#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
+XBT_PUBLIC_DATA(short ) int surfxml_process_on___failure_isset;
+XBT_PUBLIC_DATA(AT_surfxml_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_cabinet_suffix ) AX_surfxml_cabinet_suffix;
 #define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
+XBT_PUBLIC_DATA(short ) int surfxml_cabinet_suffix_isset;
 XBT_PUBLIC_DATA(AT_surfxml_gpu_name ) AX_surfxml_gpu_name;
 #define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
+XBT_PUBLIC_DATA(short ) int surfxml_gpu_name_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(AT_surfxml_storage_type_id ) AX_surfxml_storage_type_id;
-#define A_surfxml_storage_type_id (surfxml_bufferstack + AX_surfxml_storage_type_id)
-XBT_PUBLIC_DATA(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_router_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_id ) AX_surfxml_storage___type_id;
+#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
+XBT_PUBLIC_DATA(short ) int surfxml_storage___type_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_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_cabinet_bw ) AX_surfxml_cabinet_bw;
 #define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
+XBT_PUBLIC_DATA(short ) int surfxml_cabinet_bw_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_bypassASroute_dst ) AX_surfxml_bypassASroute_dst;
 #define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
-XBT_PUBLIC_DATA(AT_surfxml_host_link_id ) AX_surfxml_host_link_id;
-#define A_surfxml_host_link_id (surfxml_bufferstack + AX_surfxml_host_link_id)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassASroute_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host___link_id ) AX_surfxml_host___link_id;
+#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
+XBT_PUBLIC_DATA(short ) int surfxml_host___link_id_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_cabinet_prefix ) AX_surfxml_cabinet_prefix;
 #define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
+XBT_PUBLIC_DATA(short ) int surfxml_cabinet_prefix_isset;
 XBT_PUBLIC_DATA(AT_surfxml_trace_file ) AX_surfxml_trace_file;
 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
-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_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_storage_typeId ) AX_surfxml_storage_typeId;
 #define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
+XBT_PUBLIC_DATA(short ) int surfxml_storage_typeId_isset;
 XBT_PUBLIC_DATA(AT_surfxml_random_min ) AX_surfxml_random_min;
 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
-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(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(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_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_storage_content ) AX_surfxml_storage_content;
 #define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
-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(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_storage_content_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(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_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 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(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_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(AT_surfxml_storage_type_size ) AX_surfxml_storage_type_size;
-#define A_surfxml_storage_type_size (surfxml_bufferstack + AX_surfxml_storage_type_size)
-XBT_PUBLIC_DATA(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_random_mean_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_size ) AX_surfxml_storage___type_size;
+#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
+XBT_PUBLIC_DATA(short ) int surfxml_storage___type_size_isset;
+XBT_PUBLIC_DATA(AT_surfxml_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_backbone_bandwidth ) AX_surfxml_backbone_bandwidth;
 #define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
+XBT_PUBLIC_DATA(short ) int surfxml_backbone_bandwidth_isset;
 XBT_PUBLIC_DATA(AT_surfxml_backbone_id ) AX_surfxml_backbone_id;
 #define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
-XBT_PUBLIC_DATA(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_backbone_id_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_cabinet_lat ) AX_surfxml_cabinet_lat;
 #define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
+XBT_PUBLIC_DATA(short ) int surfxml_cabinet_lat_isset;
 XBT_PUBLIC_DATA(AT_surfxml_random_seed ) AX_surfxml_random_seed;
 #define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
-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(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(AT_surfxml_storage_type_content ) AX_surfxml_storage_type_content;
-#define A_surfxml_storage_type_content (surfxml_bufferstack + AX_surfxml_storage_type_content)
+XBT_PUBLIC_DATA(short ) int surfxml_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_storage___type_content ) AX_surfxml_storage___type_content;
+#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
+XBT_PUBLIC_DATA(short ) int surfxml_storage___type_content_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_mstorage_name ) AX_surfxml_mstorage_name;
 #define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
+XBT_PUBLIC_DATA(short ) int surfxml_mstorage_name_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_cabinet_id ) AX_surfxml_cabinet_id;
 #define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
-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_cabinet_id_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_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_trace_periodicity ) AX_surfxml_trace_periodicity;
 #define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
-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(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_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_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_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_bypassASroute_src ) AX_surfxml_bypassASroute_src;
 #define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassASroute_src_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_mstorage_typeId ) AX_surfxml_mstorage_typeId;
 #define A_surfxml_mstorage_typeId (surfxml_bufferstack + AX_surfxml_mstorage_typeId)
+XBT_PUBLIC_DATA(short ) int surfxml_mstorage_typeId_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(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_ASroute_dst_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_random_radical ) AX_surfxml_random_radical;
 #define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw_src ) AX_surfxml_bypassASroute_gw_src;
-#define A_surfxml_bypassASroute_gw_src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw_src)
-XBT_PUBLIC_DATA(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_random_radical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___src ) AX_surfxml_bypassASroute_gw___src;
+#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassASroute_gw___src_isset;
+XBT_PUBLIC_DATA(AT_surfxml_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_mount_id ) AX_surfxml_mount_id;
 #define A_surfxml_mount_id (surfxml_bufferstack + AX_surfxml_mount_id)
+XBT_PUBLIC_DATA(short ) int surfxml_mount_id_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(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_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_cabinet_radical ) AX_surfxml_cabinet_radical;
 #define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
-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_cabinet_radical_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_cabinet_power ) AX_surfxml_cabinet_power;
 #define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
+XBT_PUBLIC_DATA(short ) int surfxml_cabinet_power_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(AT_surfxml_storage_type_model ) AX_surfxml_storage_type_model;
-#define A_surfxml_storage_type_model (surfxml_bufferstack + AX_surfxml_storage_type_model)
+XBT_PUBLIC_DATA(short ) int surfxml_host_core_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_model ) AX_surfxml_storage___type_model;
+#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
+XBT_PUBLIC_DATA(short ) int surfxml_storage___type_model_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_backbone_latency ) AX_surfxml_backbone_latency;
 #define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
+XBT_PUBLIC_DATA(short ) int surfxml_backbone_latency_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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_storage_id ) AX_surfxml_storage_id;
 #define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
+XBT_PUBLIC_DATA(short ) int surfxml_storage_id_isset;
 XBT_PUBLIC_DATA(AT_surfxml_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(AT_surfxml_bypassASroute_gw_dst ) AX_surfxml_bypassASroute_gw_dst;
-#define A_surfxml_bypassASroute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw_dst)
-XBT_PUBLIC_DATA(AT_surfxml_host_link_down ) AX_surfxml_host_link_down;
-#define A_surfxml_host_link_down (surfxml_bufferstack + AX_surfxml_host_link_down)
+XBT_PUBLIC_DATA(short ) int surfxml_config_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___dst ) AX_surfxml_bypassASroute_gw___dst;
+#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassASroute_gw___dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host___link_down ) AX_surfxml_host___link_down;
+#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
+XBT_PUBLIC_DATA(short ) int surfxml_host___link_down_isset;
 XBT_PUBLIC_DATA(AT_surfxml_include_file ) AX_surfxml_include_file;
 #define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
-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_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_cluster_core ) AX_surfxml_cluster_core;
 #define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-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_cluster_core_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 023f70a..67c25bc 100644 (file)
@@ -105,6 +105,7 @@ XBT_PUBLIC(void) xbt_cfg_set_string(xbt_cfg_t cfg, const char *name,
                                     const char *val);
 XBT_PUBLIC(void) xbt_cfg_set_peer(xbt_cfg_t cfg, const char *name,
                                   const char *peer, int port);
+XBT_PUBLIC(void*) xbt_cfg_set_as_string(xbt_cfg_t cfg, const char *name, const char *val);
 
 /*
   Set the default value of the cell \a name in \a cfg with the provided value.
index 0cd6358..eca8b82 100644 (file)
@@ -16,6 +16,8 @@
 
 SG_BEGIN_DECL()
 
+/* note that the internals of testall, that follow, are not publicly documented */
+
 /* test suite object type */
 typedef struct s_xbt_test_suite *xbt_test_suite_t;
 
@@ -57,6 +59,69 @@ XBT_PUBLIC(void) xbt_test_dump(char *selection);
 /* Cleanup the mess */
 XBT_PUBLIC(void) xbt_test_exit(void);
 
+
+/** 
+ * @addtogroup XBT_cunit
+ * @brief Unit test mechanism (to test a set of functions)
+ *  
+ * This module is mainly intended to allow the tests of SimGrid
+ * itself and may lack the level of genericity that you would expect
+ * as a user. Only use it in external projects at your own risk (but
+ * it work rather well for us). We play with the idea of migrating
+ * to an external solution for our unit tests, possibly offering
+ * more features, but having absolutely no dependencies is a nice
+ * feature of SimGrid (and this code is sufficient to cover our
+ * needs, actually, so why should we bother switching?)
+ * 
+ * Note that if you want to test a full binary (such as an example),
+ * you want to use our integration testing mechanism, not our unit
+ * testing one. Please refer to Section \ref
+ * inside_cmake_addtest_integration
+ * 
+ * Some more information on our unit testing is available in Section @ref inside_cmake_addtest_unit.  
+ * 
+ * All code intended to be executed as a unit test will be extracted
+ * by a script (tools/sg_unit_extract.pl), and must thus be protected
+ * between preprocessor definitions, as follows. Note that
+ * SIMGRID_TEST string must appear on the endif line too for the
+ * script to work, and that this script does not allow to have more
+ * than one suite per file. For now, but patches are naturally
+ * welcome.
+ * 
+@verbatim
+#ifdef SIMGRID_TEST
+
+<your code>
+
+#endif  // SIMGRID_TEST
+@endverbatim
+ * 
+ *
+ * @{ 
+ */
+/** @brief Provide informations about the suite declared in this file
+ *  @hideinitializer
+ * 
+ * Actually, this macro is not used by C, but by the script
+ * extracting the test units, but that should be transparent for you.
+ *
+ * @param suite_name the short name of this suite, to be used in the --tests argument of testall afterward. Avoid spaces and any other strange chars
+ * @param suite_title instructive title that testall should display when your suite is run
+ */
+#define XBT_TEST_SUITE(suite_name,suite_title)
+
+/** @brief Declare a new test units (containing individual tests)
+ *  @hideinitializer
+ *
+ * @param name the short name that will be used in test all to enable/disable this test
+ * @param func a valid function name that will be used to contain all code of this unit
+ * @param title human informative description of your test (displayed in testall)
+ */
+#define XBT_TEST_UNIT(name,func,title)    \
+    void func(void);  /*prototype*/       \
+    void func(void)
+
+
 /* test operations */
 XBT_PUBLIC(void) _xbt_test_add(const char *file, int line, const char *fmt,
                                ...) _XBT_GNUC_PRINTF(3, 4);
@@ -65,9 +130,18 @@ XBT_PUBLIC(void) _xbt_test_fail(const char *file, int line,
                                                                        4);
 XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt,
                                ...) _XBT_GNUC_PRINTF(3, 4);
-
+/** @brief Declare that a new test begins (printf-like parameters, describing the test) 
+ *  @hideinitializer */
 #define xbt_test_add(...)       _xbt_test_add(__FILE__, __LINE__, __VA_ARGS__)
+/** @brief Declare that the lastly started test failed (printf-like parameters, describing failure cause) 
+ *  @hideinitializer */
 #define xbt_test_fail(...)      _xbt_test_fail(__FILE__, __LINE__, __VA_ARGS__)
+/** @brief The lastly started test is actually an assert
+ *  @hideinitializer 
+ * 
+ * - If provided a uniq parameter, this is assumed to be a condition that is expected to be true
+ * - If provided more parameters, the first one is a condition, and the other ones are printf-like arguments that are to be displayed when the condition fails.
+ */
 #define xbt_test_assert(...)    _XBT_IF_ONE_ARG(_xbt_test_assert_ARG1,  \
                                                 _xbt_test_assert_ARGN,  \
                                                 __VA_ARGS__)(__VA_ARGS__)
@@ -79,15 +153,15 @@ XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt,
   do { if (!(cond)) xbt_test_fail(__VA_ARGS__); } while (0)
 #define xbt_test_log(...)       _xbt_test_log(__FILE__, __LINE__, __VA_ARGS__)
 
+/** @brief Declare that the lastly started test failed because of the provided exception */
 XBT_PUBLIC(void) xbt_test_exception(xbt_ex_t e);
 
+/** @brief Declare that the lastly started test was expected to fail (and actually failed) */
 XBT_PUBLIC(void) xbt_test_expect_failure(void);
+/** @brief Declare that the lastly started test should be skiped today */
 XBT_PUBLIC(void) xbt_test_skip(void);
 
-/* test suite short-cut macros */
-#define XBT_TEST_UNIT(name,func,title)    \
-    void func(void);  /*prototype*/       \
-    void func(void)
+/** @} */
 
 #ifdef XBT_USE_DEPRECATED
 
index 909af2c..82573e0 100644 (file)
@@ -250,41 +250,34 @@ __ex_mctx_struct} __ex_mctx_t;
 
 /** @brief different kind of errors */
 typedef enum {
-  unknown_error = 0,/**< unknown error */
-  arg_error,        /**< Invalid argument */
-  bound_error,      /**< Out of bounds argument */
-  mismatch_error,   /**< The provided ID does not match */
-  not_found_error,  /**< The searched element was not found */
-
-  system_error,   /**< a syscall did fail */
-  network_error,  /**< error while sending/receiving data */
-  timeout_error,  /**< not quick enough, dude */
-  cancel_error,   /**< an action was canceled */
-  thread_error,    /**< error while [un]locking */
-  host_error,                            /**< host failed */
-  tracing_error,   /**< error during the simulation tracing */
-  io_error          /**< disk or file error */
+  unknown_error = 0,            /**< unknown error */
+  arg_error,                    /**< Invalid argument */
+  bound_error,                  /**< Out of bounds argument */
+  mismatch_error,               /**< The provided ID does not match */
+  not_found_error,              /**< The searched element was not found */
+  system_error,                 /**< a syscall did fail */
+  network_error,                /**< error while sending/receiving data */
+  timeout_error,                /**< not quick enough, dude */
+  cancel_error,                 /**< an action was canceled */
+  thread_error,                 /**< error while [un]locking */
+  host_error,                   /**< host failed */
+  tracing_error,                /**< error during the simulation tracing */
+  io_error                      /**< disk or file error */
 } xbt_errcat_t;
 
 XBT_PUBLIC(const char *) xbt_ex_catname(xbt_errcat_t cat);
 
 /** @brief Structure describing an exception */
 typedef struct {
-  char *msg;             /**< human readable message */
-  xbt_errcat_t category;
-                         /**< category like HTTP (what went wrong) */
-  int value;             /**< like errno (why did it went wrong) */
+  char *msg;                    /**< human readable message */
+  xbt_errcat_t category;        /**< category like HTTP (what went wrong) */
+  int value;                    /**< like errno (why did it went wrong) */
   /* throw point */
-  short int remote;
-                    /**< whether it was raised remotely */
-  char *host;     /**< NULL locally thrown exceptions; full hostname if remote ones */
-  /* FIXME: host should be hostname:port[#thread] */
-  char *procname;
-                  /**< Name of the process who thrown this */
-  int pid;        /**< PID of the process who thrown this */
-  char *file;     /**< Thrown point */
-  int line;       /**< Thrown point */
-  char *func;     /**< Thrown point */
+  char *procname;               /**< Name of the process who thrown this */
+  int pid;                      /**< PID of the process who thrown this */
+  char *file;                   /**< Thrown point */
+  int line;                     /**< Thrown point */
+  char *func;                   /**< Thrown point */
   /* Backtrace */
   int used;
   char **bt_strings;            /* only filed on display (or before the network propagation) */
@@ -302,9 +295,9 @@ typedef struct {
 } xbt_running_ctx_t;
 
 /* the static and dynamic initializers for a context structure */
-#define XBT_RUNNING_CTX_INITIALIZER \
-    { NULL, 0, { /* content */ NULL, unknown_error, 0, \
-                 /* throw point*/ 0,NULL, NULL,0, NULL, 0, NULL,\
+#define XBT_RUNNING_CTX_INITIALIZER                             \
+    { NULL, 0, { /* content */ NULL, unknown_error, 0,          \
+                 /* throw point*/ NULL, 0, NULL, 0, NULL,       \
                  /* backtrace */ 0, NULL, /* bt[] */ } }
 
 XBT_PUBLIC_DATA(const xbt_running_ctx_t) __xbt_ex_ctx_initializer;
@@ -426,8 +419,6 @@ XBT_PUBLIC( void )__xbt_ex_terminate_default(xbt_ex_t * e);
   _throw_ctx->exception.msg      = (m);                                 \
   _throw_ctx->exception.category = (xbt_errcat_t)(c);                   \
   _throw_ctx->exception.value    = (v);                                 \
-  _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.file     = (char*)__FILE__;                     \
index 64e0648..38a3512 100644 (file)
@@ -15,10 +15,48 @@ SG_BEGIN_DECL()
    *
    * @{
    */
+
 typedef struct xbt_node *xbt_node_t;
 typedef struct xbt_edge *xbt_edge_t;
 typedef struct xbt_graph *xbt_graph_t;
 
+/* Node structure */
+/* Be carfull of what you do with this structure */
+/* typedef struct xbt_node *xbt_node_t; */
+typedef struct xbt_node {
+  xbt_dynar_t out;
+  xbt_dynar_t in;               /* not used when the graph is directed */
+  double position_x;            /* positive value: negative means undefined */
+  double position_y;            /* positive value: negative means undefined */
+  void *data;                   /* user data */
+  void *xbtdata;                /* private xbt data: should be reinitialized at the
+                                   beginning of your algorithm if you need to use it */
+} s_xbt_node_t;
+
+/* edge structure */
+/* Be carfull of what you do with this structure */
+/* typedef struct xbt_edge *xbt_edge_t; */
+typedef struct xbt_edge {
+  xbt_node_t src;
+  xbt_node_t dst;
+  void *data;                   /* user data */
+  void *xbtdata;                /* private xbt data: should be reinitialized at the
+                                   beginning of your algorithm if you need to use it */
+  double length;                /* positive value: negative means undefined */
+} s_xbt_edge_t;
+
+/* Graph structure */
+/* Be carfull of what you do with this structure */  
+/* typedef struct xbt_graph *xbt_graph_t; */
+typedef struct xbt_graph {
+  xbt_dynar_t nodes;
+  xbt_dynar_t edges;
+  unsigned short int directed;
+  void *data;                   /* user data */
+  void *xbtdata;                /* private xbt data: should be reinitialized at the
+                                   beginning of your algorithm if you need to use it */
+} s_xbt_graph_t;
+
 /* API */
 XBT_PUBLIC(xbt_graph_t) xbt_graph_new_graph(unsigned short int directed,
                                             void *data);
index 556b0c0..824144c 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.69 2012/12/20 00:13:40 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:
@@ -60,10 +60,10 @@ typedef int AT_graphxml_node_name;
 #define AU_graphxml_node_name NULL
 typedef int AT_graphxml_edge_source;
 #define AU_graphxml_edge_source NULL
-typedef int AT_graphxml_node_position_y;
-#define AU_graphxml_node_position_y NULL
-typedef int AT_graphxml_node_position_x;
-#define AU_graphxml_node_position_x NULL
+typedef int AT_graphxml_node_position___y;
+#define AU_graphxml_node_position___y NULL
+typedef int AT_graphxml_node_position___x;
+#define AU_graphxml_node_position___x NULL
 typedef int AT_graphxml_edge_data;
 #define AU_graphxml_edge_data NULL
 typedef int AT_graphxml_edge_target;
@@ -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(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(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_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 9655093..cc4b78a 100644 (file)
@@ -53,7 +53,7 @@ XBT_PUBLIC(void *) xbt_mallocator_get(xbt_mallocator_t mallocator);
 XBT_PUBLIC(void) xbt_mallocator_release(xbt_mallocator_t mallocator,
                                         void *object);
 
-XBT_PUBLIC(void) xbt_mallocator_initialization_is_done(void);
+XBT_PUBLIC(void) xbt_mallocator_initialization_is_done(int protect);
 /** @} */
 
 SG_END_DECL()
index 74d63ea..777a664 100644 (file)
@@ -41,9 +41,12 @@ static const luaL_reg platf_functions[] = {
 int console_open(lua_State *L) {
   sg_platf_init();
   sg_platf_begin();
-  surf_parse_init_callbacks();
+
+  storage_register_callbacks();
   routing_register_callbacks();
 
+  gpu_register_callbacks();
+  
   return 0;
 }
 
@@ -104,7 +107,8 @@ int console_add_host(lua_State *L) {
   //get power_scale
   lua_pushstring(L, "power_scale");
   lua_gettable(L, -2);
-  host.power_scale = lua_tonumber(L, -1);
+  if(!lua_isnumber(L,-1)) host.power_scale = 1;// Default value  
+  else host.power_scale = lua_tonumber(L, -1);
   lua_pop(L, 1);
 
   //get power_trace
@@ -188,7 +192,7 @@ int  console_add_link(lua_State *L) {
   //get state_initial value
   lua_pushstring(L, "state_initial");
   lua_gettable(L, -2);
-  if (lua_tonumber(L, -1))
+  if (!lua_isnumber(L,-1) || lua_tonumber(L, -1))
     link.state = SURF_RESOURCE_ON;
   else
     link.state = SURF_RESOURCE_OFF;
@@ -241,18 +245,13 @@ int console_add_router(lua_State* L) {
 #include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
 
 int console_add_route(lua_State *L) {
-  static int AX_ptr = 0;
-  static int surfxml_bufferstack_size = 2048;
+  s_sg_platf_route_cbarg_t route;
+  memset(&route,0,sizeof(route));
 
   /* 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");
@@ -261,19 +260,19 @@ int console_add_route(lua_State *L) {
 
   lua_pushstring(L,"src");
   lua_gettable(L,-2);
-  src = lua_tostring(L, -1);
+  route.src = lua_tostring(L, -1);
   lua_pop(L,1);
 
   lua_pushstring(L,"dest");
   lua_gettable(L,-2);
-  dst = lua_tostring(L, -1);
+  route.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)));
+  route.link_list = xbt_str_split(lua_tostring(L, -1), ", \t\r\n");
+  if (xbt_dynar_is_empty(route.link_list))
+    xbt_dynar_push_as(route.link_list,char*,xbt_strdup(lua_tostring(L, -1)));
   lua_pop(L,1);
 
   lua_pushstring(L,"symmetrical");
@@ -281,28 +280,19 @@ int console_add_route(lua_State *L) {
   is_symmetrical = lua_tointeger(L, -1);
   lua_pop(L,1);
 
+  route.gw_src = NULL;
+  route.gw_dst = NULL;
+
   /* 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;
+    route.symmetrical = TRUE;
   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);
-  }
-  SURFXML_END_TAG(route);
-
-  xbt_dynar_free(&links);
-  free(surfxml_bufferstack);
+    route.symmetrical = FALSE;
 
+  sg_platf_new_route(&route);
+  
   return 0;
 }
 
@@ -374,7 +364,7 @@ int console_set_function(lua_State *L) {
   //get args
   lua_pushstring(L,"args");
   lua_gettable(L, -2);
-  args = xbt_str_split_quoted( lua_tostring(L,-1) );
+  args = xbt_str_split_str( lua_tostring(L,-1) , ",");
   lua_pop(L, 1);
 
   // FIXME: hackish to go under MSG that way
@@ -384,6 +374,7 @@ int console_set_function(lua_State *L) {
     return -1;
   }
 
+  // FIXME: use sg_platf_new_process directly (warning: find a way to check hostname)
   MSG_set_function(host_id, function_id, args);
 
   return 0;
index 05e9584..8c44001 100644 (file)
@@ -158,6 +158,13 @@ static int msg_register_application(lua_State * L)
   return 0;
 }
 
+static int console_init_application(lua_State *L) {
+  MSG_function_register_default(run_lua_code);
+  SIMIX_init_application();
+  return 0;
+}
+
+
 static const luaL_Reg simgrid_functions[] = {
   {"create_environment", create_environment},
   {"launch_application", launch_application},
@@ -172,6 +179,7 @@ static const luaL_Reg simgrid_functions[] = {
   {"msg_register_platform", msg_register_platform},
   {"sd_register_platform", sd_register_platform},
   {"msg_register_application", msg_register_application},
+  {"init_application", console_init_application},
   {NULL, NULL}
 };
 
@@ -194,7 +202,7 @@ int luaopen_simgrid(lua_State *L)
   XBT_DEBUG("luaopen_simgrid *****");
 
   /* Get the command line arguments from the lua interpreter */
-  char **argv = malloc(sizeof(char *) * LUA_MAX_ARGS_COUNT);
+  char **argv = xbt_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? */
 
diff --git a/src/include/instr/instr_interface.h b/src/include/instr/instr_interface.h
new file mode 100644 (file)
index 0000000..2ae6f3c
--- /dev/null
@@ -0,0 +1,8 @@
+int TRACE_start (void);
+int TRACE_end (void);
+void TRACE_global_init(int *argc, char **argv);
+void TRACE_help(int detailed);
+void TRACE_surf_resource_utilization_alloc(void);
+void TRACE_surf_resource_utilization_release(void);
+void TRACE_add_start_function(void (*func)(void));
+void TRACE_add_end_function(void (*func)(void));
index ed3a990..7b3cb1d 100644 (file)
 
 SG_BEGIN_DECL()
 
+/********************************** Configuration of MC **************************************/        
+extern int _sg_do_model_check;
+extern int _sg_mc_checkpoint;
+extern char* _sg_mc_property_file;
+extern int _sg_mc_timeout;
+extern int _sg_mc_max_depth;
+extern int _sg_mc_visited;
+
 extern char*_surf_mc_property_file; /* fixme: better location? */
 
 extern xbt_dynar_t mc_heap_comparison_ignore;
diff --git a/src/include/simgrid/sg_config.h b/src/include/simgrid/sg_config.h
new file mode 100644 (file)
index 0000000..fdda707
--- /dev/null
@@ -0,0 +1,14 @@
+#include "xbt/config.h"
+
+/*******************************************/
+/*** Config Globals **************************/
+/*******************************************/
+XBT_PUBLIC_DATA(xbt_cfg_t) _sg_cfg_set;
+XBT_PUBLIC(int) sg_cfg_get_int(const char* name);
+XBT_PUBLIC(double) sg_cfg_get_double(const char* name);
+XBT_PUBLIC(char*) sg_cfg_get_string(const char* name);
+XBT_PUBLIC(void) sg_cfg_get_peer(const char *name, char **peer, int *port);
+XBT_PUBLIC(xbt_dynar_t) sg_cfg_get_dynar(const char* name);
+
+void sg_config_init(int *argc, char **argv);
+void sg_config_finalize(void);
diff --git a/src/include/smpi/smpi_interface.h b/src/include/smpi/smpi_interface.h
new file mode 100644 (file)
index 0000000..1b24074
--- /dev/null
@@ -0,0 +1,12 @@
+#include "smpi/smpi.h"
+
+/********** Tracing **********/
+/* from smpi_instr.c */
+void TRACE_smpi_alloc(void);
+void TRACE_smpi_release(void);
+void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation);
+void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
+void TRACE_smpi_send(int rank, int src, int dst);
+void TRACE_smpi_recv(int rank, int src, int dst);
+void TRACE_smpi_init(int rank);
+void TRACE_smpi_finalize(int rank);
index f5de074..5bb8d19 100644 (file)
@@ -10,6 +10,7 @@
 #include "xbt/swag.h"
 #include "xbt/dynar.h"
 #include "xbt/dict.h"
+#include "xbt/graph.h"
 #include "xbt/misc.h"
 #include "xbt/file_stat.h"
 #include "portable.h"
 SG_BEGIN_DECL()
 /* Actions and models are highly connected structures... */
 
+/* user-visible parameters */
+extern double sg_tcp_gamma;
+extern double sg_sender_gap;
+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_crosstraffic;
+#ifdef HAVE_GTNETS
+extern double sg_gtnets_jitter;
+extern int sg_gtnets_jitter_seed;
+#endif
+extern xbt_dynar_t surf_path;
+
+
 typedef enum {
   SURF_NETWORK_ELEMENT_NULL = 0,        /* NULL */
   SURF_NETWORK_ELEMENT_HOST,    /* host type */
@@ -182,13 +198,6 @@ 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) (const 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);
   void (*add_traces) (void);
 } s_surf_model_extension_cpu_t;
 
@@ -208,16 +217,6 @@ typedef struct surf_network_model_extension_public {
   double (*get_link_latency) (const void *link);
   int (*link_shared) (const void *link);
   void (*add_traces) (void);
-  void* (*create_resource) (const 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);
 } s_surf_model_extension_network_t;
 
 /* Storage model */
@@ -236,7 +235,6 @@ typedef struct surf_storage_model_extension_public {
   surf_action_t(*stat) (void *storage, surf_file_t stream);
   surf_action_t(*unlink) (void *storage, surf_file_t stream);
   surf_action_t(*ls) (void *storage, const char *path);
-  void* (*create_resource) (const char* id, const char* model, const char* type_id, const char *content);
 } s_surf_model_extension_storage_t;
 
      /** \ingroup SURF_models
@@ -274,22 +272,6 @@ typedef struct surf_workstation_model_extension_public {
 
   int (*link_shared) (const void *link);
    xbt_dict_t(*get_properties) (const void *resource);
-  void* (*link_create_resource) (const 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);
-  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,
-                               tmgr_trace_t state_trace,
-                               xbt_dict_t cpu_properties);
   void (*add_traces) (void);
 
 } s_surf_model_extension_workstation_t;
@@ -672,12 +654,6 @@ XBT_PUBLIC_DATA(xbt_dynar_t) model_list;
 /*******************************************/
 /*** SURF Globals **************************/
 /*******************************************/
-XBT_PUBLIC_DATA(xbt_cfg_t) _surf_cfg_set;
-XBT_PUBLIC(int) surf_cfg_get_int(const char* name);
-XBT_PUBLIC(double) surf_cfg_get_double(const char* name);
-XBT_PUBLIC(char*) surf_cfg_get_string(const char* name);
-XBT_PUBLIC(void) surf_cfg_get_peer(const char *name, char **peer, int *port);
-XBT_PUBLIC(xbt_dynar_t) surf_cfg_get_dynar(const char* name);
 
 /** \ingroup SURF_simulation
  *  \brief Initialize SURF
@@ -757,5 +733,29 @@ void surf_set_nthreads(int nthreads);
 
 void surf_watched_hosts(void);
 
+/*
+ * Returns the initial path. On Windows the initial path is
+ * the current directory for the current process in the other
+ * case the function returns "./" that represents the current
+ * directory on Unix/Linux platforms.
+ */
+const char *__surf_get_initial_path(void);
+
+/********** Tracing **********/
+/* from surf_instr.c */
+void TRACE_surf_action(surf_action_t surf_action, const char *category);
+void TRACE_surf_alloc(void);
+void TRACE_surf_release(void);
+
+/* instr_routing.c */
+void instr_routing_define_callbacks (void);
+void instr_new_variable_type (const char *new_typename, const char *color);
+void instr_new_user_variable_type  (const char *father_type, const char *new_typename, const char *color);
+void instr_new_user_state_type (const char *father_type, const char *new_typename);
+void instr_new_value_for_user_state_type (const char *typename, const char *value, const char *color);
+int instr_platform_traced (void);
+xbt_graph_t instr_routing_platform_graph (void);
+void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename);
+
 SG_END_DECL()
 #endif                          /* _SURF_SURF_H */
index 268c643..3737cf7 100644 (file)
@@ -4,8 +4,9 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-
 #include "instr/instr_private.h"
+#include "simgrid/sg_config.h"
+#include "surf/surf.h"
 
 #ifdef HAVE_TRACING
 
@@ -50,22 +51,32 @@ static int trace_basic;
 static int trace_configured = 0;
 static int trace_active = 0;
 
+
+
 static void TRACE_getopts(void)
 {
-  trace_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING);
-  trace_platform = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_PLATFORM);
-  trace_platform_topology = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_TOPOLOGY);
-  trace_smpi_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI);
-  trace_smpi_grouped = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_GROUP);
-  trace_smpi_computing = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_SMPI_COMPUTING);
-  trace_categorized = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_CATEGORIZED);
-  trace_uncategorized = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_UNCATEGORIZED);
-  trace_msg_process_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_PROCESS);
-  trace_msg_vm_enabled = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_MSG_VM);
-  trace_buffer = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_BUFFER);
-  trace_onelink_only = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_ONELINK_ONLY);
-  trace_disable_destroy = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_DISABLE_DESTROY);
-  trace_basic = xbt_cfg_get_int(_surf_cfg_set, OPT_TRACING_BASIC);
+  trace_enabled = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING);
+  trace_platform = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_PLATFORM);
+  trace_platform_topology = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_TOPOLOGY);
+  trace_smpi_enabled = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_SMPI);
+  trace_smpi_grouped = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_SMPI_GROUP);
+  trace_smpi_computing = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_SMPI_COMPUTING);
+  trace_categorized = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_CATEGORIZED);
+  trace_uncategorized = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_UNCATEGORIZED);
+  trace_msg_process_enabled = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_MSG_PROCESS);
+  trace_msg_vm_enabled = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_MSG_VM);
+  trace_buffer = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_BUFFER);
+  trace_onelink_only = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_ONELINK_ONLY);
+  trace_disable_destroy = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_DISABLE_DESTROY);
+  trace_basic = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_BASIC);
+}
+
+xbt_dynar_t TRACE_start_functions = NULL;
+void TRACE_add_start_function(void (*func) ())
+{
+  if (TRACE_start_functions == NULL)
+    TRACE_start_functions = xbt_dynar_new(sizeof(void (*)()), NULL);
+  xbt_dynar_push(TRACE_start_functions, &func);
 }
 
 int TRACE_start()
@@ -75,67 +86,91 @@ int TRACE_start()
   // tracing system must be:
   //    - enabled (with --cfg=tracing:1)
   //    - already configured (TRACE_global_init already called)
-  if (!(TRACE_is_enabled() && TRACE_is_configured())){
-    return 0;
-  }
-
-  XBT_DEBUG("Tracing starts");
+  if (TRACE_is_enabled() && TRACE_is_configured()) {
+    XBT_DEBUG("Tracing starts");
 
-  /* open the trace file */
-  TRACE_paje_start();
+    /* open the trace file */
+    TRACE_paje_start();
 
-  /* activate trace */
-  if (trace_active == 1){
-    THROWF (tracing_error, 0, "Tracing is already active");
+    /* activate trace */
+    if (trace_active == 1) {
+      THROWF(tracing_error, 0, "Tracing is already active");
+    }
+    trace_active = 1;
+    XBT_DEBUG("Tracing is on");
+
+    /* other trace initialization */
+    created_categories = xbt_dict_new_homogeneous(xbt_free);
+    declared_marks = xbt_dict_new_homogeneous(xbt_free);
+    user_host_variables = xbt_dict_new_homogeneous(xbt_free);
+    user_vm_variables = xbt_dict_new_homogeneous (xbt_free);
+    user_link_variables = xbt_dict_new_homogeneous(xbt_free);
+
+    if (TRACE_start_functions != NULL) {
+      void (*func) ();
+      unsigned int iter = xbt_dynar_length(TRACE_start_functions);
+      xbt_dynar_foreach(TRACE_start_functions, iter, func) {
+        func();
+      }
+    }
   }
-  trace_active = 1;
-  XBT_DEBUG ("Tracing is on");
-
-  /* other trace initialization */
-  created_categories = xbt_dict_new_homogeneous(xbt_free);
-  declared_marks = xbt_dict_new_homogeneous (xbt_free);
-  user_host_variables = xbt_dict_new_homogeneous (xbt_free);
-  user_vm_variables = xbt_dict_new_homogeneous (xbt_free);
-  user_link_variables = xbt_dict_new_homogeneous (xbt_free);
-  TRACE_surf_alloc();
-  TRACE_smpi_alloc();
+  xbt_dynar_free(&TRACE_start_functions);
   return 0;
 }
 
+xbt_dynar_t TRACE_end_functions = NULL;
+void TRACE_add_end_function(void (*func) (void))
+{
+  if (TRACE_end_functions == NULL)
+    TRACE_end_functions = xbt_dynar_new(sizeof(void (*)(void)), NULL);
+  xbt_dynar_push(TRACE_end_functions, &func);
+}
+
 int TRACE_end()
 {
-  if (!trace_active)
-    return 1;
-
-  TRACE_generate_viva_uncat_conf();
-  TRACE_generate_viva_cat_conf();
-
-  /* dump trace buffer */
-  TRACE_last_timestamp_to_dump = surf_get_clock();
-  TRACE_paje_dump_buffer(1);
-
-  /* destroy all data structures of tracing (and free) */
-  PJ_container_free_all();
-  PJ_type_free_all();
-  PJ_container_release();
-  PJ_type_release();
-  TRACE_smpi_release();
-  TRACE_surf_release();
-  xbt_dict_free(&user_link_variables);
-  xbt_dict_free(&user_host_variables);
-  xbt_dict_free(&user_vm_variables);
-
-  xbt_dict_free(&declared_marks);
-  xbt_dict_free(&created_categories);
-
-  /* close the trace file */
-  TRACE_paje_end();
-
-  /* de-activate trace */
-  trace_active = 0;
-  XBT_DEBUG ("Tracing is off");
-  XBT_DEBUG("Tracing system is shutdown");
-  return 0;
+  int retval;
+  if (!trace_active) {
+    retval = 1;
+  } else {
+    retval = 0;
+
+    TRACE_generate_viva_uncat_conf();
+    TRACE_generate_viva_cat_conf();
+
+    /* dump trace buffer */
+    TRACE_last_timestamp_to_dump = surf_get_clock();
+    TRACE_paje_dump_buffer(1);
+
+    /* destroy all data structures of tracing (and free) */
+    PJ_container_free_all();
+    PJ_type_free_all();
+    PJ_container_release();
+    PJ_type_release();
+
+    if (TRACE_end_functions != NULL) {
+      void (*func) (void);
+      unsigned int iter;
+      xbt_dynar_foreach(TRACE_end_functions, iter, func) {
+        func();
+      }
+    }
+
+    xbt_dict_free(&user_link_variables);
+    xbt_dict_free(&user_host_variables);
+    xbt_dict_free(&user_vm_variables);
+    xbt_dict_free(&declared_marks);
+    xbt_dict_free(&created_categories);
+
+    /* close the trace file */
+    TRACE_paje_end();
+
+    /* de-activate trace */
+    trace_active = 0;
+    XBT_DEBUG("Tracing is off");
+    XBT_DEBUG("Tracing system is shutdown");
+  }
+  xbt_dynar_free(&TRACE_end_functions);
+  return retval;
 }
 
 int TRACE_needs_platform (void)
@@ -228,160 +263,160 @@ int TRACE_basic (void)
 
 char *TRACE_get_comment (void)
 {
-  return xbt_cfg_get_string(_surf_cfg_set, OPT_TRACING_COMMENT);
+  return xbt_cfg_get_string(_sg_cfg_set, OPT_TRACING_COMMENT);
 }
 
 char *TRACE_get_comment_file (void)
 {
-  return xbt_cfg_get_string(_surf_cfg_set, OPT_TRACING_COMMENT_FILE);
+  return xbt_cfg_get_string(_sg_cfg_set, OPT_TRACING_COMMENT_FILE);
 }
 
 char *TRACE_get_filename(void)
 {
-  return xbt_cfg_get_string(_surf_cfg_set, OPT_TRACING_FILENAME);
+  return xbt_cfg_get_string(_sg_cfg_set, OPT_TRACING_FILENAME);
 }
 
 char *TRACE_get_viva_uncat_conf (void)
 {
-  return xbt_cfg_get_string(_surf_cfg_set, OPT_VIVA_UNCAT_CONF);
+  return xbt_cfg_get_string(_sg_cfg_set, OPT_VIVA_UNCAT_CONF);
 }
 
 char *TRACE_get_viva_cat_conf (void)
 {
-  return xbt_cfg_get_string(_surf_cfg_set, OPT_VIVA_CAT_CONF);
+  return xbt_cfg_get_string(_sg_cfg_set, OPT_VIVA_CAT_CONF);
 }
 
 void TRACE_global_init(int *argc, char **argv)
 {
   /* name of the tracefile */
   char *default_tracing_filename = xbt_strdup("simgrid.trace");
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_FILENAME,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_FILENAME,
                    "Trace file created by the instrumented SimGrid.",
                    xbt_cfgelm_string, &default_tracing_filename, 1, 1,
                    NULL, NULL);
 
   /* tracing */
   int default_tracing = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING,
                    "Enable Tracing.",
                    xbt_cfgelm_int, &default_tracing, 0, 1,
                    NULL, NULL);
 
   /* register platform in the trace */
   int default_tracing_platform = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_PLATFORM,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_PLATFORM,
                    "Register the platform in the trace as a hierarchy.",
                    xbt_cfgelm_int, &default_tracing_platform, 0, 1,
                    NULL, NULL);
 
   /* register platform in the trace */
   int default_tracing_platform_topology = 1;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_TOPOLOGY,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_TOPOLOGY,
                    "Register the platform topology in the trace as a graph.",
                    xbt_cfgelm_int, &default_tracing_platform_topology, 0, 1,
                    NULL, NULL);
 
   /* smpi */
   int default_tracing_smpi = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_SMPI,
                    "Tracing of the SMPI interface.",
                    xbt_cfgelm_int, &default_tracing_smpi, 0, 1,
                    NULL, NULL);
 
   /* smpi grouped */
   int default_tracing_smpi_grouped = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI_GROUP,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_SMPI_GROUP,
                    "Group MPI processes by host.",
                    xbt_cfgelm_int, &default_tracing_smpi_grouped, 0, 1,
                    NULL, NULL);
 
   /* smpi computing */
   int default_tracing_smpi_computing = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_SMPI_COMPUTING,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_SMPI_COMPUTING,
                    "Generate states for timing out of SMPI parts of the application",
                    xbt_cfgelm_int, &default_tracing_smpi_computing, 0, 1,
                    NULL, NULL);
 
   /* tracing categorized resource utilization traces */
   int default_tracing_categorized = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_CATEGORIZED,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_CATEGORIZED,
                    "Tracing categorized resource utilization of hosts and links.",
                    xbt_cfgelm_int, &default_tracing_categorized, 0, 1,
                    NULL, NULL);
 
   /* tracing uncategorized resource utilization */
   int default_tracing_uncategorized = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_UNCATEGORIZED,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_UNCATEGORIZED,
                    "Tracing uncategorized resource utilization of hosts and links.",
                    xbt_cfgelm_int, &default_tracing_uncategorized, 0, 1,
                    NULL, NULL);
 
   /* msg process */
   int default_tracing_msg_process = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_PROCESS,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_MSG_PROCESS,
                    "Tracing of MSG process behavior.",
                    xbt_cfgelm_int, &default_tracing_msg_process, 0, 1,
                    NULL, NULL);
 
   /* msg process */
   int default_tracing_msg_vm = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_MSG_VM,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_MSG_VM,
                    "Tracing of MSG process behavior.",
                    xbt_cfgelm_int, &default_tracing_msg_vm, 0, 1,
                    NULL, NULL);
 
   /* tracing buffer */
   int default_buffer = 1;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_BUFFER,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_BUFFER,
                    "Buffer trace events to put them in temporal order.",
                    xbt_cfgelm_int, &default_buffer, 0, 1,
                    NULL, NULL);
 
   /* tracing one link only */
   int default_onelink_only = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_ONELINK_ONLY,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_ONELINK_ONLY,
                    "Use only routes with one link to trace platform.",
                    xbt_cfgelm_int, &default_onelink_only, 0, 1,
                    NULL, NULL);
 
   /* disable destroy */
   int default_disable_destroy = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_DISABLE_DESTROY,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_DISABLE_DESTROY,
                    "Disable platform containers destruction.",
                    xbt_cfgelm_int, &default_disable_destroy, 0, 1,
                    NULL, NULL);
 
   /* basic -- Avoid extended events (impoverished trace file) */
   int default_basic = 0;
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_BASIC,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_BASIC,
                    "Avoid extended events (impoverished trace file).",
                    xbt_cfgelm_int, &default_basic, 0, 1,
                    NULL, NULL);
 
   /* comment */
   char *default_tracing_comment = xbt_strdup ("");
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_COMMENT,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_COMMENT,
                    "Comment to be added on the top of the trace file.",
                    xbt_cfgelm_string, &default_tracing_comment, 1, 1,
                    NULL, NULL);
 
   /* comment_file */
   char *default_tracing_comment_file = xbt_strdup ("");
-  xbt_cfg_register(&_surf_cfg_set, OPT_TRACING_COMMENT_FILE,
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_COMMENT_FILE,
                    "The contents of the file are added to the top of the trace file as comment.",
                    xbt_cfgelm_string, &default_tracing_comment_file, 1, 1,
                    NULL, NULL);
 
   /* Viva graph configuration for uncategorized tracing */
   char *default_viva_uncat_conf_file = xbt_strdup ("");
-  xbt_cfg_register(&_surf_cfg_set, OPT_VIVA_UNCAT_CONF,
+  xbt_cfg_register(&_sg_cfg_set, OPT_VIVA_UNCAT_CONF,
                    "Viva Graph configuration file for uncategorized resource utilization traces.",
                    xbt_cfgelm_string, &default_viva_uncat_conf_file, 1, 1,
                    NULL, NULL);
 
   /* Viva graph configuration for uncategorized tracing */
   char *default_viva_cat_conf_file = xbt_strdup ("");
-  xbt_cfg_register(&_surf_cfg_set, OPT_VIVA_CAT_CONF,
+  xbt_cfg_register(&_sg_cfg_set, OPT_VIVA_CAT_CONF,
                    "Viva Graph configuration file for categorized resource utilization traces.",
                    xbt_cfgelm_string, &default_viva_cat_conf_file, 1, 1,
                    NULL, NULL);
index 18129e8..6846474 100644 (file)
@@ -5,6 +5,9 @@
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "instr/instr_private.h"
+#include "xbt/lib.h"
+#include "surf/surf.h"
+#include "surf/surf_routing.h"
 
 #ifdef HAVE_TRACING
 
index fc7a5d0..8db2fb8 100644 (file)
@@ -254,4 +254,3 @@ void TRACE_header(int basic)
 
 #endif
 
-
index 82488cb..ea02f0a 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef INSTR_PRIVATE_H_
 #define INSTR_PRIVATE_H_
 
+#include "instr/instr.h"
+#include "instr/instr_interface.h"
 #include "simgrid_config.h"
 
 #ifdef HAVE_TRACING
 
 #define INSTR_DEFAULT_STR_SIZE 500
 
-#include "instr/instr.h"
-#include "msg/msg.h"
-#include "simdag/private.h"
-#include "simix/smx_private.h"
-#include "xbt/graph_private.h"
+#include "xbt/graph.h"
+#include "xbt/dict.h"
+#include "simgrid/platf.h"
 
 typedef enum {
   PAJE_DefineContainerType,
@@ -128,75 +128,10 @@ void new_pajeStartLink (double timestamp, container_t container, type_t type, co
 void new_pajeEndLink (double timestamp, container_t container, type_t type, container_t destContainer, const char *value, const char *key);
 void new_pajeNewEvent (double timestamp, container_t container, type_t type, val_t value);
 
-/* declaration of instrumentation functions from msg_task_instr.c */
-void TRACE_msg_set_task_category(msg_task_t task, const char *category);
-void TRACE_msg_task_create(msg_task_t task);
-void TRACE_msg_task_execute_start(msg_task_t task);
-void TRACE_msg_task_execute_end(msg_task_t task);
-void TRACE_msg_task_destroy(msg_task_t task);
-void TRACE_msg_task_get_start(void);
-void TRACE_msg_task_get_end(double start_time, msg_task_t task);
-int TRACE_msg_task_put_start(msg_task_t task);    //returns TRUE if the task_put_end must be called
-void TRACE_msg_task_put_end(void);
-
-/* declaration of instrumentation functions from msg_process_instr.c */
-char *instr_process_id (msg_process_t proc, char *str, int len);
-char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len);
-void TRACE_msg_process_change_host(msg_process_t process, msg_host_t old_host,
-                                   msg_host_t new_host);
-void TRACE_msg_process_create (const char *process_name, int process_pid, msg_host_t host);
-void TRACE_msg_process_destroy (const char *process_name, int process_pid, msg_host_t host);
-void TRACE_msg_process_kill(msg_process_t process);
-void TRACE_msg_process_suspend(msg_process_t process);
-void TRACE_msg_process_resume(msg_process_t process);
-void TRACE_msg_process_sleep_in(msg_process_t process);   //called from msg/gos.c
-void TRACE_msg_process_sleep_out(msg_process_t process);
-void TRACE_msg_process_end(msg_process_t process);
-
-/* declaration of instrumentation functions from instr_msg_vm.c */
-char *instr_vm_id (msg_vm_t vm, char *str, int len);
-char *instr_vm_id_2 (const char *vm_name, char *str, int len);
-void TRACE_msg_vm_change_host(msg_vm_t vm, msg_host_t old_host,
-                                   msg_host_t new_host);
-void TRACE_msg_vm_create (const char *vm_name, msg_host_t host);
-void TRACE_msg_vm_kill(msg_vm_t process);
-void TRACE_msg_vm_suspend(msg_vm_t vm);
-void TRACE_msg_vm_resume(msg_vm_t vm);
-void TRACE_msg_vm_sleep_in(msg_vm_t vm); 
-void TRACE_msg_vm_sleep_out(msg_vm_t vm);
-void TRACE_msg_vm_end(msg_vm_t vm);
-
-/* from surf_instr.c */
-void TRACE_surf_alloc(void);
-void TRACE_surf_release(void);
-void TRACE_surf_host_set_power(double date, const char *resource, double power);
-void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
-void TRACE_surf_link_set_latency(double date, const char *resource, double latency);
-void TRACE_surf_action(surf_action_t surf_action, const char *category);
-
 //for tracing gtnets
 void TRACE_surf_gtnets_communicate(void *action, void *src, void *dst);
 
-/* from smpi_instr.c */
-void TRACE_internal_smpi_set_category (const char *category);
-const char *TRACE_internal_smpi_get_category (void);
-void TRACE_smpi_alloc(void);
-void TRACE_smpi_release(void);
-void TRACE_smpi_init(int rank);
-void TRACE_smpi_finalize(int rank);
-void TRACE_smpi_collective_in(int rank, int root, const char *operation);
-void TRACE_smpi_collective_out(int rank, int root, const char *operation);
-void TRACE_smpi_computing_init(int rank);
-void TRACE_smpi_computing_out(int rank);
-void TRACE_smpi_computing_in(int rank);
-void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation);
-void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
-void TRACE_smpi_send(int rank, int src, int dst);
-void TRACE_smpi_recv(int rank, int src, int dst);
-
 /* from instr_config.c */
-int TRACE_start (void);
-int TRACE_end (void);
 int TRACE_needs_platform (void);
 int TRACE_is_enabled(void);
 int TRACE_platform(void);
@@ -218,8 +153,6 @@ char *TRACE_get_comment_file (void);
 char *TRACE_get_filename(void);
 char *TRACE_get_viva_uncat_conf (void);
 char *TRACE_get_viva_cat_conf (void);
-void TRACE_global_init(int *argc, char **argv);
-void TRACE_help(int detailed);
 void TRACE_generate_viva_uncat_conf (void);
 void TRACE_generate_viva_cat_conf (void);
 void instr_pause_tracing (void);
@@ -237,7 +170,6 @@ void TRACE_surf_link_set_utilization(const char *resource,
                                      double now,
                                      double delta);
 void TRACE_surf_resource_utilization_alloc(void);
-void TRACE_surf_resource_utilization_release(void);
 
 /* instr_paje.c */
 extern xbt_dict_t trivaNodeTypes;
@@ -274,16 +206,6 @@ val_t PJ_value_get_or_new (const char *name, const char *color, type_t father);
 val_t PJ_value_get (const char *name, const type_t father);
 void PJ_value_free (val_t value);
 
-/* instr_routing.c */
-void instr_routing_define_callbacks (void);
-void instr_new_variable_type (const char *new_typename, const char *color);
-void instr_new_user_variable_type  (const char *father_type, const char *new_typename, const char *color);
-void instr_new_user_state_type (const char *father_type, const char *new_typename);
-void instr_new_value_for_user_state_type (const char *typename, const char *value, const char *color);
-int instr_platform_traced (void);
-xbt_graph_t instr_routing_platform_graph (void);
-void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename);
-
 #endif /* HAVE_TRACING */
 
 #ifdef HAVE_JEDULE
index e5175e9..2edc234 100644 (file)
@@ -53,7 +53,7 @@ void jed_event_add_info(jed_event_t event, char *key, char *value) {
 void create_jed_event(jed_event_t *event, char *name, double start_time,
     double end_time, const char *type) {
 
-  *event = (jed_event_t) calloc(1, sizeof(s_jed_event_t));
+  *event = xbt_new0(s_jed_event_t,1);
   (*event)->name = xbt_strdup(name);
 
   (*event)->start_time = start_time;
index bd4ee3c..b31fc7a 100644 (file)
@@ -63,7 +63,7 @@ static void jed_free_container(jed_simgrid_container_t container) {
 void jed_simgrid_create_container(jed_simgrid_container_t *container, char *name) {
   xbt_assert( name != NULL );
 
-  *container = (jed_simgrid_container_t)calloc(1,sizeof(s_jed_simgrid_container_t));
+  *container = xbt_new0(s_jed_simgrid_container_t,1);
   (*container)->name = xbt_strdup(name);
   (*container)->is_lowest = 0;
   (*container)->container_children = xbt_dynar_new(sizeof(jed_simgrid_container_t), NULL);
@@ -117,7 +117,7 @@ static void add_subset_to(xbt_dynar_t subset_list, int start, int end,
 
   // printf(">>> start=%d end=%d\n", start, end);
 
-  subset = (jed_res_subset_t)calloc(1,sizeof(s_jed_res_subset_t));
+  subset = xbt_new0(s_jed_res_subset_t,1);
   subset->start_idx = start;
   subset->nres      = end-start+1;
   subset->parent    = parent;
@@ -157,7 +157,7 @@ static void add_subsets_to(xbt_dynar_t subset_list, xbt_dynar_t hostgroup,
   }
 
   nb_ids = xbt_dynar_length(id_list);
-  id_ar = (int*)calloc(nb_ids, sizeof(int));
+  id_ar = xbt_new0(int,nb_ids);
   xbt_dynar_foreach(id_list, iter, id_str) {
     id_ar[iter] = atoi(id_str);
   }
@@ -261,7 +261,7 @@ 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));
+  *jedule = xbt_new0(s_jedule_t,1);
   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);
index 5c094fb..70cdb6e 100644 (file)
@@ -16,7 +16,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
 
 void *start_text_libsimgrid;
 void *start_plt_libsimgrid, *end_plt_libsimgrid;
+void *start_got_plt_libsimgrid, *end_got_plt_libsimgrid;
 void *start_plt_binary, *end_plt_binary;
+void *start_got_plt_binary, *end_got_plt_binary;
 char *libsimgrid_path;
 void *start_data_libsimgrid, *start_bss_libsimgrid;
 void *start_data_binary, *start_bss_binary;
@@ -30,7 +32,7 @@ static void MC_region_destroy(mc_mem_region_t reg);
 static void MC_snapshot_add_region(mc_snapshot_t snapshot, int type, void *start_addr, size_t size);
 
 static void add_value(xbt_dynar_t *list, const char *type, unsigned long int val);
-static xbt_dynar_t take_snapshot_stacks(void *heap);
+static xbt_dynar_t take_snapshot_stacks(mc_snapshot_t *s, void *heap);
 static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap);
 static void print_local_variables_values(xbt_dynar_t all_variables);
 static void *get_stack_pointer(void *stack_context, void *heap);
@@ -46,7 +48,7 @@ static mc_mem_region_t MC_region_new(int type, void *start_addr, size_t size)
   new_reg->data = xbt_malloc0(size);
   memcpy(new_reg->data, start_addr, size);
 
-  XBT_DEBUG("New region : type : %d, data : %p, size : %zu", type, new_reg->data, size);
+  XBT_DEBUG("New region : type : %d, data : %p (real addr %p), size : %zu", type, new_reg->data, start_addr, size);
   
   return new_reg;
 }
@@ -72,47 +74,11 @@ static void MC_snapshot_add_region(mc_snapshot_t snapshot, int type, void *start
   mc_mem_region_t new_reg = MC_region_new(type, start_addr, size);
   snapshot->regions = xbt_realloc(snapshot->regions, (snapshot->num_reg + 1) * sizeof(mc_mem_region_t));
   snapshot->regions[snapshot->num_reg] = new_reg;
+  snapshot->region_type[snapshot->num_reg] = type;
   snapshot->num_reg++;
   return;
 } 
 
-/* void MC_take_snapshot(mc_snapshot_t snapshot) */
-/* { */
-/*   unsigned int i = 0; */
-/*   s_map_region_t reg; */
-/*   memory_map_t maps = get_memory_map(); */
-
-/*   /\* Save the std heap and the writable mapped pages of libsimgrid *\/ */
-/*   while (i < maps->mapsize) { */
-/*     reg = maps->regions[i]; */
-/*     if ((reg.prot & PROT_WRITE)){ */
-/*       if (maps->regions[i].pathname == NULL){ */
-/*         if (reg.start_addr == std_heap){ // only save the std heap (and not the raw one) */
-/*           MC_snapshot_add_region(snapshot, 0, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); */
-/*         } */
-/*         i++; */
-/*       } else { */
-/*         if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){ */
-/*           MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); */
-/*           i++; */
-/*           reg = maps->regions[i]; */
-/*           while(reg.pathname == NULL && (reg.prot & PROT_WRITE) && i < maps->mapsize){ */
-/*             MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); */
-/*             i++; */
-/*             reg = maps->regions[i]; */
-/*           } */
-/*         }else{ */
-/*           i++; */
-/*         }  */
-/*       } */
-/*     }else{ */
-/*       i++; */
-/*     } */
-/*   } */
-
-/*   free_memory_map(maps); */
-/* } */
-
 void MC_init_memory_map_info(){
 
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
@@ -126,11 +92,7 @@ void MC_init_memory_map_info(){
   while (i < maps->mapsize) {
     reg = maps->regions[i];
     if ((reg.prot & PROT_WRITE)){
-      if (maps->regions[i].pathname == NULL){
-        if(reg.start_addr == raw_heap){
-          end_raw_heap = reg.end_addr;
-        }
-      } else {
+      if (maps->regions[i].pathname != NULL){
         if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){
           start_data_libsimgrid = reg.start_addr;
           i++;
@@ -145,17 +107,18 @@ void MC_init_memory_map_info(){
             start_bss_binary = reg.start_addr;
             i++;
           }
+        }else if(!memcmp(maps->regions[i].pathname, "[heap]", 6)){
+          end_raw_heap = reg.end_addr;
+          i++;
         }
       }
-    }else if ((reg.prot & PROT_READ)){
+    }else if ((reg.prot & PROT_READ) && (reg.prot & PROT_EXEC)){
       if (maps->regions[i].pathname != NULL){
         if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){
           start_text_libsimgrid = reg.start_addr;
           libsimgrid_path = strdup(maps->regions[i].pathname);
-        }else{
-          if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
-            start_text_binary = reg.start_addr;
-          }
+        }else if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
+          start_text_binary = reg.start_addr;
         }
       }
     }
@@ -171,20 +134,26 @@ void MC_init_memory_map_info(){
 
 }
 
+mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall){
+  return MC_take_snapshot();
+}
+
 mc_snapshot_t MC_take_snapshot()
 {
-
   int raw_mem = (mmalloc_get_current_heap() == raw_heap);
   
   MC_SET_RAW_MEM;
 
   mc_snapshot_t snapshot = xbt_new0(s_mc_snapshot_t, 1);
+  snapshot->nb_processes = xbt_swag_size(simix_global->process_list);
 
   unsigned int i = 0;
   s_map_region_t reg;
   memory_map_t maps = get_memory_map();
   int nb_reg = 0;
   void *heap = NULL;
+  size_t size = 0;
+  void *start = NULL;
 
   /* Save the std heap and the writable mapped pages of libsimgrid */
   while (i < maps->mapsize) {
@@ -193,60 +162,50 @@ mc_snapshot_t MC_take_snapshot()
       if (maps->regions[i].pathname == NULL){
         if (reg.start_addr == std_heap){ // only save the std heap (and not the raw one)
           MC_snapshot_add_region(snapshot, 0, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
+          snapshot->heap_chunks_used = mmalloc_get_chunks_used(std_heap);
           heap = snapshot->regions[nb_reg]->data;
           nb_reg++;
-        }else if(reg.start_addr == raw_heap){
-          end_raw_heap = reg.end_addr;
         }
         i++;
-      } else {
+      } else
         if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){
-          MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
-          start_data_libsimgrid = reg.start_addr;
+          size = (char*)reg.end_addr - (char*)reg.start_addr;
+          start = reg.start_addr;
           nb_reg++;
           i++;
           reg = maps->regions[i];
           if(reg.pathname == NULL && (reg.prot & PROT_WRITE) && i < maps->mapsize){
-            MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
+            size += (char*)reg.end_addr - (char*)reg.start_addr;
             reg = maps->regions[i];
             i++;
-            nb_reg++;
           }
-        } else {
-          if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
-            MC_snapshot_add_region(snapshot, 2, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
-            nb_reg++;
-            i++;
+          MC_snapshot_add_region(snapshot, 1, start, size);
+        }else if(!memcmp(maps->regions[i].pathname, "[heap]", 6)){
+          end_raw_heap = reg.end_addr;
+          i++;
+        } else if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
+          size = (char*)reg.end_addr - (char*)reg.start_addr;
+          start = reg.start_addr;
+          nb_reg++;
+          i++;
+          reg = maps->regions[i];
+          if(reg.pathname == NULL && (reg.prot & PROT_WRITE) && reg.start_addr != std_heap && reg.start_addr != raw_heap && i < maps->mapsize){
+            size += (char*)reg.end_addr - (char*)reg.start_addr;
             reg = maps->regions[i];
-            if(reg.pathname == NULL && (reg.prot & PROT_WRITE) && reg.start_addr != std_heap && reg.start_addr != raw_heap && i < maps->mapsize){
-              MC_snapshot_add_region(snapshot, 2, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
-              reg = maps->regions[i];
-              nb_reg++;
-            }
-          }else{
             i++;
           }
-        }
-      }
-    }else if ((reg.prot & PROT_READ)){
-      if (maps->regions[i].pathname != NULL){
-        if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){
-          start_text_libsimgrid = reg.start_addr;
-          libsimgrid_path = strdup(maps->regions[i].pathname);
+          MC_snapshot_add_region(snapshot, 2, start, size);
         }else{
-          if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
-            start_text_binary = reg.start_addr;
-          }
+          i++;
         }
       }
-      i++;
     }else{
       i++;
     }
   }
 
-  if(_surf_mc_visited > 0 || strcmp(_surf_mc_property_file,""))
-    snapshot->stacks = take_snapshot_stacks(heap);
+  if(_sg_mc_visited > 0 || strcmp(_sg_mc_property_file,""))
+    snapshot->stacks = take_snapshot_stacks(&snapshot, heap);
   
   free_memory_map(maps);
 
@@ -274,6 +233,7 @@ void MC_free_snapshot(mc_snapshot_t snapshot)
   for(i=0; i < snapshot->num_reg; i++)
     MC_region_destroy(snapshot->regions[i]);
 
+  xbt_free(snapshot->regions);
   xbt_dynar_free(&(snapshot->stacks));
   xbt_free(snapshot);
 }
@@ -287,12 +247,9 @@ void get_libsimgrid_plt_section(){
   size_t n = 0;                 /* Amount of bytes to read by getline */
 
   char *lfields[7];
-  int i, plt_not_found = 1;
+  int i, plt_found = 0;
   unsigned long int size, offset;
 
-  if(libsimgrid_path == NULL)
-    libsimgrid_path = get_libsimgrid_path();
-
   char *command = bprintf("objdump --section-headers %s", libsimgrid_path);
 
   fp = popen(command, "r");
@@ -302,7 +259,7 @@ void get_libsimgrid_plt_section(){
     xbt_abort();
   }
 
-  while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {
+  while ((read = getline(&line, &n, fp)) != -1 && plt_found != 2) {
 
     if(n == 0)
       continue;
@@ -328,14 +285,21 @@ void get_libsimgrid_plt_section(){
         offset = strtoul(lfields[5], NULL, 16);
         start_plt_libsimgrid = (char *)start_text_libsimgrid + offset;
         end_plt_libsimgrid = (char *)start_plt_libsimgrid + size;
-        plt_not_found = 0;
-      }
+        plt_found++;
+      }else if(strcmp(lfields[1], ".got.plt") == 0){
+        size = strtoul(lfields[2], NULL, 16);
+        offset = strtoul(lfields[5], NULL, 16);
+        start_got_plt_libsimgrid = (char *)start_text_libsimgrid + offset;
+        end_got_plt_libsimgrid = (char *)start_got_plt_libsimgrid + size;
+        plt_found++;
+       }
+
     }
     
   }
 
-  free(command);
-  free(line);
+  xbt_free(command);
+  xbt_free(line);
   pclose(fp);
 
 }
@@ -348,8 +312,8 @@ void get_binary_plt_section(){
   size_t n = 0;                 /* Amount of bytes to read by getline */
 
   char *lfields[7];
-  int i, plt_not_found = 1;
-  unsigned long int size, offset;
+  int i, plt_found = 0;
+  unsigned long int size;
 
   char *command = bprintf( "objdump --section-headers %s", xbt_binary_name);
 
@@ -360,7 +324,7 @@ void get_binary_plt_section(){
     xbt_abort();
   }
 
-  while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {
+  while ((read = getline(&line, &n, fp)) != -1 && plt_found != 2) {
 
     if(n == 0)
       continue;
@@ -383,18 +347,22 @@ void get_binary_plt_section(){
     if(i>=6){
       if(strcmp(lfields[1], ".plt") == 0){
         size = strtoul(lfields[2], NULL, 16);
-        offset = strtoul(lfields[5], NULL, 16);
-        start_plt_binary = (char *)start_text_binary + offset;
+        start_plt_binary = (void *)strtoul(lfields[3], NULL, 16);
         end_plt_binary = (char *)start_plt_binary + size;
-        plt_not_found = 0;
-      }
+        plt_found++;
+      }else if(strcmp(lfields[1], ".got.plt") == 0){
+        size = strtoul(lfields[2], NULL, 16);
+        start_got_plt_binary = (char *)strtoul(lfields[3], NULL, 16);
+        end_got_plt_binary = (char *)start_got_plt_binary + size;
+        plt_found++;
+       }
     }
     
     
   }
 
-  free(command);
-  free(line);
+  xbt_free(command);
+  xbt_free(line);
   pclose(fp);
 
 }
@@ -410,18 +378,20 @@ static void add_value(xbt_dynar_t *list, const char *type, unsigned long int val
   xbt_dynar_push(*list, &value);
 }
 
-static xbt_dynar_t take_snapshot_stacks(void *heap){
+static xbt_dynar_t take_snapshot_stacks(mc_snapshot_t *snapshot, void *heap){
 
-  xbt_dynar_t res = xbt_dynar_new(sizeof(s_mc_snapshot_stack_t), NULL);
+  xbt_dynar_t res = xbt_dynar_new(sizeof(s_mc_snapshot_stack_t), snapshot_stack_free_voidp);
 
-  unsigned int cursor1 = 0;
+  unsigned int cursor = 0;
   stack_region_t current_stack;
   
-  xbt_dynar_foreach(stacks_areas, cursor1, current_stack){
+  xbt_dynar_foreach(stacks_areas, cursor, current_stack){
     mc_snapshot_stack_t st = xbt_new(s_mc_snapshot_stack_t, 1);
     st->local_variables = get_local_variables_values(current_stack->context, heap);
     st->stack_pointer = get_stack_pointer(current_stack->context, heap);
     xbt_dynar_push(res, &st);
+    (*snapshot)->stack_sizes = xbt_realloc((*snapshot)->stack_sizes, (cursor + 1) * sizeof(size_t));
+    (*snapshot)->stack_sizes[cursor] = current_stack->size - ((char *)st->stack_pointer - (char *)((char *)heap + ((char *)current_stack->address - (char *)std_heap)));
   }
 
   return res;
@@ -450,7 +420,6 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
   
   unw_cursor_t c;
   int ret;
-  //char *stack_name;
 
   char frame_name[256];
   
@@ -460,12 +429,10 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
     xbt_abort();
   }
 
-  //stack_name = strdup(((smx_process_t)((smx_ctx_sysv_t)(stack->address))->super.data)->name);
-
   unw_word_t ip, sp, off;
   dw_frame_t frame;
  
-  xbt_dynar_t compose = xbt_dynar_new(sizeof(variable_value_t), NULL);
+  xbt_dynar_t compose = xbt_dynar_new(sizeof(variable_value_t), variable_value_free_voidp);
 
   xbt_strbuff_t variables = xbt_strbuff_new();
   xbt_dict_cursor_t dict_cursor;
@@ -478,23 +445,27 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
   int frame_found = 0;
   void *frame_pointer_address = NULL;
   long true_ip;
+  char *to_append;
 
   while(ret >= 0){
 
     unw_get_reg(&c, UNW_REG_IP, &ip);
     unw_get_reg(&c, UNW_REG_SP, &sp);
 
-    unw_get_proc_name (&c, frame_name, sizeof (frame_name), &off);
-
-    xbt_strbuff_append(variables, bprintf("ip=%s\n", frame_name));
+    unw_get_proc_name(&c, frame_name, sizeof (frame_name), &off);
 
     frame = xbt_dict_get_or_null(mc_local_variables, frame_name);
 
     if(frame == NULL){
-      ret = unw_step(&c);
-      continue;
+      xbt_dynar_free(&compose);
+      xbt_dict_cursor_free(&dict_cursor);
+      return variables;
     }
 
+    to_append = bprintf("ip=%s\n", frame_name);
+    xbt_strbuff_append(variables, to_append);
+    xbt_free(to_append);
+
     true_ip = (long)frame->low_pc + (long)off;
 
     /* Get frame pointer */
@@ -546,8 +517,6 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
     frame_found = 0;
     cursor = 0;
 
-    //XBT_INFO("Frame %s", frame->name);
-
     xbt_dict_foreach(frame->variables, dict_cursor, variable_name, current_variable){
       if(current_variable->location != NULL){
         switch(current_variable->location->type){
@@ -577,43 +546,47 @@ static xbt_strbuff_t get_local_variables_values(void *stack_context, void *heap)
           }
           
           if(xbt_dynar_length(compose) > 0){
-            //XBT_INFO("Variable : %s", current_variable->name);
             if(strcmp(xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->type, "value") == 0){
-              //XBT_INFO("Variable : %s - value : %lx", current_variable->name, xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.res);
-              xbt_strbuff_append(variables, bprintf("%s=%lx\n", current_variable->name, xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.res));
+              to_append = bprintf("%s=%lx\n", current_variable->name, xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.res);
+              xbt_strbuff_append(variables, to_append);
+              xbt_free(to_append);
             }else{
               if((long)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address < 0 || *((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) == NULL){
-                //XBT_INFO("Variable : %s - address : NULL", current_variable->name);
-                xbt_strbuff_append(variables, bprintf("%s=NULL\n", current_variable->name));
+                to_append = bprintf("%s=NULL\n", current_variable->name);
+                xbt_strbuff_append(variables, to_append);
+                xbt_free(to_append);
               }else if(((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) > 0xffffffff) || ((long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1,variable_value_t)->value.address) < (long)start_text_binary)){
-                //XBT_INFO("Variable : %s - value : %zd", current_variable->name, (size_t)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));
-                xbt_strbuff_append(variables, bprintf("%s=%d\n", current_variable->name, (int)(long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address)));
-              }else{
-                //XBT_INFO("Variable : %s - address : %p", current_variable->name, *((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));  
-                xbt_strbuff_append(variables, bprintf("%s=%p\n", current_variable->name, *((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address)));
+                to_append = bprintf("%s=%d\n", current_variable->name, (int)(long)*((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));
+                xbt_strbuff_append(variables, to_append);
+                xbt_free(to_append);
+              }else{ 
+                to_append = bprintf("%s=%p\n", current_variable->name, *((void**)xbt_dynar_get_as(compose, xbt_dynar_length(compose) - 1, variable_value_t)->value.address));
+                xbt_strbuff_append(variables, to_append);
+                xbt_free(to_append);
               }
             }
           }else{
-            //XBT_INFO("Variable %s undefined", current_variable->name);
-            xbt_strbuff_append(variables, bprintf("%s=undefined\n", current_variable->name));
+            to_append = bprintf("%s=undefined\n", current_variable->name);
+            xbt_strbuff_append(variables, to_append);
+            xbt_free(to_append);
           }
           break;
         default :
           break;
         }
       }else{
-        //XBT_INFO("Variable : %s, no location", current_variable->name);
-        xbt_strbuff_append(variables, bprintf("%s=undefined\n", current_variable->name));
+        to_append = bprintf("%s=undefined\n", current_variable->name);
+        xbt_strbuff_append(variables, to_append);
+        xbt_free(to_append);
       }
     }    
  
     ret = unw_step(&c);
-
-    //XBT_INFO(" ");
      
   }
 
-  //free(stack_name);
+  xbt_dynar_free(&compose);
+  xbt_dict_cursor_free(&dict_cursor);
 
   return variables;
 
@@ -647,3 +620,15 @@ void *MC_snapshot(void){
   return simcall_mc_snapshot();
   
 }
+
+void variable_value_free(variable_value_t v){
+  if(v){
+    xbt_free(v->type);
+    xbt_free(v);
+  }
+}
+
+void variable_value_free_voidp(void* v){
+  variable_value_free((variable_value_t) * (void **)v);
+}
+
index 15040a9..abb7b81 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, mc,
                                 "Logging specific to mc_compare");
 
-static int data_bss_program_region_compare(void *d1, void *d2, size_t size);
-static int data_bss_libsimgrid_region_compare(void *d1, void *d2, size_t size);
 static int heap_region_compare(void *d1, void *d2, size_t size);
 
 static int compare_stack(stack_region_t s1, stack_region_t s2, void *sp1, void *sp2, void *heap1, void *heap2, xbt_dynar_t equals);
 static int is_heap_equality(xbt_dynar_t equals, void *a1, void *a2);
 static size_t heap_ignore_size(void *address);
-static size_t data_bss_ignore_size(void *address);
 
 static void stack_region_free(stack_region_t s);
 static void heap_equality_free(heap_equality_t e);
@@ -45,95 +42,66 @@ static size_t heap_ignore_size(void *address){
   return 0;
 }
 
-static size_t data_bss_ignore_size(void *address){
-  unsigned int cursor = 0;
-  int start = 0;
-  int end = xbt_dynar_length(mc_data_bss_comparison_ignore) - 1;
-  mc_data_bss_ignore_variable_t var;
-
-  while(start <= end){
-    cursor = (start + end) / 2;
-    var = (mc_data_bss_ignore_variable_t)xbt_dynar_get_as(mc_data_bss_comparison_ignore, cursor, mc_data_bss_ignore_variable_t);
-    if(var->address == address)
-      return var->size;
-    if(var->address < address){
-      if((void *)((char *)var->address + var->size) > address)
-        return (char *)var->address + var->size - (char*)address;
-      else
-        start = cursor + 1;
-    }
-    if(var->address > address)
-      end = cursor - 1;   
-  }
-
-  return 0;
-}
-
-static int data_bss_program_region_compare(void *d1, void *d2, size_t size){
-
-  size_t i = 0, ignore_size = 0;
-  int pointer_align;
-  void *addr_pointed1 = NULL, *addr_pointed2 = NULL;
-  
-  for(i=0; i<size; i++){
-    if(memcmp(((char *)d1) + i, ((char *)d2) + i, 1) != 0){
-      if((ignore_size = data_bss_ignore_size((char *)start_data_binary+i)) > 0){
-        i = i + ignore_size;
-        continue;
-      }else if((ignore_size = data_bss_ignore_size((char *)start_bss_binary+i)) > 0){
-        i = i + ignore_size;
-        continue;
-      }
-      pointer_align = (i / sizeof(void*)) * sizeof(void*);
-      addr_pointed1 = *((void **)((char *)d1 + pointer_align));
-      addr_pointed2 = *((void **)((char *)d2 + pointer_align));
-      if((addr_pointed1 > start_plt_binary && addr_pointed1 < end_plt_binary) || (addr_pointed2 > start_plt_binary && addr_pointed2 < end_plt_binary)){
-        continue;
-      }else{
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
-          XBT_VERB("Different byte (offset=%zu) (%p - %p) in data program region", i, (char *)d1 + i, (char *)d2 + i);
-          XBT_VERB("Addresses pointed : %p - %p", addr_pointed1, addr_pointed2);
-        }
-        return 1;
-      }
-    }
-  }
-  
-  return 0;
-}
-
-static int data_bss_libsimgrid_region_compare(void *d1, void *d2, size_t size){
+static int compare_global_variables(int region_type, void *d1, void *d2){
 
-  size_t i = 0, ignore_size = 0;
-  int pointer_align;
+  unsigned int cursor = 0;
+  size_t offset; 
+  int i = 0;
+  global_variable_t current_var; 
+  int pointer_align; 
   void *addr_pointed1 = NULL, *addr_pointed2 = NULL;
 
-  for(i=0; i<size; i++){
-    if(memcmp(((char *)d1) + i, ((char *)d2) + i, 1) != 0){
-      if((ignore_size = data_bss_ignore_size((char *)start_data_libsimgrid+i)) > 0){
-        i = i + ignore_size;
-        continue;
-      }else if((ignore_size = data_bss_ignore_size((char *)start_bss_libsimgrid+i)) > 0){
-        i = i + ignore_size;
+  if(region_type == 1){ /* libsimgrid */
+    xbt_dynar_foreach(mc_global_variables, cursor, current_var){
+      if(current_var->address < start_data_libsimgrid)
         continue;
+      offset = (char *)current_var->address - (char *)start_data_libsimgrid;
+      i = 0;
+      while(i < current_var->size){
+        if(memcmp((char*)d1 + offset + i, (char*)d2 + offset + i, 1) != 0){
+          pointer_align = (i / sizeof(void*)) * sizeof(void*); 
+          addr_pointed1 = *((void **)((char *)d1 + offset + pointer_align));
+          addr_pointed2 = *((void **)((char *)d2 + offset + pointer_align));
+          if((addr_pointed1 > start_plt_libsimgrid && addr_pointed1 < end_plt_libsimgrid) || (addr_pointed2 > start_plt_libsimgrid && addr_pointed2 < end_plt_libsimgrid)){
+            i = current_var->size;
+            continue;
+          }else{
+            if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
+              XBT_VERB("Different global variable in libsimgrid : %s at addresses %p - %p (size = %zu)", current_var->name, (char *)d1+offset, (char *)d2+offset, current_var->size);
+            }
+            return 1;
+          }
+        } 
+        i++;
       }
-      pointer_align = (i / sizeof(void*)) * sizeof(void*);
-      addr_pointed1 = *((void **)((char *)d1 + pointer_align));
-      addr_pointed2 = *((void **)((char *)d2 + pointer_align));
-      if((addr_pointed1 > start_plt_libsimgrid && addr_pointed1 < end_plt_libsimgrid) || (addr_pointed2 > start_plt_libsimgrid && addr_pointed2 < end_plt_libsimgrid)){
-        continue;
-      }else if(addr_pointed1 >= raw_heap && addr_pointed1 <= end_raw_heap && addr_pointed2 >= raw_heap && addr_pointed2 <= end_raw_heap){
-        continue;
-      }else{
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
-          XBT_VERB("Different byte (offset=%zu) (%p - %p) in libsimgrid region", i, (char *)d1 + i, (char *)d2 + i);
-          XBT_VERB("Addresses pointed : %p - %p", addr_pointed1, addr_pointed2);
-        }
-        return 1;
+    }
+  }else{ /* binary */
+    xbt_dynar_foreach(mc_global_variables, cursor, current_var){
+      if(current_var->address > start_data_libsimgrid)
+        break;
+      offset = (char *)current_var->address - (char *)start_data_binary;
+      i = 0;
+      while(i < current_var->size){
+        if(memcmp((char*)d1 + offset + i, (char*)d2 + offset + i, 1) != 0){
+          pointer_align = (i / sizeof(void*)) * sizeof(void*); 
+          addr_pointed1 = *((void **)((char *)d1 + offset + pointer_align));
+          addr_pointed2 = *((void **)((char *)d2 + offset + pointer_align));
+          if((addr_pointed1 > start_plt_binary && addr_pointed1 < end_plt_binary) || (addr_pointed2 > start_plt_binary && addr_pointed2 < end_plt_binary)){
+            i = current_var->size;
+            continue;
+          }else{
+            if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
+              XBT_VERB("Different global variable in binary : %s", current_var->name);
+            }
+            return 1;
+          }
+        } 
+        i++;
       }
+      
     }
   }
-  
+
   return 0;
 }
 
@@ -174,232 +142,226 @@ void heap_equality_free_voidp(void *e){
   heap_equality_free((heap_equality_t) * (void **) e);
 }
 
-int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t ct1, mc_comparison_times_t ct2){
-
-  int raw_mem = (mmalloc_get_current_heap() == raw_heap);
-  
-  MC_SET_RAW_MEM;
-      
-  int errors = 0, i = 0;
-
-  if(s1->num_reg != s2->num_reg){
-    if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
-      XBT_VERB("Different num_reg (s1 = %u, s2 = %u)", s1->num_reg, s2->num_reg);
-    }
-    if(!raw_mem)
-      MC_UNSET_RAW_MEM;
-    return 1;
-  }
-
-  int heap_index = 0, data_libsimgrid_index = 0, data_program_index = 0;
+int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall,
+                                   mc_snapshot_t s1, mc_snapshot_t s2){
+  return snapshot_compare(s1, s2);
+}
 
-  /* Get index of regions */
-  while(i < s1->num_reg){
-    switch(s1->regions[i]->type){
+int get_heap_region_index(mc_snapshot_t s){
+  int i = 0;
+  while(i < s->num_reg){
+    switch(s->regions[i]->type){
     case 0:
-      heap_index = i;
-      i++;
-      break;
-    case 1:
-      data_libsimgrid_index = i;
-      i++;
-      while( i < s1->num_reg && s1->regions[i]->type == 1)
-        i++;
+      return i;
       break;
-    case 2:
-      data_program_index = i;
+    default:
       i++;
-      while( i < s1->num_reg && s1->regions[i]->type == 2)
-        i++;
       break;
     }
   }
+  return -1;
+}
 
-  if(ct1 != NULL)
-    ct1->nb_comparisons++;
-  if(ct2 != NULL)
-    ct2->nb_comparisons++;
+int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2){
+
+  int raw_mem = (mmalloc_get_current_heap() == raw_heap);
+  
+  MC_SET_RAW_MEM;
+      
+  int errors = 0;
 
   xbt_os_timer_t global_timer = xbt_os_timer_new();
   xbt_os_timer_t timer = xbt_os_timer_new();
 
   xbt_os_timer_start(global_timer);
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))
+  #ifdef MC_DEBUG
     xbt_os_timer_start(timer);
+  #endif
 
-  /* Compare number of blocks/fragments used in each heap */
-  size_t chunks_used1 = mmalloc_get_chunks_used((xbt_mheap_t)s1->regions[heap_index]->data);
-  size_t chunks_used2 = mmalloc_get_chunks_used((xbt_mheap_t)s2->regions[heap_index]->data);
-  if(chunks_used1 != chunks_used2){
-    if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+  /* Compare number of processes */
+  if(s1->nb_processes != s2->nb_processes){
+    #ifdef MC_DEBUG
       xbt_os_timer_stop(timer);
-      if(ct1 != NULL)
-        xbt_dynar_push_as(ct1->chunks_used_comparison_times, double, xbt_os_timer_elapsed(timer));
-      if(ct2 != NULL)
-        xbt_dynar_push_as(ct2->chunks_used_comparison_times, double, xbt_os_timer_elapsed(timer));
-      XBT_DEBUG("Different number of chunks used in each heap : %zu - %zu", chunks_used1, chunks_used2);
+      mc_comp_times->nb_processes_comparison_time =  xbt_os_timer_elapsed(timer);
+      XBT_DEBUG("Different number of processes : %d - %d", s1->nb_processes, s2->nb_processes);
       errors++;
-    }else{
-      if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-        XBT_VERB("Different number of chunks used in each heap : %zu - %zu", chunks_used1, chunks_used2);
+    #else
+      #ifdef MC_VERBOSE
+        XBT_VERB("Different number of processes : %d - %d", s1->nb_processes, s2->nb_processes);
+      #endif
      
       xbt_os_timer_free(timer);
       xbt_os_timer_stop(global_timer);
-      if(ct1 != NULL)
-        xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-      if(ct2 != NULL)
-        xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
       xbt_os_timer_free(global_timer);
 
       if(!raw_mem)
         MC_UNSET_RAW_MEM;
 
       return 1;
-    }
+    #endif
+  }
+
+  /* Compare number of blocks/fragments used in each heap */
+  if(s1->heap_chunks_used != s2->heap_chunks_used){
+    #ifdef MC_DEBUG
+      xbt_os_timer_stop(timer);
+      mc_comp_times->chunks_used_comparison_time = xbt_os_timer_elapsed(timer);
+      XBT_DEBUG("Different number of chunks used in each heap : %zu - %zu", s1->heap_chunks_used, s2->heap_chunks_used);
+      errors++;
+    #else
+      #ifdef MC_VERBOSE
+        XBT_VERB("Different number of chunks used in each heap : %zu - %zu", s1->heap_chunks_used, s2->heap_chunks_used);
+      #endif
+
+      xbt_os_timer_free(timer);
+      xbt_os_timer_stop(global_timer);
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+      xbt_os_timer_free(global_timer);
+
+      if(!raw_mem)
+        MC_UNSET_RAW_MEM;
+
+      return 1;
+    #endif
   }else{
-    if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))
+    #ifdef MC_DEBUG
       xbt_os_timer_stop(timer);
+    #endif
   }
   
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))
+  #ifdef MC_DEBUG
     xbt_os_timer_start(timer);
-
+  #endif
+  
   /* Compare size of stacks */
-  unsigned int cursor = 0;
-  void *addr_stack1, *addr_stack2;
-  void *sp1, *sp2;
+  int i = 0;
   size_t size_used1, size_used2;
   int is_diff = 0;
-  while(cursor < xbt_dynar_length(stacks_areas)){
-    addr_stack1 = (char *)s1->regions[heap_index]->data + ((char *)((stack_region_t)xbt_dynar_get_as(stacks_areas, cursor, stack_region_t))->address - (char *)std_heap);
-    addr_stack2 = (char *)s2->regions[heap_index]->data + ((char *)((stack_region_t)xbt_dynar_get_as(stacks_areas, cursor, stack_region_t))->address - (char *)std_heap);
-    sp1 = ((mc_snapshot_stack_t)xbt_dynar_get_as(s1->stacks, cursor, mc_snapshot_stack_t))->stack_pointer;
-    sp2 = ((mc_snapshot_stack_t)xbt_dynar_get_as(s2->stacks, cursor, mc_snapshot_stack_t))->stack_pointer;
-    size_used1 = ((stack_region_t)xbt_dynar_get_as(stacks_areas, cursor, stack_region_t))->size - ((char*)sp1 - (char*)addr_stack1);
-    size_used2 = ((stack_region_t)xbt_dynar_get_as(stacks_areas, cursor, stack_region_t))->size - ((char*)sp2 - (char*)addr_stack2);
+  while(i < xbt_dynar_length(s1->stacks)){
+    size_used1 = s1->stack_sizes[i];
+    size_used2 = s2->stack_sizes[i];
     if(size_used1 != size_used2){
-      if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
-        if(is_diff == 0){
-          xbt_os_timer_stop(timer);
-          if(ct1 != NULL)
-            xbt_dynar_push_as(ct1->stacks_sizes_comparison_times, double, xbt_os_timer_elapsed(timer));
-          if(ct2 != NULL)
-            xbt_dynar_push_as(ct2->stacks_sizes_comparison_times, double, xbt_os_timer_elapsed(timer));
-        }
-        XBT_DEBUG("Different size used in stacks : %zu - %zu", size_used1, size_used2);
-        errors++;
-        is_diff = 1;
-      }else{
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-          XBT_VERB("Different size used in stacks : %zu - %zu", size_used1, size_used2);
+    #ifdef MC_DEBUG
+      if(is_diff == 0){
+        xbt_os_timer_stop(timer);
+        mc_comp_times->stacks_sizes_comparison_time = xbt_os_timer_elapsed(timer);
+      }
+      XBT_DEBUG("Different size used in stacks : %zu - %zu", size_used1, size_used2);
+      errors++;
+      is_diff = 1;
+    #else
+      #ifdef MC_VERBOSE
+        XBT_VERB("Different size used in stacks : %zu - %zu", size_used1, size_used2);
+      #endif
  
-        xbt_os_timer_free(timer);
-        xbt_os_timer_stop(global_timer);
-        if(ct1 != NULL)
-          xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        if(ct2 != NULL)
-          xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        xbt_os_timer_free(global_timer);
+      xbt_os_timer_free(timer);
+      xbt_os_timer_stop(global_timer);
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+      xbt_os_timer_free(global_timer);
 
-        if(!raw_mem)
-          MC_UNSET_RAW_MEM;
+      if(!raw_mem)
+        MC_UNSET_RAW_MEM;
 
-        return 1;
-      }
+      return 1;
+    #endif  
     }
-    cursor++;
+    i++;
   }
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+  #ifdef MC_DEBUG
     if(is_diff == 0)
       xbt_os_timer_stop(timer);
     xbt_os_timer_start(timer);
-  }
+  #endif
+
+  int heap_index = 0, data_libsimgrid_index = 0, data_program_index = 0;
+  i = 0;
   
-  /* Compare program data segment(s) */
-  is_diff = 0;
-  i = data_program_index;
-  while(i < s1->num_reg && s1->regions[i]->type == 2){
-    if(data_bss_program_region_compare(s1->regions[i]->data, s2->regions[i]->data, s1->regions[i]->size) != 0){
-      if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
-        if(is_diff == 0){
-          xbt_os_timer_stop(timer);
-          if(ct1 != NULL)
-            xbt_dynar_push_as(ct1->program_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
-          if(ct2 != NULL)
-           xbt_dynar_push_as(ct2->program_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
-        }
-        XBT_DEBUG("Different memcmp for data in program");
-        errors++;
-        is_diff = 1;
-      }else{
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-          XBT_VERB("Different memcmp for data in program"); 
-
-        xbt_os_timer_free(timer);
-        xbt_os_timer_stop(global_timer);
-        if(ct1 != NULL)
-          xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        if(ct2 != NULL)
-          xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        xbt_os_timer_free(global_timer);
-
-        if(!raw_mem)
-          MC_UNSET_RAW_MEM;
-        return 1;
-      }
+  /* Get index of regions */
+  while(i < s1->num_reg){
+    switch(s1->region_type[i]){
+    case 0:
+      heap_index = i;
+      i++;
+      break;
+    case 1:
+      data_libsimgrid_index = i;
+      i++;
+      while( i < s1->num_reg && s1->region_type[i] == 1)
+        i++;
+      break;
+    case 2:
+      data_program_index = i;
+      i++;
+      while( i < s1->num_reg && s1->region_type[i] == 2)
+        i++;
+      break;
     }
-    i++;
   }
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+  /* Compare binary global variables */
+  is_diff = compare_global_variables(s1->region_type[data_program_index], s1->regions[data_program_index]->data, s2->regions[data_program_index]->data);
+  if(is_diff != 0){
+    #ifdef MC_DEBUG
+      xbt_os_timer_stop(timer);
+      mc_comp_times->binary_global_variables_comparison_time = xbt_os_timer_elapsed(timer);
+      XBT_DEBUG("Different global variables in binary"); 
+      errors++; 
+    #else
+      #ifdef MC_VERBOSE
+        XBT_VERB("Different global variables in binary"); 
+      #endif
+    
+      xbt_os_timer_free(timer);
+      xbt_os_timer_stop(global_timer);
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+      xbt_os_timer_free(global_timer);
+    
+      if(!raw_mem)
+        MC_UNSET_RAW_MEM;
+
+      return 1;
+    #endif
+  }
+
+  #ifdef MC_VERBOSE
     if(is_diff == 0)
       xbt_os_timer_stop(timer);
     xbt_os_timer_start(timer);
-  }
+  #endif
 
-  /* Compare libsimgrid data segment(s) */
-  is_diff = 0;
-  i = data_libsimgrid_index;
-  while(i < s1->num_reg && s1->regions[i]->type == 1){
-    if(data_bss_libsimgrid_region_compare(s1->regions[i]->data, s2->regions[i]->data, s1->regions[i]->size) != 0){
-      if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
-        if(is_diff == 0){
-          xbt_os_timer_stop(timer);
-          if(ct1 != NULL)
-            xbt_dynar_push_as(ct1->libsimgrid_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
-          if(ct2 != NULL)
-            xbt_dynar_push_as(ct2->libsimgrid_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
-        }
-        XBT_DEBUG("Different memcmp for data in libsimgrid");
-        errors++;
-        is_diff = 1;
-      }else{
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-          XBT_VERB("Different memcmp for data in libsimgrid");
-         
-        xbt_os_timer_free(timer);
-        xbt_os_timer_stop(global_timer);
-        if(ct1 != NULL)
-          xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        if(ct2 != NULL)
-          xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-        xbt_os_timer_free(global_timer);
-        
-        if(!raw_mem)
-          MC_UNSET_RAW_MEM;
-        return 1;
-      }
-    }
-    i++;
-  }
+  /* Compare libsimgrid global variables */
+  is_diff = compare_global_variables(s1->region_type[data_libsimgrid_index], s1->regions[data_libsimgrid_index]->data, s2->regions[data_libsimgrid_index]->data);
+  if(is_diff != 0){
+    #ifdef MC_DEBUG
+      xbt_os_timer_stop(timer);
+      mc_comp_times->libsimgrid_global_variables_comparison_time = xbt_os_timer_elapsed(timer); 
+      XBT_DEBUG("Different global variables in libsimgrid"); 
+      errors++; 
+    #else
+      #ifdef MC_VERBOSE
+        XBT_VERB("Different global variables in libsimgrid"); 
+      #endif
+    
+      xbt_os_timer_free(timer);
+      xbt_os_timer_stop(global_timer);
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+      xbt_os_timer_free(global_timer);
+    
+      if(!raw_mem)
+        MC_UNSET_RAW_MEM;
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+      return 1;
+    #endif
+  }  
+
+  #ifdef MC_DEBUG
     if(is_diff == 0)
       xbt_os_timer_stop(timer);
     xbt_os_timer_start(timer);
-  }
+  #endif
 
   /* Compare heap */
   xbt_dynar_t stacks1 = xbt_dynar_new(sizeof(stack_region_t), stack_region_free_voidp);
@@ -410,47 +372,46 @@ int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t c
  
   if(mmalloc_compare_heap((xbt_mheap_t)s1->regions[heap_index]->data, (xbt_mheap_t)s2->regions[heap_index]->data, &stacks1, &stacks2, &equals)){
 
-    if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+    #ifdef MC_DEBUG
       xbt_os_timer_stop(timer);
-      if(ct1 != NULL)
-        xbt_dynar_push_as(ct1->heap_comparison_times, double, xbt_os_timer_elapsed(timer));
-      if(ct2 != NULL)
-        xbt_dynar_push_as(ct2->heap_comparison_times, double, xbt_os_timer_elapsed(timer));
+      mc_comp_times->heap_comparison_time = xbt_os_timer_elapsed(timer); 
       XBT_DEBUG("Different heap (mmalloc_compare)");
       errors++;
-    }else{
+    #else
 
       xbt_os_timer_free(timer);
       xbt_dynar_free(&stacks1);
       xbt_dynar_free(&stacks2);
       xbt_dynar_free(&equals);
  
-      if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
+      #ifdef MC_VERBOSE
         XBT_VERB("Different heap (mmalloc_compare)");
+      #endif
        
       xbt_os_timer_stop(global_timer);
-      if(ct1 != NULL)
-        xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-      if(ct2 != NULL)
-        xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
+      mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
       xbt_os_timer_free(global_timer);
 
       if(!raw_mem)
         MC_UNSET_RAW_MEM;
+
       return 1;
-    } 
+    #endif
   }else{
-    if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))
+    #ifdef MC_DEBUG
       xbt_os_timer_stop(timer);
+    #endif
   }
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))
+  #ifdef MC_DEBUG
     xbt_os_timer_start(timer);
+  #endif
 
   /* Stacks comparison */
-  cursor = 0;
+  unsigned int  cursor = 0;
   stack_region_t stack_region1, stack_region2;
   int diff = 0, diff_local = 0;
+  void *sp1, *sp2;
   is_diff = 0;
 
   while(cursor < xbt_dynar_length(stacks1)){
@@ -463,38 +424,33 @@ int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t c
     if(diff > 0){ /* Differences may be due to padding */  
       diff_local = compare_local_variables(((mc_snapshot_stack_t)xbt_dynar_get_as(s1->stacks, cursor, mc_snapshot_stack_t))->local_variables->data, ((mc_snapshot_stack_t)xbt_dynar_get_as(s2->stacks, cursor, mc_snapshot_stack_t))->local_variables->data, equals);
       if(diff_local > 0){
-        if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+        #ifdef MC_DEBUG
           if(is_diff == 0){
             xbt_os_timer_stop(timer);
-            if(ct1 != NULL)
-              xbt_dynar_push_as(ct1->stacks_comparison_times, double, xbt_os_timer_elapsed(timer));
-            if(ct2 != NULL)
-              xbt_dynar_push_as(ct2->stacks_comparison_times, double, xbt_os_timer_elapsed(timer));
+            mc_comp_times->stacks_comparison_time = xbt_os_timer_elapsed(timer); 
           }
           XBT_DEBUG("Different local variables between stacks %d", cursor + 1);
           errors++;
           is_diff = 1;
-        }else{
+        #else
           xbt_dynar_free(&stacks1);
           xbt_dynar_free(&stacks2);
           xbt_dynar_free(&equals);
 
-          if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
+          #ifdef MC_VERBOSE
             XBT_VERB("Different local variables between stacks %d", cursor + 1);
+          #endif
           
           xbt_os_timer_free(timer);
           xbt_os_timer_stop(global_timer);
-          if(ct1 != NULL)
-            xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-          if(ct2 != NULL)
-            xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
+          mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
           xbt_os_timer_free(global_timer);
           
           if(!raw_mem)
             MC_UNSET_RAW_MEM;
 
           return 1;
-        }
+        #endif
       }
     }
     cursor++;
@@ -503,19 +459,20 @@ int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t c
   xbt_dynar_free(&stacks1);
   xbt_dynar_free(&stacks2);
   xbt_dynar_free(&equals);
+   
+  xbt_os_timer_free(timer);
 
-  if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug))    
-    xbt_os_timer_free(timer);
-
-  if(!XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+  #ifdef MC_VERBOSE
     xbt_os_timer_stop(global_timer);
-    if(ct1 != NULL)
-      xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-    if(ct2 != NULL)
-      xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
-  }
+    mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+  #endif
+
   xbt_os_timer_free(global_timer);
 
+  #ifdef MC_DEBUG
+    print_comparison_times();
+  #endif
+
   if(!raw_mem)
     MC_UNSET_RAW_MEM;
 
@@ -565,10 +522,10 @@ static int compare_local_variables(char *s1, char *s2, xbt_dynar_t heap_equals){
     s_tokens2 = xbt_str_split(xbt_dynar_get_as(tokens2, cursor, char *), "=");
     if(xbt_dynar_length(s_tokens1) > 1 && xbt_dynar_length(s_tokens2) > 1){
       if((strcmp(xbt_dynar_get_as(s_tokens1, 0, char *), "ip") == 0) && (strcmp(xbt_dynar_get_as(s_tokens2, 0, char *), "ip") == 0)){
+        xbt_free(ip1);
+        xbt_free(ip2);
         ip1 = strdup(xbt_dynar_get_as(s_tokens1, 1, char *));
         ip2 = strdup(xbt_dynar_get_as(s_tokens2, 1, char *));
-        /*if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-          XBT_VERB("Instruction pointer : %s, Instruction pointer : %s", ip1, ip2);*/
       }
       if(strcmp(xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *)) != 0){   
         /* Ignore this variable ?  */
@@ -582,18 +539,25 @@ static int compare_local_variables(char *s1, char *s2, xbt_dynar_t heap_equals){
         addr2 = (void *) strtoul(xbt_dynar_get_as(s_tokens2, 1, char *), NULL, 16);
         if(is_heap_equality(heap_equals, addr1, addr2) == 0){
           if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
-            XBT_VERB("Variable %s is different between stacks : %s - %s", xbt_dynar_get_as(s_tokens1, 0, char *), xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *));
+            XBT_VERB("Variable %s is different between stacks in %s : %s - %s", xbt_dynar_get_as(s_tokens1, 0, char *), ip1, xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *));
           xbt_dynar_free(&s_tokens1);
           xbt_dynar_free(&s_tokens2);
+          xbt_dynar_free(&tokens1);
+          xbt_dynar_free(&tokens2);
+          xbt_free(ip1);
+          xbt_free(ip2);
           return 1;
         }
       }
     }
     xbt_dynar_free(&s_tokens1);
     xbt_dynar_free(&s_tokens2);
+         
     cursor++;
   }
 
+  xbt_free(ip1);
+  xbt_free(ip2);
   xbt_dynar_free(&tokens1);
   xbt_dynar_free(&tokens2);
   return 0;
@@ -660,7 +624,20 @@ static int compare_stack(stack_region_t s1, stack_region_t s2, void *sp1, void *
 }
 
 int MC_compare_snapshots(void *s1, void *s2){
+  
+  MC_ignore_stack("self", "simcall_BODY_mc_snapshot");
 
   return simcall_mc_compare_snapshots(s1, s2);
 
 }
+
+void print_comparison_times(){
+  XBT_DEBUG("*** Comparison times ***");
+  XBT_DEBUG("- Nb processes : %f", mc_comp_times->nb_processes_comparison_time);
+  XBT_DEBUG("- Nb chunks used : %f", mc_comp_times->chunks_used_comparison_time);
+  XBT_DEBUG("- Stacks sizes : %f", mc_comp_times->stacks_sizes_comparison_time);
+  XBT_DEBUG("- Binary global variables : %f", mc_comp_times->binary_global_variables_comparison_time);
+  XBT_DEBUG("- Libsimgrid global variables : %f", mc_comp_times->libsimgrid_global_variables_comparison_time);
+  XBT_DEBUG("- Heap : %f", mc_comp_times->heap_comparison_time);
+  XBT_DEBUG("- Stacks : %f", mc_comp_times->stacks_comparison_time);
+}
index 0947844..c3a3383 100644 (file)
@@ -11,18 +11,33 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dpor, mc,
 xbt_dynar_t visited_states;
 
 static int is_visited_state(void);
+static void visited_state_free(mc_safety_visited_state_t state);
+static void visited_state_free_voidp(void *s);
+
+static void visited_state_free(mc_safety_visited_state_t state){
+  if(state){
+    MC_free_snapshot(state->system_state);
+    xbt_free(state);
+  }
+}
+
+static void visited_state_free_voidp(void *s){
+  visited_state_free((mc_safety_visited_state_t) * (void **) s);
+}
 
 static int is_visited_state(){
 
-  if(_surf_mc_visited == 0)
+  if(_sg_mc_visited == 0)
     return 0;
 
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
 
   MC_SET_RAW_MEM;
 
-  mc_snapshot_t new_state = NULL;
-  new_state = MC_take_snapshot();  
+  mc_safety_visited_state_t new_state = NULL;
+  new_state = xbt_new0(s_mc_safety_visited_state_t, 1);
+  new_state->system_state = MC_take_snapshot();
+  new_state->num = mc_stats->expanded_states;
 
   MC_UNSET_RAW_MEM;
   
@@ -41,29 +56,95 @@ static int is_visited_state(){
 
     MC_SET_RAW_MEM;
     
+    size_t current_chunks_used = new_state->system_state->heap_chunks_used;
+
     unsigned int cursor = 0;
-    mc_snapshot_t state_test = NULL;
-     
-    xbt_dynar_foreach(visited_states, cursor, state_test){
-      if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug))
-        XBT_DEBUG("****** Pair visited #%d ******", cursor + 1);
-      if(snapshot_compare(new_state, state_test, NULL, NULL) == 0){
-        if(raw_mem_set)
-          MC_SET_RAW_MEM;
-        else
-          MC_UNSET_RAW_MEM;
-        
-        return 1;
-      }   
+    int previous_cursor = 0, next_cursor = 0;
+    int start = 0;
+    int end = xbt_dynar_length(visited_states) - 1;
+
+    mc_safety_visited_state_t state_test = NULL;
+    size_t chunks_used_test;
+    int same_chunks_not_found = 1;
+
+    while(start <= end && same_chunks_not_found){
+      cursor = (start + end) / 2;
+      state_test = (mc_safety_visited_state_t)xbt_dynar_get_as(visited_states, cursor, mc_safety_visited_state_t);
+      chunks_used_test = state_test->system_state->heap_chunks_used;
+      if(chunks_used_test < current_chunks_used)
+        start = cursor + 1;
+      if(chunks_used_test > current_chunks_used)
+        end = cursor - 1; 
+      if(chunks_used_test == current_chunks_used){
+        same_chunks_not_found = 0;
+        if(snapshot_compare(new_state->system_state, state_test->system_state) == 0){
+          xbt_dynar_remove_at(visited_states, cursor, NULL);
+          xbt_dynar_insert_at(visited_states, cursor, &new_state);
+          if(raw_mem_set)
+            MC_SET_RAW_MEM;
+          else
+            MC_UNSET_RAW_MEM;
+          return 1;
+        }else{
+          /* Search another state with same number of chunks used */
+          previous_cursor = cursor - 1;
+          while(previous_cursor >= 0){
+            state_test = (mc_safety_visited_state_t)xbt_dynar_get_as(visited_states, previous_cursor, mc_safety_visited_state_t);
+            chunks_used_test = state_test->system_state->heap_chunks_used;
+            if(chunks_used_test != current_chunks_used)
+              break;
+            if(snapshot_compare(new_state->system_state, state_test->system_state) == 0){
+              xbt_dynar_remove_at(visited_states, previous_cursor, NULL);
+              xbt_dynar_insert_at(visited_states, previous_cursor, &new_state);
+              if(raw_mem_set)
+                MC_SET_RAW_MEM;
+              else
+                MC_UNSET_RAW_MEM;
+              return 1;
+            }
+            previous_cursor--;
+          }
+          next_cursor = cursor + 1;
+          while(next_cursor < xbt_dynar_length(visited_states)){
+            state_test = (mc_safety_visited_state_t)xbt_dynar_get_as(visited_states, next_cursor, mc_safety_visited_state_t);
+            chunks_used_test = state_test->system_state->heap_chunks_used;
+            if(chunks_used_test != current_chunks_used)
+              break;
+            if(snapshot_compare(new_state->system_state, state_test->system_state) == 0){
+              xbt_dynar_remove_at(visited_states, next_cursor, NULL);
+              xbt_dynar_insert_at(visited_states, next_cursor, &new_state);
+              if(raw_mem_set)
+                MC_SET_RAW_MEM;
+              else
+                MC_UNSET_RAW_MEM;
+              return 1;
+            }
+            next_cursor++;
+          }
+        }   
+      }
     }
 
-    if(xbt_dynar_length(visited_states) == _surf_mc_visited){
-      mc_snapshot_t state_to_remove = NULL;
-      xbt_dynar_shift(visited_states, &state_to_remove);
-      MC_free_snapshot(state_to_remove);
+    state_test = (mc_safety_visited_state_t)xbt_dynar_get_as(visited_states, cursor, mc_safety_visited_state_t);
+    chunks_used_test = state_test->system_state->heap_chunks_used;
+
+    if(chunks_used_test < current_chunks_used)
+      xbt_dynar_insert_at(visited_states, cursor + 1, &new_state);
+    else
+      xbt_dynar_insert_at(visited_states, cursor, &new_state);
+
+    if(xbt_dynar_length(visited_states) > _sg_mc_visited){
+      int min = mc_stats->expanded_states;
+      unsigned int cursor2 = 0;
+      unsigned int index = 0;
+      xbt_dynar_foreach(visited_states, cursor2, state_test){
+        if(state_test->num < min){
+          index = cursor2;
+          min = state_test->num;
+        }
+      }
+      xbt_dynar_remove_at(visited_states, index, NULL);
     }
-
-    xbt_dynar_push(visited_states, &new_state); 
     
     MC_UNSET_RAW_MEM;
 
@@ -90,7 +171,7 @@ void MC_dpor_init()
   MC_SET_RAW_MEM;
 
   initial_state = MC_state_new();
-  visited_states = xbt_dynar_new(sizeof(mc_snapshot_t), NULL);
+  visited_states = xbt_dynar_new(sizeof(mc_safety_visited_state_t), visited_state_free_voidp);
 
   MC_UNSET_RAW_MEM;
 
@@ -101,18 +182,12 @@ void MC_dpor_init()
   MC_wait_for_requests();
 
   MC_SET_RAW_MEM;
-
-  xbt_swag_foreach(process, simix_global->process_list){
-    if(MC_process_is_enabled(process)){
-      XBT_DEBUG("Process %lu enabled with simcall : %d", process->pid, (&process->simcall)->call); 
-    }
-  }
-  
   /* Get an enabled process and insert it in the interleave set of the initial state */
   xbt_swag_foreach(process, simix_global->process_list){
     if(MC_process_is_enabled(process)){
       MC_state_interleave_process(initial_state, process);
-      break;
+      XBT_DEBUG("Process %lu enabled with simcall %d", process->pid, process->simcall.call);
     }
   }
 
@@ -125,10 +200,6 @@ void MC_dpor_init()
   else
     MC_UNSET_RAW_MEM;
   
-    
-  /* FIXME: Update Statistics 
-     mc_stats->state_size +=
-     xbt_setset_set_size(initial_state->enabled_transitions); */
 }
 
 
@@ -140,12 +211,14 @@ void MC_dpor(void)
 {
 
   char *req_str;
-  int value;
-  smx_simcall_t req = NULL, prev_req = NULL;
+  int value, value2;
+  smx_simcall_t req = NULL, prev_req = NULL, req2 = NULL;
+  s_smx_simcall_t req3;
   mc_state_t state = NULL, prev_state = NULL, next_state = NULL, restore_state=NULL;
   smx_process_t process = NULL;
   xbt_fifo_item_t item = NULL;
-  int pos;
+  int pos, i, interleave_size;
+  int interleave_proc[simix_process_maxpid];
 
   while (xbt_fifo_size(mc_stack_safety) > 0) {
 
@@ -163,7 +236,7 @@ void MC_dpor(void)
 
     /* If there are processes to interleave and the maximum depth has not been reached
        then perform one step of the exploration algorithm */
-    if (xbt_fifo_size(mc_stack_safety) < _surf_mc_max_depth &&
+    if (xbt_fifo_size(mc_stack_safety) < _sg_mc_max_depth &&
         (req = MC_state_get_request(state, &value))) {
 
       /* Debug information */
@@ -176,6 +249,38 @@ void MC_dpor(void)
       MC_state_set_executed_request(state, req, value);
       mc_stats->executed_transitions++;
 
+      if(MC_state_interleave_size(state)){
+        MC_SET_RAW_MEM;
+        req2 = MC_state_get_internal_request(state);
+        req3 = *req2;
+        for(i=0; i<simix_process_maxpid; i++)
+          interleave_proc[i] = 0;
+        i=0;
+        interleave_size = MC_state_interleave_size(state);
+        while(i < interleave_size){
+          i++;
+          prev_req = MC_state_get_request(state, &value2);
+          if(prev_req != NULL){
+            MC_state_set_executed_request(state, prev_req, value2);
+            prev_req = MC_state_get_internal_request(state);
+            if(MC_request_depend(&req3, prev_req)){
+              XBT_DEBUG("Simcall %d in process %lu dependant with simcall %d in process %lu", req3.call, req3.issuer->pid, prev_req->call, prev_req->issuer->pid);  
+              interleave_proc[prev_req->issuer->pid] = 1;
+            }else{
+              XBT_DEBUG("Simcall %d in process %lu independant with simcall %d in process %lu", req3.call, req3.issuer->pid, prev_req->call, prev_req->issuer->pid); 
+              MC_state_remove_interleave_process(state, prev_req->issuer);
+            }
+          }
+        }
+        xbt_swag_foreach(process, simix_global->process_list){
+          if(interleave_proc[process->pid] == 1)
+            MC_state_interleave_process(state, process);
+        }
+        MC_UNSET_RAW_MEM;
+      }
+
+      MC_state_set_executed_request(state, req, value);
+
       /* Answer the request */
       SIMIX_simcall_pre(req, value); /* After this call req is no longer usefull */
 
@@ -193,11 +298,11 @@ void MC_dpor(void)
         xbt_swag_foreach(process, simix_global->process_list){
           if(MC_process_is_enabled(process)){
             MC_state_interleave_process(next_state, process);
-            XBT_DEBUG("Process %lu enabled with simcall : %d", process->pid, (&process->simcall)->call); 
+            XBT_DEBUG("Process %lu enabled with simcall %d", process->pid, process->simcall.call);
           }
         }
 
-        if(_surf_mc_checkpoint && ((xbt_fifo_size(mc_stack_safety) + 1) % _surf_mc_checkpoint == 0)){
+        if(_sg_mc_checkpoint && ((xbt_fifo_size(mc_stack_safety) + 1) % _sg_mc_checkpoint == 0)){
           next_state->system_state = MC_take_snapshot();
         }
 
@@ -210,29 +315,16 @@ void MC_dpor(void)
       xbt_fifo_unshift(mc_stack_safety, next_state);
       MC_UNSET_RAW_MEM;
 
-      /* FIXME: Update Statistics
-         mc_stats->state_size +=
-         xbt_setset_set_size(next_state->enabled_transitions);*/
-
       /* Let's loop again */
 
       /* The interleave set is empty or the maximum depth is reached, let's back-track */
     } else {
 
-      if(xbt_fifo_size(mc_stack_safety) == _surf_mc_max_depth){
-        
+      if(xbt_fifo_size(mc_stack_safety) == _sg_mc_max_depth)  
         XBT_WARN("/!\\ Max depth reached ! /!\\ ");
-        if(req != NULL){
-          XBT_WARN("/!\\ But, there are still processes to interleave. Model-checker will not be able to ensure the soundness of the verification from now. /!\\ "); 
-          XBT_WARN("Notice : the default value of max depth is 1000 but you can change it with cfg=model-check/max_depth:value.");
-        }
-
-      }else{
-
+      else
         XBT_DEBUG("There are no more processes to interleave.");
 
-      }
-
       /* Trash the current state, no longer needed */
       MC_SET_RAW_MEM;
       xbt_fifo_shift(mc_stack_safety);
@@ -254,42 +346,42 @@ void MC_dpor(void)
          state that executed that previous request. */
       
       while ((state = xbt_fifo_shift(mc_stack_safety)) != NULL) {
-        if(MC_state_interleave_size(state) == 0){
-          req = MC_state_get_internal_request(state);
-          xbt_fifo_foreach(mc_stack_safety, item, prev_state, mc_state_t) {
-            if(MC_request_depend(req, MC_state_get_internal_request(prev_state))){
-              if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
-                XBT_DEBUG("Dependent Transitions:");
-                prev_req = MC_state_get_executed_request(prev_state, &value);
-                req_str = MC_request_to_string(prev_req, value);
-                XBT_DEBUG("%s (state=%p)", req_str, prev_state);
-                xbt_free(req_str);
-                prev_req = MC_state_get_executed_request(state, &value);
-                req_str = MC_request_to_string(prev_req, value);
-                XBT_DEBUG("%s (state=%p)", req_str, state);
-                xbt_free(req_str);              
-              }
+        req = MC_state_get_internal_request(state);
+        xbt_fifo_foreach(mc_stack_safety, item, prev_state, mc_state_t) {
+          if(MC_request_depend(req, MC_state_get_internal_request(prev_state))){
+            if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
+              XBT_DEBUG("Dependent Transitions:");
+              prev_req = MC_state_get_executed_request(prev_state, &value);
+              req_str = MC_request_to_string(prev_req, value);
+              XBT_DEBUG("%s (state=%p)", req_str, prev_state);
+              xbt_free(req_str);
+              prev_req = MC_state_get_executed_request(state, &value);
+              req_str = MC_request_to_string(prev_req, value);
+              XBT_DEBUG("%s (state=%p)", req_str, state);
+              xbt_free(req_str);              
+            }
 
-              break;
+            break;
 
-            }else if(req->issuer == MC_state_get_executed_request(prev_state, &value)->issuer){
+          }else if(req->issuer == MC_state_get_internal_request(prev_state)->issuer){
 
-              break;
+            XBT_DEBUG("Simcall %d and %d with same issuer", req->call, MC_state_get_internal_request(prev_state)->call);
+            break;
 
-            }else{
-              
-              MC_state_remove_interleave_process(prev_state, req->issuer);
+          }else{
+
+            MC_state_remove_interleave_process(prev_state, req->issuer);
+            XBT_DEBUG("Simcall %d in process %lu independant with simcall %d process %lu", req->call, req->issuer->pid, MC_state_get_internal_request(prev_state)->call, MC_state_get_internal_request(prev_state)->issuer->pid);  
 
-            }
           }
         }
+       
         if (MC_state_interleave_size(state)) {
           /* We found a back-tracking point, let's loop */
-          if(_surf_mc_checkpoint){
+          if(_sg_mc_checkpoint){
             if(state->system_state != NULL){
               MC_restore_snapshot(state->system_state);
               xbt_fifo_unshift(mc_stack_safety, state);
-              XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety));
               MC_UNSET_RAW_MEM;
             }else{
               pos = xbt_fifo_size(mc_stack_safety);
@@ -305,16 +397,15 @@ void MC_dpor(void)
               }
               MC_restore_snapshot(restore_state->system_state);
               xbt_fifo_unshift(mc_stack_safety, state);
-              XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety));
               MC_UNSET_RAW_MEM;
               MC_replay(mc_stack_safety, pos);
             }
           }else{
             xbt_fifo_unshift(mc_stack_safety, state);
-            XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety));
             MC_UNSET_RAW_MEM;
             MC_replay(mc_stack_safety, -1);
           }
+          XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety));
           break;
         } else {
           MC_state_delete(state);
index 924592a..244e01d 100644 (file)
@@ -8,6 +8,7 @@
 #include <sys/wait.h>
 #include <sys/time.h>
 
+#include "simgrid/sg_config.h"
 #include "../surf/surf_private.h"
 #include "../simix/smx_private.h"
 #include "../xbt/mmalloc/mmprivate.h"
@@ -23,13 +24,19 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc,
 /* Configuration support */
 e_mc_reduce_t mc_reduce_kind=e_mc_reduce_unset;
 
+int _sg_do_model_check = 0;
+int _sg_mc_checkpoint=0;
+char* _sg_mc_property_file=NULL;
+int _sg_mc_timeout=0;
+int _sg_mc_max_depth=1000;
+int _sg_mc_visited=0;
 
-extern int _surf_init_status;
+extern int _sg_init_status;
 void _mc_cfg_cb_reduce(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a reduction strategy after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  char *val= xbt_cfg_get_string(_surf_cfg_set, name);
+  char *val= xbt_cfg_get_string(_sg_cfg_set, name);
   if (!strcasecmp(val,"none")) {
     mc_reduce_kind = e_mc_reduce_none;
   } else if (!strcasecmp(val,"dpor")) {
@@ -40,37 +47,37 @@ void _mc_cfg_cb_reduce(const char *name, int pos) {
 }
 
 void _mc_cfg_cb_checkpoint(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a checkpointing value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  _surf_mc_checkpoint = xbt_cfg_get_int(_surf_cfg_set, name);
+  _sg_mc_checkpoint = xbt_cfg_get_int(_sg_cfg_set, name);
 }
 void _mc_cfg_cb_property(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a property after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  _surf_mc_property_file= xbt_cfg_get_string(_surf_cfg_set, name);
+  _sg_mc_property_file= xbt_cfg_get_string(_sg_cfg_set, name);
 }
 
 void _mc_cfg_cb_timeout(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a value to enable/disable timeout for wait requests after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  _surf_mc_timeout= xbt_cfg_get_int(_surf_cfg_set, name);
+  _sg_mc_timeout= xbt_cfg_get_int(_sg_cfg_set, name);
 }
 
 void _mc_cfg_cb_max_depth(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a max depth value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  _surf_mc_max_depth= xbt_cfg_get_int(_surf_cfg_set, name);
+  _sg_mc_max_depth= xbt_cfg_get_int(_sg_cfg_set, name);
 }
 
 void _mc_cfg_cb_visited(const char *name, int pos) {
-  if (_surf_init_status && !_surf_do_model_check) {
+  if (_sg_init_status && !_sg_do_model_check) {
     xbt_die("You are specifying a number of stored visited states after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
   }
-  _surf_mc_visited= xbt_cfg_get_int(_surf_cfg_set, name);
+  _sg_mc_visited= xbt_cfg_get_int(_sg_cfg_set, name);
 }
 
 
@@ -79,6 +86,8 @@ void _mc_cfg_cb_visited(const char *name, int pos) {
 mc_state_t mc_current_state = NULL;
 char mc_replay_mode = FALSE;
 double *mc_time = NULL;
+mc_comparison_times_t mc_comp_times = NULL;
+double mc_snapshot_comparison_time;
 
 /* Safety */
 
@@ -95,6 +104,8 @@ int compare;
 
 /* Local */
 xbt_dict_t mc_local_variables = NULL;
+/* Global */
+xbt_dynar_t mc_global_variables = NULL;
 
 /* Ignore mechanism */
 xbt_dynar_t mc_stack_comparison_ignore;
@@ -109,10 +120,16 @@ xbt_automaton_t _mc_property_automaton = NULL;
 static void MC_assert_pair(int prop);
 static dw_location_t get_location(xbt_dict_t location_list, char *expr);
 static dw_frame_t get_frame_by_offset(xbt_dict_t all_variables, unsigned long int offset);
-static void ignore_coverage_variables(char *executable, int region_type);
+static size_t data_bss_ignore_size(void *address);
+static void MC_get_global_variables(char *elf_file);
 
 void MC_do_the_modelcheck_for_real() {
-  if (!_surf_mc_property_file || _surf_mc_property_file[0]=='\0') {
+
+  MC_SET_RAW_MEM;
+  mc_comp_times = xbt_new0(s_mc_comparison_times_t, 1);
+  MC_UNSET_RAW_MEM;
+
+  if (!_sg_mc_property_file || _sg_mc_property_file[0]=='\0') {
     if (mc_reduce_kind==e_mc_reduce_unset)
       mc_reduce_kind=e_mc_reduce_dpor;
 
@@ -124,8 +141,8 @@ void MC_do_the_modelcheck_for_real() {
     if (mc_reduce_kind==e_mc_reduce_unset)
       mc_reduce_kind=e_mc_reduce_none;
 
-    XBT_INFO("Check the liveness property %s",_surf_mc_property_file);
-    MC_automaton_load(_surf_mc_property_file);
+    XBT_INFO("Check the liveness property %s",_sg_mc_property_file);
+    MC_automaton_load(_sg_mc_property_file);
     MC_modelcheck_liveness();
   }
 }
@@ -153,7 +170,7 @@ void MC_init(){
 
   MC_SET_RAW_MEM;
 
-  char *ls_path = get_libsimgrid_path(); 
+  MC_init_memory_map_info();
   
   mc_local_variables = xbt_dict_new_homogeneous(NULL);
 
@@ -162,17 +179,23 @@ void MC_init(){
   MC_get_local_variables(xbt_binary_name, binary_location_list, &mc_local_variables);
 
   /* Get local variables in libsimgrid for state equality detection */
-  xbt_dict_t libsimgrid_location_list = MC_get_location_list(ls_path);
-  MC_get_local_variables(ls_path, libsimgrid_location_list, &mc_local_variables);
-
-  MC_init_memory_map_info();
+  xbt_dict_t libsimgrid_location_list = MC_get_location_list(libsimgrid_path);
+  MC_get_local_variables(libsimgrid_path, libsimgrid_location_list, &mc_local_variables);
 
+  xbt_dict_free(&libsimgrid_location_list);
+  xbt_dict_free(&binary_location_list);
+  
   /* Get .plt section (start and end addresses) for data libsimgrid and data program comparison */
   get_libsimgrid_plt_section();
   get_binary_plt_section();
 
-  ignore_coverage_variables(libsimgrid_path, 1);
-  ignore_coverage_variables(xbt_binary_name, 2);
+  MC_ignore_data_bss(&end_raw_heap, sizeof(end_raw_heap));
+  MC_ignore_data_bss(&mc_comp_times, sizeof(mc_comp_times));
+  MC_ignore_data_bss(&mc_snapshot_comparison_time, sizeof(mc_snapshot_comparison_time)); 
+
+  /* Get global variables */
+  MC_get_global_variables(xbt_binary_name);
+  MC_get_global_variables(libsimgrid_path);
 
   MC_UNSET_RAW_MEM;
 
@@ -181,10 +204,13 @@ void MC_init(){
   MC_ignore_stack("__ex_cleanup", "*");
   MC_ignore_stack("__ex_mctx_en", "*");
   MC_ignore_stack("__ex_mctx_me", "*");
+  MC_ignore_stack("__xbt_ex_ctx_ptr", "*");
   MC_ignore_stack("_log_ev", "*");
   MC_ignore_stack("_throw_ctx", "*");
   MC_ignore_stack("ctx", "*");
 
+  MC_ignore_stack("next_context", "smx_ctx_sysv_suspend_serial");
+  MC_ignore_stack("i", "smx_ctx_sysv_suspend_serial");
 
   if(raw_mem_set)
     MC_SET_RAW_MEM;
@@ -215,12 +241,14 @@ void MC_modelcheck_safety(void)
 
   MC_UNSET_RAW_MEM;
 
-  if(_surf_mc_visited > 0){
+  if(_sg_mc_visited > 0){
     MC_init();
   }else{
+    MC_SET_RAW_MEM;
     MC_init_memory_map_info();
     get_libsimgrid_plt_section();
     get_binary_plt_section();
+    MC_UNSET_RAW_MEM;
   }
 
   MC_dpor_init();
@@ -229,14 +257,13 @@ void MC_modelcheck_safety(void)
   /* Save the initial state */
   initial_state_safety = xbt_new0(s_mc_global_t, 1);
   initial_state_safety->snapshot = MC_take_snapshot();
-  //MC_take_snapshot(initial_snapshot);
   MC_UNSET_RAW_MEM;
 
+  MC_dpor();
+
   if(raw_mem_set)
     MC_SET_RAW_MEM;
 
-  MC_dpor();
-
   MC_exit();
 }
 
@@ -272,9 +299,9 @@ void MC_modelcheck_liveness(){
 
 void MC_exit(void)
 {
-  MC_print_statistics(mc_stats);
   xbt_free(mc_time);
   MC_memory_exit();
+  xbt_abort();
 }
 
 
@@ -518,7 +545,7 @@ void MC_dump_stack_safety(xbt_fifo_t stack)
 
   MC_show_stack_safety(stack);
 
-  if(!_surf_mc_checkpoint){
+  if(!_sg_mc_checkpoint){
 
     mc_state_t state;
 
@@ -717,70 +744,6 @@ void MC_automaton_new_propositional_symbol(const char* id, void* fct) {
 
 /************ MC_ignore ***********/ 
 
-static void ignore_coverage_variables(char *executable, int region_type){
-
-  FILE *fp;
-
-  char *command = bprintf("objdump --syms %s", executable);
-
-  fp = popen(command, "r");
-
-  if(fp == NULL){
-    perror("popen failed");
-    xbt_abort();
-  }
-
-  char *line = NULL;
-  ssize_t read;
-  size_t n = 0;
-
-  xbt_dynar_t line_tokens = NULL;
-  unsigned long int size, offset;
-  void *address;
-
-  while ((read = getline(&line, &n, fp)) != -1){
-
-    if(n == 0)
-      continue;
-
-     /* Wipeout the new line character */
-    line[read - 1] = '\0';
-
-    xbt_str_strip_spaces(line);
-    xbt_str_ltrim(line, NULL);
-
-    line_tokens = xbt_str_split(line, NULL);
-
-    if(xbt_dynar_length(line_tokens) < 3 || strcmp(xbt_dynar_get_as(line_tokens, 0, char *), "SYMBOL") == 0)
-      continue;
-
-    if(((strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char *), "gcov", 4) == 0)
-        || (strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char *), "__gcov", 6) == 0))
-       && (((strcmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 3, char *), ".bss") == 0) 
-            || (strcmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 3, char *), ".data") == 0)))){
-      if(region_type == 1){ /* libsimgrid */
-        offset = strtoul(xbt_dynar_get_as(line_tokens, 0, char*), NULL, 16);
-        size = strtoul(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 2, char *), NULL, 16);
-        //XBT_DEBUG("Add ignore at address %p (size %lu)", (char *)start_text_libsimgrid+offset, size);
-        MC_ignore_data_bss((char *)start_text_libsimgrid+offset, size);
-      }else{ /* binary */
-        address = (void *)strtoul(xbt_dynar_get_as(line_tokens, 0, char*), NULL, 16);
-        size = strtoul(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 2, char *), NULL, 16);
-        //XBT_DEBUG("Add ignore at address %p (size %lu)", address, size);
-        MC_ignore_data_bss(address, size);
-      }
-    }
-
-    xbt_dynar_free(&line_tokens);
-
-  }
-
-  free(command);
-  free(line);
-  pclose(fp);
-
-}
-
 void MC_ignore_heap(void *address, size_t size){
 
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
@@ -801,8 +764,10 @@ void MC_ignore_heap(void *address, size_t size){
     
     if(((xbt_mheap_t)std_heap)->heapinfo[region->block].type == 0){
       region->fragment = -1;
+      ((xbt_mheap_t)std_heap)->heapinfo[region->block].busy_block.ignore = 1;
     }else{
       region->fragment = ((uintptr_t) (ADDR2UINT (address) % (BLOCKSIZE))) >> ((xbt_mheap_t)std_heap)->heapinfo[region->block].type;
+      ((xbt_mheap_t)std_heap)->heapinfo[region->block].busy_frag.ignore[region->fragment] = 1;
     }
     
   }
@@ -880,6 +845,32 @@ void MC_ignore_data_bss(void *address, size_t size){
     MC_SET_RAW_MEM;
 }
 
+static size_t data_bss_ignore_size(void *address){
+  unsigned int cursor = 0;
+  int start = 0;
+  int end = xbt_dynar_length(mc_data_bss_comparison_ignore) - 1;
+  mc_data_bss_ignore_variable_t var;
+
+  while(start <= end){
+    cursor = (start + end) / 2;
+    var = (mc_data_bss_ignore_variable_t)xbt_dynar_get_as(mc_data_bss_comparison_ignore, cursor, mc_data_bss_ignore_variable_t);
+    if(var->address == address)
+      return var->size;
+    if(var->address < address){
+      if((void *)((char *)var->address + var->size) > address)
+        return (char *)var->address + var->size - (char*)address;
+      else
+        start = cursor + 1;
+    }
+    if(var->address > address)
+      end = cursor - 1;   
+  }
+
+  return 0;
+}
+
+
+
 void MC_ignore_stack(const char *var_name, const char *frame){
   
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
@@ -1060,65 +1051,19 @@ xbt_dict_t MC_get_location_list(const char *elf_file){
 
     char *key = bprintf("%d", (int)strtoul((char *)xbt_dynar_get_as(split, 0, char *), NULL, 16));
     xbt_dict_set(location_list, key, loclist, NULL);
+    xbt_free(key);
     
     xbt_dynar_free(&split);
 
   }
 
-  free(line);
-  free(command);
+  xbt_free(line);
+  xbt_free(command);
   pclose(fp);
 
   return location_list;
 }
 
-char *get_libsimgrid_path(){
-
-  char *command = bprintf("ldd %s", xbt_binary_name);
-  
-  FILE *fp = popen(command, "r");
-
-  if(fp == NULL){
-    perror("popen for ldd failed");
-    xbt_abort();
-  }
-
-  char *line;
-  ssize_t read;
-  size_t n = 0;
-  xbt_dynar_t split;
-  
-  while((read = getline(&line, &n, fp)) != -1){
-  
-    if(n == 0)
-      continue;
-
-    /* Wipeout the new line character */
-    line[read - 1] = '\0';
-
-    xbt_str_strip_spaces(line);
-    xbt_str_ltrim(line, NULL);
-    split = xbt_str_split(line, " ");
-
-    if(strncmp((char *)xbt_dynar_get_as(split, 0, char *), "libsimgrid.so", 13) == 0){
-      free(line);
-      free(command);
-      pclose(fp);
-      return ((char *)xbt_dynar_get_as(split, 2, char *));
-    }
-
-    xbt_dynar_free(&split);
-    
-  }
-
-  free(line);
-  free(command);
-  pclose(fp);
-
-  return NULL;
-  
-}
-
 static dw_frame_t get_frame_by_offset(xbt_dict_t all_variables, unsigned long int offset){
 
   xbt_dict_cursor_t cursor = NULL;
@@ -1126,10 +1071,13 @@ static dw_frame_t get_frame_by_offset(xbt_dict_t all_variables, unsigned long in
   dw_frame_t res;
 
   xbt_dict_foreach(all_variables, cursor, name, res) {
-    if(offset >= res->start && offset < res->end)
+    if(offset >= res->start && offset < res->end){
+      xbt_dict_cursor_free(&cursor);
       return res;
+    }
   }
 
+  xbt_dict_cursor_free(&cursor);
   return NULL;
   
 }
@@ -1236,11 +1184,12 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
           xbt_str_rtrim(abstract_origin, ">");
           subprogram_name = (char *)xbt_dict_get_or_null(subprograms_origin, abstract_origin);
           frame = xbt_dict_get_or_null(*all_variables, subprogram_name); 
+          xbt_free(abstract_origin);
 
         }else if(strcmp(node_type, "DW_AT_name") == 0){
 
           new_frame = 1;
-          free(current_frame);
+          xbt_free(current_frame);
           frame = xbt_new0(s_dw_frame_t, 1);
           frame->name = strdup(xbt_dynar_get_as(split, xbt_dynar_length(split) - 1, char *)); 
           frame->variables = xbt_dict_new_homogeneous(NULL);
@@ -1266,6 +1215,7 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
             xbt_str_rtrim(loc_expr, ")");
             frame->frame_base = get_location(NULL, loc_expr);
             xbt_dynar_free(&split2);
+            xbt_free(loc_expr);
 
           }
  
@@ -1281,8 +1231,8 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
 
         }else if(strcmp(node_type, "DW_AT_MIPS_linkage_name:") == 0){
 
-          free(frame->name);
-          free(current_frame);
+          xbt_free(frame->name);
+          xbt_free(current_frame);
           frame->name = strdup(xbt_dynar_get_as(split, xbt_dynar_length(split) - 1, char *));   
           current_frame = strdup(frame->name);
           xbt_dict_set(subprograms_origin, subprogram_start, frame->name, NULL);
@@ -1300,9 +1250,9 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
         xbt_dict_set(*all_variables, frame->name, frame, NULL);
       }
 
-      free(subprogram_start);
+      xbt_free(subprogram_start);
       if(subprogram_end != NULL){
-        free(subprogram_end);
+        xbt_free(subprogram_end);
         subprogram_end = NULL;
       }
         
@@ -1382,6 +1332,7 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
               xbt_str_rtrim(loc_expr, ")");
               var->location = get_location(NULL, loc_expr);
               xbt_dynar_free(&split2);
+              xbt_free(loc_expr);
 
             }
 
@@ -1470,8 +1421,8 @@ void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_
   }
   
   xbt_dynar_free(&split);
-  free(line);
-  free(command);
+  xbt_free(line);
+  xbt_free(command);
   pclose(fp);
   
 }
@@ -1485,8 +1436,9 @@ static dw_location_t get_location(xbt_dict_t location_list, char *expr){
     char *key = bprintf("%d", (int)strtoul(expr, NULL, 16));
     loc->type = e_dw_loclist;
     loc->location.loclist =  (xbt_dynar_t)xbt_dict_get_or_null(location_list, key);
-    if(loc == NULL)
+    if(loc->location.loclist == NULL)
       XBT_INFO("Key not found in loclist");
+    xbt_free(key);
     return loc;
 
   }else{
@@ -1753,3 +1705,89 @@ void print_local_variables(xbt_dict_t list){
   }
 
 }
+
+static void MC_get_global_variables(char *elf_file){
+
+  FILE *fp;
+
+  char *command = bprintf("objdump -t -j .data -j .bss %s", elf_file);
+
+  fp = popen(command, "r");
+
+  if(fp == NULL){
+    perror("popen failed");
+    xbt_abort();
+  }
+
+  if(mc_global_variables == NULL)
+    mc_global_variables = xbt_dynar_new(sizeof(global_variable_t), global_variable_free_voidp);
+
+  char *line = NULL;
+  ssize_t read;
+  size_t n = 0;
+
+  xbt_dynar_t line_tokens = NULL;
+  unsigned long offset;
+
+  int type = strcmp(elf_file, xbt_binary_name); /* 0 = binary, other = libsimgrid */
+
+  while ((read = getline(&line, &n, fp)) != -1){
+
+    if(n == 0)
+      continue;
+
+     /* Wipeout the new line character */
+    line[read - 1] = '\0';
+
+    xbt_str_strip_spaces(line);
+    xbt_str_ltrim(line, NULL);
+
+    line_tokens = xbt_str_split(line, NULL);
+
+    if(xbt_dynar_length(line_tokens) <= 4 || strcmp(xbt_dynar_get_as(line_tokens, 0, char *), "SYMBOL") == 0)
+      continue;
+
+    if((strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), "__gcov", 6) == 0)
+       || (strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), "gcov", 4) == 0)
+       || (strcmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), ".data") == 0)
+       || (strcmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), ".bss") == 0)
+       || (strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), "stderr", 6) == 0)
+       || (strncmp(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*), "counter", 7) == 0)
+       || ((size_t)strtoul(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 2, char*), NULL, 16) == 0))
+      continue;
+
+    global_variable_t var = xbt_new0(s_global_variable_t, 1);
+
+    if(type == 0){
+      var->address = (void *)strtoul(xbt_dynar_get_as(line_tokens, 0, char*), NULL, 16);
+    }else{
+      offset = strtoul(xbt_dynar_get_as(line_tokens, 0, char*), NULL, 16);
+      var->address = (char *)start_text_libsimgrid+offset;
+    }
+
+    var->size = (size_t)strtoul(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 2, char*), NULL, 16);
+    var->name = strdup(xbt_dynar_get_as(line_tokens, xbt_dynar_length(line_tokens) - 1, char*));
+
+    if(data_bss_ignore_size(var->address) > 0)
+      global_variable_free(var);
+    else
+      xbt_dynar_push(mc_global_variables, &var);
+
+    xbt_dynar_free(&line_tokens);
+
+  }
+
+  xbt_free(command);
+  xbt_free(line);
+  pclose(fp);
+
+}
+
+void global_variable_free(global_variable_t v){
+  xbt_free(v->name);
+  xbt_free(v);
+}
+
+void global_variable_free_voidp(void *v){
+  global_variable_free((global_variable_t) * (void **) v);
+}
index 81f7120..8067a73 100644 (file)
@@ -41,7 +41,7 @@ int create_dump(int pair)
     if(wait(&status) < 0)
       perror("wait");
     if(WIFSIGNALED(status) && WCOREDUMP(status)){
-      char *core_name = malloc(20);
+      char *core_name = xbt_malloc(20);
       sprintf(core_name,"core_%d", pair); 
       rename("core", core_name);
       free(core_name);
@@ -51,141 +51,6 @@ int create_dump(int pair)
   return 0;
 }
 
-void MC_print_comparison_times_statistics(mc_comparison_times_t ct){
-
-  XBT_DEBUG("Comparisons done : %d", ct->nb_comparisons);
-  
-  double total, min, max;
-  unsigned int cursor;
-  
-  if(xbt_dynar_length(ct->chunks_used_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->chunks_used_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->chunks_used_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Chunks used comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->chunks_used_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->chunks_used_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->stacks_sizes_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->stacks_sizes_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->stacks_sizes_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Stacks sizes comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->stacks_sizes_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->stacks_sizes_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->program_data_segment_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->program_data_segment_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->program_data_segment_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Program data/bss segments comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->program_data_segment_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->program_data_segment_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->libsimgrid_data_segment_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->libsimgrid_data_segment_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->libsimgrid_data_segment_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Libsimgrid data/bss segments comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->libsimgrid_data_segment_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->libsimgrid_data_segment_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->heap_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->heap_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->heap_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->heap_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->heap_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->heap_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->heap_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->heap_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Heap comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->heap_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->heap_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->stacks_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->stacks_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->stacks_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Stacks comparison -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->stacks_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->stacks_comparison_times), max, min);
-  }
-
-  if(xbt_dynar_length(ct->snapshot_comparison_times) > 0){
-    cursor = 0;
-    total = 0.0;
-    max = 0.0;
-    min = xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double);
-    while(cursor < xbt_dynar_length(ct->snapshot_comparison_times) - 1){
-      total += xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double) > max)
-        max = xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double);
-      if(xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double) < min)
-        min = xbt_dynar_get_as(ct->snapshot_comparison_times, cursor, double);
-      cursor++;
-    }
-    XBT_DEBUG("Snapshot comparison (Whole funnel) -- Different states : %lu/%d, time (in seconds) : average = %lf, max = %lf, min = %lf", xbt_dynar_length(ct->snapshot_comparison_times), ct->nb_comparisons, total/xbt_dynar_length(ct->snapshot_comparison_times), max, min);
-  }
-
-}
-
-mc_comparison_times_t new_comparison_times(){
-  mc_comparison_times_t ct = NULL;
-  ct = xbt_new0(s_mc_comparison_times_t, 1);
-  ct->nb_comparisons = 0;
-  ct->snapshot_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->chunks_used_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->stacks_sizes_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->program_data_segment_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->libsimgrid_data_segment_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->heap_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  ct->stacks_comparison_times = xbt_dynar_new(sizeof(double), NULL);
-  return ct;
-}
-
 int reached(xbt_state_t st){
 
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
@@ -197,7 +62,6 @@ int reached(xbt_state_t st){
   new_pair->nb = xbt_dynar_length(reached_pairs) + 1;
   new_pair->automaton_state = st;
   new_pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
-  new_pair->comparison_times = new_comparison_times();
   new_pair->system_state = MC_take_snapshot();  
   
   /* Get values of propositional symbols */
@@ -237,7 +101,7 @@ int reached(xbt_state_t st){
         XBT_DEBUG("****** Pair reached #%d ******", pair_test->nb);
       if(automaton_state_compare(pair_test->automaton_state, st) == 0){
         if(propositional_symbols_compare_value(pair_test->prop_ato, new_pair->prop_ato) == 0){
-          if(snapshot_compare(new_pair->system_state, pair_test->system_state, new_pair->comparison_times, pair_test->comparison_times) == 0){
+          if(snapshot_compare(new_pair->system_state, pair_test->system_state) == 0){
             
             if(raw_mem_set)
               MC_SET_RAW_MEM;
@@ -245,17 +109,13 @@ int reached(xbt_state_t st){
               MC_UNSET_RAW_MEM;
             
             return 1;
-          }       
+          }
         }else{
           XBT_DEBUG("Different values of propositional symbols");
         }
       }else{
         XBT_DEBUG("Different automaton state");
       }
-      if(pair_test->comparison_times != NULL && XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
-        XBT_DEBUG("*** Comparison times statistics ***");
-        MC_print_comparison_times_statistics(pair_test->comparison_times);
-      }
     }
 
     /* New pair reached */
@@ -285,7 +145,6 @@ void set_pair_reached(xbt_state_t st){
   pair->nb = xbt_dynar_length(reached_pairs) + 1;
   pair->automaton_state = st;
   pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
-  pair->comparison_times = new_comparison_times();
   pair->system_state = MC_take_snapshot();
 
   /* Get values of propositional symbols */
@@ -311,7 +170,7 @@ void set_pair_reached(xbt_state_t st){
 
 int visited(xbt_state_t st){
 
-  if(_surf_mc_visited == 0)
+  if(_sg_mc_visited == 0)
     return 0;
 
   int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
@@ -361,7 +220,7 @@ int visited(xbt_state_t st){
         XBT_DEBUG("****** Pair visited #%d ******", cursor + 1);
       if(automaton_state_compare(pair_test->automaton_state, st) == 0){
         if(propositional_symbols_compare_value(pair_test->prop_ato, new_pair->prop_ato) == 0){
-          if(snapshot_compare(new_pair->system_state, pair_test->system_state, NULL, NULL) == 0){
+          if(snapshot_compare(new_pair->system_state, pair_test->system_state) == 0){
             if(raw_mem_set)
               MC_SET_RAW_MEM;
             else
@@ -377,7 +236,7 @@ int visited(xbt_state_t st){
       }
     }
 
-    if(xbt_dynar_length(visited_pairs) == _surf_mc_visited){
+    if(xbt_dynar_length(visited_pairs) == _sg_mc_visited){
       xbt_dynar_remove_at(visited_pairs, 0, NULL);
     }
 
@@ -480,15 +339,6 @@ void pair_reached_free(mc_pair_reached_t pair){
   if(pair){
     pair->automaton_state = NULL;
     xbt_dynar_free(&(pair->prop_ato));
-    if(pair->comparison_times != NULL){
-      xbt_dynar_free(&(pair->comparison_times->snapshot_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->chunks_used_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->stacks_sizes_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->program_data_segment_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->libsimgrid_data_segment_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->heap_comparison_times));
-      xbt_dynar_free(&(pair->comparison_times->stacks_comparison_times));
-    }
     MC_free_snapshot(pair->system_state);
     xbt_free(pair);
   }
@@ -618,7 +468,7 @@ void MC_ddfs(int search_cycle){
   mc_pair_stateless_t remove_pair;
   mc_pair_reached_t remove_pair_reached;
   
-  if(xbt_fifo_size(mc_stack_liveness) < _surf_mc_max_depth){
+  if(xbt_fifo_size(mc_stack_liveness) < _sg_mc_max_depth){
 
     if(current_pair->requests > 0){
 
@@ -923,7 +773,7 @@ void MC_ddfs(int search_cycle){
     
   }
 
-  if(xbt_fifo_size(mc_stack_liveness) == _surf_mc_max_depth ){
+  if(xbt_fifo_size(mc_stack_liveness) == _sg_mc_max_depth ){
     XBT_DEBUG("Pair (depth = %d) shifted in stack, maximum depth reached", xbt_fifo_size(mc_stack_liveness) );
   }else{
     XBT_DEBUG("Pair (depth = %d) shifted in stack", xbt_fifo_size(mc_stack_liveness) );
index f275b3a..f104773 100644 (file)
@@ -24,9 +24,14 @@ void MC_memory_init()
   std_heap = mmalloc_get_default_md();
   xbt_assert(std_heap != NULL);
 
+#if defined HAVE_GNU_LD && !defined MMALLOC_WANT_OVERRIDE_LEGACY 
+  /* use the system malloc for the model-checker data */
+  raw_heap = NULL;
+#else
   /* Create the second region a page after the first one ends + safety gap */
   raw_heap = xbt_mheap_new(-1, (char*)(std_heap) + STD_HEAP_SIZE + getpagesize());
   xbt_assert(raw_heap != NULL);
+#endif
 }
 
 /* Finalize the memory subsystem */
index fcf5333..bf29aa9 100644 (file)
@@ -24,6 +24,8 @@
 
 /****************************** Snapshots ***********************************/
 
+#define nb_regions 3 /* binary data (data + BSS), libsimgrid data (data + BSS), std_heap */ 
+
 typedef struct s_mc_mem_region{
   int type;
   void *start_addr;
@@ -33,8 +35,12 @@ typedef struct s_mc_mem_region{
 
 typedef struct s_mc_snapshot{
   unsigned int num_reg;
+  int region_type[nb_regions];
+  size_t heap_chunks_used;
   mc_mem_region_t *regions;
+  size_t *stack_sizes;
   xbt_dynar_t stacks;
+  int nb_processes;
 } s_mc_snapshot_t, *mc_snapshot_t;
 
 typedef struct s_mc_snapshot_stack{
@@ -48,6 +54,7 @@ typedef struct s_mc_global_t{
 }s_mc_global_t, *mc_global_t;
 
 //void MC_take_snapshot(mc_snapshot_t);
+mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall);
 mc_snapshot_t MC_take_snapshot(void);
 void MC_restore_snapshot(mc_snapshot_t);
 void MC_free_snapshot(mc_snapshot_t);
@@ -203,7 +210,32 @@ extern void *start_plt_libsimgrid;
 extern void *end_plt_libsimgrid;
 extern void *start_plt_binary;
 extern void *end_plt_binary;
+extern void *start_got_plt_libsimgrid;
+extern void *end_got_plt_libsimgrid;
+extern void *start_got_plt_binary;
+extern void *end_got_plt_binary;
+
+/********************************** Snapshot comparison **********************************/
+
+typedef struct s_mc_comparison_times{
+  double nb_processes_comparison_time;
+  double chunks_used_comparison_time;
+  double stacks_sizes_comparison_time;
+  double binary_global_variables_comparison_time;
+  double libsimgrid_global_variables_comparison_time;
+  double heap_comparison_time;
+  double stacks_comparison_time;
+}s_mc_comparison_times_t, *mc_comparison_times_t;
+
+extern mc_comparison_times_t mc_comp_times;
+extern double mc_snapshot_comparison_time;
 
+int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2);
+int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
+void print_comparison_times(void);
+
+//#define MC_DEBUG 1
+//#define MC_VERBOSE 1
 
 /********************************** DPOR for safety  **************************************/
 typedef enum {
@@ -220,6 +252,11 @@ void MC_dpor(void);
 void MC_dpor_exit(void);
 void MC_init(void);
 
+typedef struct s_mc_safety_visited_state{
+  mc_snapshot_t system_state;
+  int num;
+}s_mc_safety_visited_state_t, *mc_safety_visited_state_t;
+
 
 /********************************** Double-DFS for liveness property**************************************/
 
@@ -237,23 +274,11 @@ typedef struct s_mc_pair{
   xbt_state_t automaton_state;
 }s_mc_pair_t, *mc_pair_t;
 
-typedef struct s_mc_comparison_times{
-  int nb_comparisons;
-  xbt_dynar_t snapshot_comparison_times;
-  xbt_dynar_t chunks_used_comparison_times;
-  xbt_dynar_t stacks_sizes_comparison_times;
-  xbt_dynar_t program_data_segment_comparison_times;
-  xbt_dynar_t libsimgrid_data_segment_comparison_times;
-  xbt_dynar_t heap_comparison_times;
-  xbt_dynar_t stacks_comparison_times;
-}s_mc_comparison_times_t, *mc_comparison_times_t;
-
 typedef struct s_mc_pair_reached{
   int nb;
   xbt_state_t automaton_state;
   xbt_dynar_t prop_ato;
   mc_snapshot_t system_state;
-  mc_comparison_times_t comparison_times;
 }s_mc_pair_reached_t, *mc_pair_reached_t;
 
 typedef struct s_mc_pair_visited{
@@ -264,12 +289,11 @@ typedef struct s_mc_pair_visited{
 
 int MC_automaton_evaluate_label(xbt_exp_label_t l);
 mc_pair_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st);
-mc_comparison_times_t new_comparison_times(void);
 
 int reached(xbt_state_t st);
 void set_pair_reached(xbt_state_t st);
 int visited(xbt_state_t st);
-int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t ct1, mc_comparison_times_t ct2);
+
 void MC_pair_delete(mc_pair_t pair);
 void MC_exit_liveness(void);
 mc_state_t MC_state_pair_new(void);
@@ -279,7 +303,8 @@ void pair_visited_free(mc_pair_visited_t pair);
 void pair_visited_free_voidp(void *p);
 void MC_init_liveness(void);
 void MC_init_memory_map_info(void);
-void MC_print_comparison_times_statistics(mc_comparison_times_t ct);
+
+int get_heap_region_index(mc_snapshot_t s);
 
 /* **** Double-DFS stateless **** */
 
@@ -300,12 +325,6 @@ void pair_stateless_free_voidp(void *p);
 /********************************** Configuration of MC **************************************/
 extern xbt_fifo_t mc_stack_safety;
 
-extern int _surf_mc_checkpoint;
-extern char* _surf_mc_property_file;
-extern int _surf_mc_timeout;
-extern int _surf_mc_max_depth;
-extern int _surf_mc_visited;
-
 /****** Core dump ******/
 
 int create_dump(int pair);
@@ -402,9 +421,25 @@ typedef struct s_variable_value{
   }value;
 }s_variable_value_t, *variable_value_t;
 
+void variable_value_free_voidp(void* v);
+void variable_value_free(variable_value_t v);
+
 void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_dict_t *variables);
 void print_local_variables(xbt_dict_t list);
 char *get_libsimgrid_path(void);
 xbt_dict_t MC_get_location_list(const char *elf_file);
 
+/**** Global variables ****/
+
+typedef struct s_global_variable{
+  char *name;
+  size_t size;
+  void *address;
+}s_global_variable_t, *global_variable_t;
+
+void global_variable_free(global_variable_t v);
+void global_variable_free_voidp(void *v);
+
+extern xbt_dynar_t mc_global_variables;
+
 #endif
index 332e857..1033bfc 100644 (file)
@@ -24,41 +24,41 @@ int MC_request_depend(smx_simcall_t r1, smx_simcall_t r2) {
   if(r1->call == SIMCALL_COMM_IRECV && r2->call == SIMCALL_COMM_ISEND)
     return FALSE;
 
-  if(   (r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
+  /*if(   (r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
         &&  r2->call == SIMCALL_COMM_WAIT){
 
-    if(r2->comm_wait.comm->comm.rdv == NULL)
+    if(simcall_comm_wait__get__comm(r2)->comm.rdv == NULL)
       return FALSE;
 
-    smx_rdv_t rdv = r1->call == SIMCALL_COMM_ISEND ? r1->comm_isend.rdv : r1->comm_irecv.rdv;
+    smx_rdv_t rdv = r1->call == SIMCALL_COMM_ISEND ? simcall_comm_isend__get__rdv(r1) : simcall_comm_irecv__get__rdv(r1);
 
-    if(r2->comm_wait.comm->comm.rdv != rdv)
+    if(simcall_comm_wait__get__comm(r2)->comm.rdv != rdv)
       return FALSE;
 
-    if(r2->comm_wait.comm->comm.type == SIMIX_COMM_SEND && r1->call == SIMCALL_COMM_ISEND)
+    if(simcall_comm_wait__get__comm(r2)->comm.type == SIMIX_COMM_SEND && r1->call == SIMCALL_COMM_ISEND)
       return FALSE;
 
-    if(r2->comm_wait.comm->comm.type == SIMIX_COMM_RECEIVE && r1->call == SIMCALL_COMM_IRECV)
+    if(simcall_comm_wait__get__comm(r2)->comm.type == SIMIX_COMM_RECEIVE && r1->call == SIMCALL_COMM_IRECV)
       return FALSE;
   }
 
   if(   (r2->call == SIMCALL_COMM_ISEND || r2->call == SIMCALL_COMM_IRECV)
         &&  r1->call == SIMCALL_COMM_WAIT){
 
-    if(r1->comm_wait.comm->comm.rdv != NULL)
+    if(simcall_comm_wait__get__comm(r1)->comm.rdv != NULL)
       return FALSE;
 
-    smx_rdv_t rdv = r2->call == SIMCALL_COMM_ISEND ? r2->comm_isend.rdv : r2->comm_irecv.rdv;
+    smx_rdv_t rdv = r2->call == SIMCALL_COMM_ISEND ? simcall_comm_isend__get__rdv(r2) : simcall_comm_irecv__get__rdv(r2);
 
-    if(r1->comm_wait.comm->comm.rdv != rdv)
+    if(simcall_comm_wait__get__comm(r1)->comm.rdv != rdv)
       return FALSE;
 
-    if(r1->comm_wait.comm->comm.type == SIMIX_COMM_SEND && r2->call == SIMCALL_COMM_ISEND)
+    if(simcall_comm_wait__get__comm(r1)->comm.type == SIMIX_COMM_SEND && r2->call == SIMCALL_COMM_ISEND)
       return FALSE;
 
-    if(r1->comm_wait.comm->comm.type == SIMIX_COMM_RECEIVE && r2->call == SIMCALL_COMM_IRECV)
+    if(simcall_comm_wait__get__comm(r1)->comm.type == SIMIX_COMM_RECEIVE && r2->call == SIMCALL_COMM_IRECV)
       return FALSE;
-  }
+      }*/
 
   /* FIXME: the following rule assumes that the result of the
    * isend/irecv call is not stored in a buffer used in the
@@ -75,78 +75,78 @@ int MC_request_depend(smx_simcall_t r1, smx_simcall_t r2) {
         return FALSE;*/
 
   if(r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_ISEND
-     && r1->comm_isend.rdv != r2->comm_isend.rdv)
+     && simcall_comm_isend__get__rdv(r1) != simcall_comm_isend__get__rdv(r2))
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_IRECV && r2->call == SIMCALL_COMM_IRECV
-     && r1->comm_irecv.rdv != r2->comm_irecv.rdv)
+     && simcall_comm_irecv__get__rdv(r1) != simcall_comm_irecv__get__rdv(r2))
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_WAIT && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST)
-     && (r1->comm_wait.comm->comm.src_proc == NULL
-         || r1->comm_wait.comm->comm.dst_proc == NULL))
+     && (simcall_comm_wait__get__comm(r1)->comm.src_proc == NULL
+         || simcall_comm_wait__get__comm(r1)->comm.dst_proc == NULL))
     return FALSE;
 
   if(r2->call == SIMCALL_COMM_WAIT && (r1->call == SIMCALL_COMM_WAIT || r1->call == SIMCALL_COMM_TEST)
-     && (r2->comm_wait.comm->comm.src_proc == NULL
-         || r2->comm_wait.comm->comm.dst_proc == NULL))
+     && (simcall_comm_wait__get__comm(r2)->comm.src_proc == NULL
+         || simcall_comm_wait__get__comm(r2)->comm.dst_proc == NULL))
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_WAIT
-     && r1->comm_wait.comm->comm.src_buff == r2->comm_wait.comm->comm.src_buff
-     && r1->comm_wait.comm->comm.dst_buff == r2->comm_wait.comm->comm.dst_buff)
+     && simcall_comm_wait__get__comm(r1)->comm.src_buff == simcall_comm_wait__get__comm(r2)->comm.src_buff
+     && simcall_comm_wait__get__comm(r1)->comm.dst_buff == simcall_comm_wait__get__comm(r2)->comm.dst_buff)
     return FALSE;
 
   if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_WAIT
-      && r1->comm_wait.comm->comm.src_buff != NULL
-      && r1->comm_wait.comm->comm.dst_buff != NULL
-      && r2->comm_wait.comm->comm.src_buff != NULL
-      && r2->comm_wait.comm->comm.dst_buff != NULL
-      && r1->comm_wait.comm->comm.dst_buff != r2->comm_wait.comm->comm.src_buff
-      && r1->comm_wait.comm->comm.dst_buff != r2->comm_wait.comm->comm.dst_buff
-      && r2->comm_wait.comm->comm.dst_buff != r1->comm_wait.comm->comm.src_buff)
+      && simcall_comm_wait__get__comm(r1)->comm.src_buff != NULL
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != NULL
+      && simcall_comm_wait__get__comm(r2)->comm.src_buff != NULL
+      && simcall_comm_wait__get__comm(r2)->comm.dst_buff != NULL
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != simcall_comm_wait__get__comm(r2)->comm.src_buff
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != simcall_comm_wait__get__comm(r2)->comm.dst_buff
+      && simcall_comm_wait__get__comm(r2)->comm.dst_buff != simcall_comm_wait__get__comm(r1)->comm.src_buff)
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_TEST &&
-     (r1->comm_test.comm == NULL
-      || r1->comm_test.comm->comm.src_buff == NULL
-      || r1->comm_test.comm->comm.dst_buff == NULL))
+     (simcall_comm_test__get__comm(r1) == NULL
+      || simcall_comm_test__get__comm(r1)->comm.src_buff == NULL
+      || simcall_comm_test__get__comm(r1)->comm.dst_buff == NULL))
     return FALSE;
 
   if(r2->call == SIMCALL_COMM_TEST &&
-     (r2->comm_test.comm == NULL
-      || r2->comm_test.comm->comm.src_buff == NULL
-      || r2->comm_test.comm->comm.dst_buff == NULL))
+     (simcall_comm_test__get__comm(r2) == NULL
+      || simcall_comm_test__get__comm(r2)->comm.src_buff == NULL
+      || simcall_comm_test__get__comm(r2)->comm.dst_buff == NULL))
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT
-     && r1->comm_test.comm->comm.src_buff == r2->comm_wait.comm->comm.src_buff
-     && r1->comm_test.comm->comm.dst_buff == r2->comm_wait.comm->comm.dst_buff)
+     && simcall_comm_test__get__comm(r1)->comm.src_buff == simcall_comm_wait__get__comm(r2)->comm.src_buff
+     && simcall_comm_test__get__comm(r1)->comm.dst_buff == simcall_comm_wait__get__comm(r2)->comm.dst_buff)
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST
-     && r1->comm_wait.comm->comm.src_buff == r2->comm_test.comm->comm.src_buff
-     && r1->comm_wait.comm->comm.dst_buff == r2->comm_test.comm->comm.dst_buff)
+     && simcall_comm_wait__get__comm(r1)->comm.src_buff == simcall_comm_test__get__comm(r2)->comm.src_buff
+     && simcall_comm_wait__get__comm(r1)->comm.dst_buff == simcall_comm_test__get__comm(r2)->comm.dst_buff)
     return FALSE;
 
   if (r1->call == SIMCALL_COMM_WAIT && r2->call == SIMCALL_COMM_TEST
-      && r1->comm_wait.comm->comm.src_buff != NULL
-      && r1->comm_wait.comm->comm.dst_buff != NULL
-      && r2->comm_test.comm->comm.src_buff != NULL
-      && r2->comm_test.comm->comm.dst_buff != NULL
-      && r1->comm_wait.comm->comm.dst_buff != r2->comm_test.comm->comm.src_buff
-      && r1->comm_wait.comm->comm.dst_buff != r2->comm_test.comm->comm.dst_buff
-      && r2->comm_test.comm->comm.dst_buff != r1->comm_wait.comm->comm.src_buff)
+      && simcall_comm_wait__get__comm(r1)->comm.src_buff != NULL
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != NULL
+      && simcall_comm_test__get__comm(r2)->comm.src_buff != NULL
+      && simcall_comm_test__get__comm(r2)->comm.dst_buff != NULL
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != simcall_comm_test__get__comm(r2)->comm.src_buff
+      && simcall_comm_wait__get__comm(r1)->comm.dst_buff != simcall_comm_test__get__comm(r2)->comm.dst_buff
+      && simcall_comm_test__get__comm(r2)->comm.dst_buff != simcall_comm_wait__get__comm(r1)->comm.src_buff)
     return FALSE;
 
   if (r1->call == SIMCALL_COMM_TEST && r2->call == SIMCALL_COMM_WAIT
-      && r1->comm_test.comm->comm.src_buff != NULL
-      && r1->comm_test.comm->comm.dst_buff != NULL
-      && r2->comm_wait.comm->comm.src_buff != NULL
-      && r2->comm_wait.comm->comm.dst_buff != NULL
-      && r1->comm_test.comm->comm.dst_buff != r2->comm_wait.comm->comm.src_buff
-      && r1->comm_test.comm->comm.dst_buff != r2->comm_wait.comm->comm.dst_buff
-      && r2->comm_wait.comm->comm.dst_buff != r1->comm_test.comm->comm.src_buff)
+      && simcall_comm_test__get__comm(r1)->comm.src_buff != NULL
+      && simcall_comm_test__get__comm(r1)->comm.dst_buff != NULL
+      && simcall_comm_wait__get__comm(r2)->comm.src_buff != NULL
+      && simcall_comm_wait__get__comm(r2)->comm.dst_buff != NULL
+      && simcall_comm_test__get__comm(r1)->comm.dst_buff != simcall_comm_wait__get__comm(r2)->comm.src_buff
+      && simcall_comm_test__get__comm(r1)->comm.dst_buff != simcall_comm_wait__get__comm(r2)->comm.dst_buff
+      && simcall_comm_wait__get__comm(r2)->comm.dst_buff != simcall_comm_test__get__comm(r1)->comm.src_buff)
     return FALSE;
 
 
@@ -177,21 +177,21 @@ char *MC_request_to_string(smx_simcall_t req, int value)
   size_t size = 0;
 
   switch(req->call){
-  case SIMCALL_COMM_ISEND:
+    case SIMCALL_COMM_ISEND:
     type = xbt_strdup("iSend");
-    p = pointer_to_string(req->comm_isend.src_buff);
-    bs = buff_size_to_string(req->comm_isend.src_buff_size);
+    p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
+    bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
     args = bprintf("src=%s, buff=%s, size=%s", req->issuer->name, p, bs);
     break;
   case SIMCALL_COMM_IRECV:
-    size = req->comm_irecv.dst_buff_size ? *req->comm_irecv.dst_buff_size : 0;
+    size = simcall_comm_irecv__get__dst_buff_size(req) ? *simcall_comm_irecv__get__dst_buff_size(req) : 0;
     type = xbt_strdup("iRecv");
-    p = pointer_to_string(req->comm_irecv.dst_buff); 
+    p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req)); 
     bs = buff_size_to_string(size);
     args = bprintf("dst=%s, buff=%s, size=%s", req->issuer->name, p, bs);
     break;
   case SIMCALL_COMM_WAIT:
-    act = req->comm_wait.comm;
+    act = simcall_comm_wait__get__comm(req);
     if(value == -1){
       type = xbt_strdup("WaitTimeout");
       p = pointer_to_string(act);
@@ -207,7 +207,7 @@ char *MC_request_to_string(smx_simcall_t req, int value)
     }
     break;
   case SIMCALL_COMM_TEST:
-    act = req->comm_test.comm;
+    act = simcall_comm_test__get__comm(req);
     if(act->comm.src_proc == NULL || act->comm.dst_proc == NULL){
       type = xbt_strdup("Test FALSE");
       p = pointer_to_string(act);
@@ -223,9 +223,9 @@ char *MC_request_to_string(smx_simcall_t req, int value)
 
   case SIMCALL_COMM_WAITANY:
     type = xbt_strdup("WaitAny");
-    p = pointer_to_string(xbt_dynar_get_as(req->comm_waitany.comms, value, smx_action_t));
+    p = pointer_to_string(xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t));
     args = bprintf("comm=%s (%d of %lu)", p,
-                   value+1, xbt_dynar_length(req->comm_waitany.comms));
+                   value+1, xbt_dynar_length(simcall_comm_waitany__get__comms(req)));
     break;
 
   case SIMCALL_COMM_TESTANY:
@@ -234,7 +234,7 @@ char *MC_request_to_string(smx_simcall_t req, int value)
       args = xbt_strdup("-");
     }else{
       type = xbt_strdup("TestAny");
-      args = bprintf("(%d of %lu)", value+1, xbt_dynar_length(req->comm_testany.comms));
+      args = bprintf("(%d of %lu)", value+1, xbt_dynar_length(simcall_comm_testany__get__comms(req)));
     }
     break;
 
@@ -265,7 +265,7 @@ unsigned int MC_request_testany_fail(smx_simcall_t req)
   unsigned int cursor;
   smx_action_t action;
 
-  xbt_dynar_foreach(req->comm_testany.comms, cursor, action){
+  xbt_dynar_foreach(simcall_comm_testany__get__comms(req), cursor, action){
     if(action->comm.src_proc && action->comm.dst_proc)
       return FALSE;
   }
@@ -298,22 +298,22 @@ int MC_request_is_enabled(smx_simcall_t req)
     /* If it has a timeout it will be always be enabled, because even if the
      * communication is not ready, it can timeout and won't block.
      * On the other hand if it hasn't a timeout, check if the comm is ready.*/
-    if(req->comm_wait.timeout >= 0){
-      if(_surf_mc_timeout == 1){
+    if(simcall_comm_wait__get__timeout(req) >= 0){
+      if(_sg_mc_timeout == 1){
         return TRUE;
       }else{
-        act = req->comm_wait.comm;
+        act = simcall_comm_wait__get__comm(req);
         return (act->comm.src_proc && act->comm.dst_proc);
       }
     }else{
-      act = req->comm_wait.comm;
+      act = simcall_comm_wait__get__comm(req);
       return (act->comm.src_proc && act->comm.dst_proc);
     }
     break;
 
   case SIMCALL_COMM_WAITANY:
     /* Check if it has at least one communication ready */
-    xbt_dynar_foreach(req->comm_waitany.comms, index, act) {
+    xbt_dynar_foreach(simcall_comm_waitany__get__comms(req), index, act) {
       if (act->comm.src_proc && act->comm.dst_proc){
         return TRUE;
       }
@@ -335,17 +335,17 @@ int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
 
   case SIMCALL_COMM_WAIT:
     /* FIXME: check also that src and dst processes are not suspended */
-    act = req->comm_wait.comm;
+    act = simcall_comm_wait__get__comm(req);
     return (act->comm.src_proc && act->comm.dst_proc);
     break;
 
   case SIMCALL_COMM_WAITANY:
-    act = xbt_dynar_get_as(req->comm_waitany.comms, idx, smx_action_t);
+    act = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), idx, smx_action_t);
     return (act->comm.src_proc && act->comm.dst_proc);
     break;
 
   case SIMCALL_COMM_TESTANY:
-    act = xbt_dynar_get_as(req->comm_testany.comms, idx, smx_action_t);
+    act = xbt_dynar_get_as(simcall_comm_testany__get__comms(req), idx, smx_action_t);
     return (act->comm.src_proc && act->comm.dst_proc);
     break;
 
index 39eef8a..4d41ba1 100644 (file)
@@ -41,6 +41,8 @@ mc_state_t MC_state_pair_new(void)
  */
 void MC_state_delete(mc_state_t state)
 {
+  if(state->system_state)
+    MC_free_snapshot(state->system_state);
   xbt_free(state->proc_status);
   xbt_free(state);
 }
@@ -85,9 +87,9 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int valu
     case SIMCALL_COMM_WAITANY:
       state->internal_req.call = SIMCALL_COMM_WAIT;
       state->internal_req.issuer = req->issuer;
-      state->internal_comm = *xbt_dynar_get_as(req->comm_waitany.comms, value, smx_action_t);
-      state->internal_req.comm_wait.comm = &state->internal_comm;
-      state->internal_req.comm_wait.timeout = 0;
+      state->internal_comm = *xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t);
+      simcall_comm_wait__set__comm(&state->internal_req, &state->internal_comm);
+      simcall_comm_wait__set__timeout(&state->internal_req, 0);
       break;
 
     case SIMCALL_COMM_TESTANY:
@@ -95,24 +97,24 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int valu
       state->internal_req.issuer = req->issuer;
 
       if(value > 0)
-        state->internal_comm = *xbt_dynar_get_as(req->comm_testany.comms, value, smx_action_t);
+        state->internal_comm = *xbt_dynar_get_as(simcall_comm_testany__get__comms(req), value, smx_action_t);
 
-      state->internal_req.comm_wait.comm = &state->internal_comm;
-      state->internal_req.comm_test.result = value;
+      simcall_comm_test__set__comm(&state->internal_req, &state->internal_comm);
+      simcall_comm_test__set__result(&state->internal_req, value);
       break;
 
     case SIMCALL_COMM_WAIT:
       state->internal_req = *req;
-      state->internal_comm = *(req->comm_wait.comm);
-      state->executed_req.comm_wait.comm = &state->internal_comm;
-      state->internal_req.comm_wait.comm = &state->internal_comm;
+      state->internal_comm = *(simcall_comm_wait__get__comm(req));
+      simcall_comm_wait__set__comm(&state->executed_req, &state->internal_comm);
+      simcall_comm_wait__set__comm(&state->internal_req, &state->internal_comm);
       break;
 
     case SIMCALL_COMM_TEST:
       state->internal_req = *req;
-      state->internal_comm = *req->comm_test.comm;
-      state->executed_req.comm_test.comm = &state->internal_comm;
-      state->internal_req.comm_test.comm = &state->internal_comm;
+      state->internal_comm = *simcall_comm_test__get__comm(req);
+      simcall_comm_test__set__comm(&state->executed_req, &state->internal_comm);
+      simcall_comm_test__set__comm(&state->internal_req, &state->internal_comm);
       break;
 
     default:
@@ -146,14 +148,14 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
         switch(process->simcall.call){
           case SIMCALL_COMM_WAITANY:
             *value = -1;
-            while(procstate->interleave_count < xbt_dynar_length(process->simcall.comm_waitany.comms)){
+            while(procstate->interleave_count < xbt_dynar_length(simcall_comm_waitany__get__comms(&process->simcall))){
               if(MC_request_is_enabled_by_idx(&process->simcall, procstate->interleave_count++)){
                 *value = procstate->interleave_count-1;
                 break;
               }
             }
 
-            if(procstate->interleave_count >= xbt_dynar_length(process->simcall.comm_waitany.comms))
+            if(procstate->interleave_count >= xbt_dynar_length(simcall_comm_waitany__get__comms(&process->simcall)))
               procstate->state = MC_DONE;
 
             if(*value != -1)
@@ -164,14 +166,14 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
           case SIMCALL_COMM_TESTANY:
             start_count = procstate->interleave_count;
             *value = -1;
-            while(procstate->interleave_count < xbt_dynar_length(process->simcall.comm_testany.comms)){
+            while(procstate->interleave_count < xbt_dynar_length(simcall_comm_testany__get__comms(&process->simcall))){
               if(MC_request_is_enabled_by_idx(&process->simcall, procstate->interleave_count++)){
                 *value = procstate->interleave_count - 1;
                 break;
               }
             }
 
-            if(procstate->interleave_count >= xbt_dynar_length(process->simcall.comm_testany.comms))
+            if(procstate->interleave_count >= xbt_dynar_length(simcall_comm_testany__get__comms(&process->simcall)))
               procstate->state = MC_DONE;
 
             if(*value != -1 || start_count == 0)
@@ -180,8 +182,8 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
             break;
 
           case SIMCALL_COMM_WAIT:
-            if(process->simcall.comm_wait.comm->comm.src_proc
-               && process->simcall.comm_wait.comm->comm.dst_proc){
+            if(simcall_comm_wait__get__comm(&process->simcall)->comm.src_proc
+               && simcall_comm_wait__get__comm(&process->simcall)->comm.dst_proc){
               *value = 0;
             }else{
               *value = -1;
similarity index 98%
rename from src/instr/instr_msg_process.c
rename to src/msg/instr_msg_process.c
index 29d321b..dba5b6b 100644 (file)
@@ -4,9 +4,12 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/instr_private.h"
+#include "msg_private.h"
 #include "mc/mc.h"
 
+#include "msg/datatypes.h"
+#include "simix/smx_process_private.h"
+
 #ifdef HAVE_TRACING
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_process, instr, "MSG process");
similarity index 99%
rename from src/instr/instr_msg_task.c
rename to src/msg/instr_msg_task.c
index 39da9d7..52acde4 100644 (file)
@@ -5,8 +5,11 @@
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "instr/instr_private.h"
+#include "msg_private.h"
+#include "msg/datatypes.h"
 #include "mc/mc.h"
 
+
 #ifdef HAVE_TRACING
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg, instr, "MSG");
similarity index 99%
rename from src/instr/instr_msg_vm.c
rename to src/msg/instr_msg_vm.c
index afbd528..73581c5 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 "instr/instr_private.h"
+#include "msg_private.h"
 
 #ifdef HAVE_TRACING
 
index 75ea78e..d8f2a72 100644 (file)
@@ -11,6 +11,8 @@
 #include "xbt/dynar.h"
 #include "xbt/replay.h"
 
+#include <errno.h>
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg,
                                 "MSG actions for trace driven simulation");
 
diff --git a/src/msg/msg_config.c b/src/msg/msg_config.c
deleted file mode 100644 (file)
index 31bed56..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (c) 2005, 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. */
-
-#include "msg_private.h"
-#include "xbt/sysdep.h"
-#include "xbt/log.h"
-#include "simgrid/simix.h"
-
-/** \brief set a configuration variable
- *
- * Do --help on any simgrid binary to see the list of currently existing configuration variables
- *
- * Example:
- * MSG_config("workstation/model","KCCFLN05");
- */
-void MSG_config(const char *name, ...)
-{
-  va_list pa;
-
-  if (!msg_global) {
-    fprintf(stderr,
-            "ERROR: Please call MSG_init() before using MSG_config()\n");
-    xbt_abort();
-  }
-  va_start(pa, name);
-  xbt_cfg_set_vargs(_surf_cfg_set, name, pa);
-  va_end(pa);
-  return;
-}
index eb889cb..0eb3952 100644 (file)
@@ -7,7 +7,7 @@
 #include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
-#include "xbt/dict.h"
+
 #ifdef HAVE_LUA
 #include <lua.h>
 #include <lauxlib.h>
index 81abae0..f40bf21 100644 (file)
@@ -1,9 +1,9 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2004-2012. 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 "instr/instr_interface.h"
 #include "msg_private.h"
 #include "msg_mailbox.h"
 #include "mc/mc.h"
@@ -12,6 +12,8 @@
 #include "xbt/virtu.h"
 #include "xbt/ex.h"             /* ex_backtrace_display */
 #include "xbt/replay.h"
+#include "simgrid/sg_config.h" /* Configuration mechanism of SimGrid */
+
 
 XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg,
@@ -127,6 +129,20 @@ msg_error_t MSG_main(void)
   return MSG_OK;
 }
 
+/** \ingroup msg_simulation
+ * \brief set a configuration variable
+ *
+ * Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
+ *
+ * Example:
+ * MSG_config("workstation/model","KCCFLN05");
+ */
+void MSG_config(const char *key, const char *value){
+  xbt_assert(msg_global,"ERROR: Please call MSG_init() before using MSG_config()");
+  xbt_cfg_set_as_string(_sg_cfg_set, key, value);
+}
+
+
 /** \ingroup msg_simulation
  * \brief Kill all running process
 
@@ -152,7 +168,7 @@ static void MSG_exit(void) {
     return;
 
 #ifdef HAVE_TRACING
-  TRACE_surf_release();
+  TRACE_surf_resource_utilization_release();
 #endif
 
   /* initialization of the action module */
index 165371c..7edcb02 100644 (file)
@@ -155,5 +155,44 @@ void _MSG_action_exit(void);
 
 void MSG_post_create_environment(void);
 
+/********** Tracing **********/
+/* declaration of instrumentation functions from msg_task_instr.c */
+void TRACE_msg_set_task_category(msg_task_t task, const char *category);
+void TRACE_msg_task_create(msg_task_t task);
+void TRACE_msg_task_execute_start(msg_task_t task);
+void TRACE_msg_task_execute_end(msg_task_t task);
+void TRACE_msg_task_destroy(msg_task_t task);
+void TRACE_msg_task_get_start(void);
+void TRACE_msg_task_get_end(double start_time, msg_task_t task);
+int TRACE_msg_task_put_start(msg_task_t task);    //returns TRUE if the task_put_end must be called
+void TRACE_msg_task_put_end(void);
+
+/* declaration of instrumentation functions from msg_process_instr.c */
+char *instr_process_id (msg_process_t proc, char *str, int len);
+char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len);
+void TRACE_msg_process_change_host(msg_process_t process, msg_host_t old_host,
+                                   msg_host_t new_host);
+void TRACE_msg_process_create (const char *process_name, int process_pid, msg_host_t host);
+void TRACE_msg_process_destroy (const char *process_name, int process_pid, msg_host_t host);
+void TRACE_msg_process_kill(msg_process_t process);
+void TRACE_msg_process_suspend(msg_process_t process);
+void TRACE_msg_process_resume(msg_process_t process);
+void TRACE_msg_process_sleep_in(msg_process_t process);   //called from msg/gos.c
+void TRACE_msg_process_sleep_out(msg_process_t process);
+void TRACE_msg_process_end(msg_process_t process);
+
+/* declaration of instrumentation functions from instr_msg_vm.c */
+char *instr_vm_id (msg_vm_t vm, char *str, int len);
+char *instr_vm_id_2 (const char *vm_name, char *str, int len);
+void TRACE_msg_vm_change_host(msg_vm_t vm, msg_host_t old_host,
+                                   msg_host_t new_host);
+void TRACE_msg_vm_create (const char *vm_name, msg_host_t host);
+void TRACE_msg_vm_kill(msg_vm_t process);
+void TRACE_msg_vm_suspend(msg_vm_t vm);
+void TRACE_msg_vm_resume(msg_vm_t vm);
+void TRACE_msg_vm_sleep_in(msg_vm_t vm);
+void TRACE_msg_vm_sleep_out(msg_vm_t vm);
+void TRACE_msg_vm_end(msg_vm_t vm);
+
 SG_END_DECL()
 #endif
index b280a7c..013c4f1 100644 (file)
@@ -298,7 +298,7 @@ msg_error_t MSG_task_destroy(msg_task_t task)
  */
 msg_error_t MSG_task_cancel(msg_task_t task)
 {
-  xbt_assert((task != NULL), "Invalid parameter");
+  xbt_assert((task != NULL), "Cannot cancel a NULL task");
 
   if (task->simdata->compute) {
     simcall_host_execution_cancel(task->simdata->compute);
index 94df936..ec0af0b 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.69 2012/12/20 00:13:40 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.69 2012/12/20 00:13:40 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
@@ -1473,13 +1498,24 @@ static int ck_ilimit()
 #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;
+   BUFFERSET(*pp);
+   if (c) {
+      const char *s = strchr(text, c), *e = strrchr(text, c);
+      assert(s && e && s <= e);
+      ++s;
+      while (s < e) {
+        if (isspace(*s)) {
+           BUFFERPUTC(' ');
+           do ++s; while (s < e && isspace(*s));
+        } else
+          BUFFERPUTC(*s++);
+      }
+   } else {
+      const char *s = text;
+      while (*s)
+       BUFFERPUTC(*s++);
+   }
+   BUFFERDONE;
 }
 #endif
 
@@ -1999,15 +2035,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 +2061,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 +2224,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 +2242,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 +2371,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 +2391,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 +2457,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 +2540,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 +2548,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 +2621,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 +2629,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..e1d69e7 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.69 2012/12/20 00:13:40 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);
index db39ef4..1010a54 100644 (file)
@@ -89,7 +89,7 @@ typedef struct SD_task {
   /* dependencies */
   xbt_dynar_t tasks_before;
   xbt_dynar_t tasks_after;
-  unsigned int unsatisfied_dependencies;
+  int unsatisfied_dependencies;
   unsigned int is_not_ready;
 
   /* scheduling parameters (only exist in state SD_SCHEDULED) */
index 9402eaa..57d6d35 100644 (file)
@@ -161,6 +161,18 @@ xbt_dynar_t SD_dotload_with_sched(const char *filename){
   }else{
     XBT_WARN("The scheduling is ignored");
   }
+  SD_task_t task;
+  unsigned int count;
+  xbt_dynar_t computer = NULL;
+  xbt_dict_cursor_t dict_cursor;
+  char *computer_name;
+  xbt_dict_foreach(computers,dict_cursor,computer_name,computer){
+    xbt_dynar_free(&computer);
+  }
+  xbt_dict_free(&computers);
+  xbt_dynar_foreach(result,count,task){
+     SD_task_destroy(task);
+  }
   return NULL;
 }
 
@@ -353,7 +365,7 @@ void dot_add_input_dependencies(SD_task_t current_job, Agedge_t * edge)
   SD_task_t file = NULL;
   char *name_tail=agnameof(agtail(edge));
   char *name_head=agnameof(aghead(edge));
-  char *name = malloc((strlen(name_head)+strlen(name_tail)+6)*sizeof(char));
+  char *name = xbt_malloc((strlen(name_head)+strlen(name_tail)+6)*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"));
@@ -391,7 +403,7 @@ void dot_add_output_dependencies(SD_task_t current_job, Agedge_t * edge)
   SD_task_t file;
   char *name_tail=agnameof(agtail(edge));
   char *name_head=agnameof(aghead(edge));
-  char *name = malloc((strlen(name_head)+strlen(name_tail)+6)*sizeof(char));
+  char *name = xbt_malloc((strlen(name_head)+strlen(name_tail)+6)*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"));
index 2294740..915cb50 100644 (file)
@@ -5,14 +5,15 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
+#include "instr/instr_interface.h"
 #include "xbt/sysdep.h"
 #include "xbt/dynar.h"
 #include "surf/surf.h"
+#include "simgrid/sg_config.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/config.h"
-#include "instr/instr_private.h"
 #include "surf/surfxml_parse.h"
 #ifdef HAVE_LUA
 #include <lua.h>
@@ -31,7 +32,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_kernel, sd,
 SD_global_t sd_global = NULL;
 
 /**
- * \brief Initialises SD internal data
+ * \brief Initializes SD internal data
  *
  * This function must be called before any other SD function. Then you
  * should call SD_create_environment().
@@ -80,7 +81,7 @@ void SD_init(int *argc, char **argv)
 
   surf_init(argc, argv);
 
-  xbt_cfg_setdefault_string(_surf_cfg_set, "workstation/model",
+  xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model",
                             "ptask_L07");
 
 #ifdef HAVE_TRACING
@@ -150,9 +151,9 @@ void SD_application_reinit(void)
 /**
  * \brief Creates the environment
  *
- * The environment (i.e. the \ref SD_workstation_management "workstations" and the
- * \ref SD_link_management "links") is created with the data stored in the given XML
- * platform file.
+ * The environment (i.e. the \ref SD_workstation_management "workstations"
+ * and the \ref SD_link_management "links") is created with the data stored
+ * in the given XML platform file.
  *
  * \param platform_file name of an XML file describing the environment to create
  * \see SD_workstation_management, SD_link_management
@@ -198,7 +199,7 @@ void SD_create_environment(const char *platform_file)
  * The function will execute the \ref SD_RUNNABLE runnable tasks.
  * If \a how_long is positive, then the simulation will be stopped either
  * when time reaches \a how_long or when a watch point is reached.
- * A nonpositive value for \a how_long means no time limit, in which case
+ * A non-positive value for \a how_long means no time limit, in which case
  * the simulation will be stopped either when a watch point is reached or
  * when no more task can be executed.
  * Then you can call SD_simulate() again.
@@ -289,6 +290,10 @@ xbt_swag_t SD_simulate_swag(double how_long) {
           if (dst->is_not_ready > 0)
             dst->is_not_ready--;
 
+          XBT_DEBUG("Released a dependency on %s: %d remain(s). Became schedulable if %d=0",
+             SD_task_get_name(dst), dst->unsatisfied_dependencies,
+             dst->is_not_ready);
+
           if (!(dst->unsatisfied_dependencies)) {
             if (__SD_task_is_scheduled(dst))
               __SD_task_set_state(dst, SD_RUNNABLE);
@@ -296,6 +301,10 @@ xbt_swag_t SD_simulate_swag(double how_long) {
               __SD_task_set_state(dst, SD_SCHEDULABLE);
           }
 
+          if (__SD_task_is_not_scheduled(dst) && !(dst->is_not_ready)) {
+            __SD_task_set_state(dst, SD_SCHEDULABLE);
+          }
+
           if (SD_task_get_kind(dst) == SD_TASK_COMM_E2E) {
             SD_dependency_t comm_dep;
             SD_task_t comm_dst;
@@ -305,6 +314,10 @@ xbt_swag_t SD_simulate_swag(double how_long) {
                 comm_dst->is_not_ready > 0) {
               comm_dst->is_not_ready--;
 
+            XBT_DEBUG("%s is a transfer, %s may be ready now if %d=0",
+               SD_task_get_name(dst), SD_task_get_name(comm_dst),
+               comm_dst->is_not_ready);
+
               if (!(comm_dst->is_not_ready)) {
                 __SD_task_set_state(comm_dst, SD_SCHEDULABLE);
               }
@@ -373,15 +386,15 @@ double SD_get_clock(void) {
 /**
  * \brief Destroys all SD internal data
  *
- * This function should be called when the simulation is over. Don't forget also to destroy
- * the tasks.
+ * This function should be called when the simulation is over. Don't forget
+ * to destroy too.
  *
  * \see SD_init(), SD_task_destroy()
  */
 void SD_exit(void)
 {
 #ifdef HAVE_TRACING
-  TRACE_surf_release();
+  TRACE_surf_resource_utilization_release();
 #endif
 
   xbt_mallocator_free(sd_global->task_mallocator);
index f0cf1c3..3673944 100644 (file)
@@ -201,7 +201,7 @@ SD_task_t SD_task_create_comp_par_amdahl(const char *name, void *data,
  * \return the new task
  */
 SD_task_t SD_task_create_comm_par_mxn_1d_block(const char *name, void *data,
-                                                                                          double amount)
+                                               double amount)
 {
   SD_task_t res = SD_task_create(name, data, amount);
   res->workstation_list=NULL;
@@ -509,7 +509,7 @@ void SD_task_dump(SD_task_t task)
     }
   }
   XBT_INFO("  - amount: %.0f", SD_task_get_amount(task));
-  XBT_INFO("  - Dependencies to satisfy: %u", task->unsatisfied_dependencies);
+  XBT_INFO("  - Dependencies to satisfy: %d", task->unsatisfied_dependencies);
   if (!xbt_dynar_is_empty(task->tasks_before)) {
     XBT_INFO("  - pre-dependencies:");
     xbt_dynar_foreach(task->tasks_before, counter, dependency) {
@@ -632,9 +632,6 @@ void SD_task_dependency_add(const char *name, void *data, SD_task_t src,
          SD_task_get_name(dst));
     __SD_task_set_state(dst, SD_SCHEDULED);
   }
-
-  /*  __SD_print_dependencies(src);
-     __SD_print_dependencies(dst); */
 }
 
 /**
@@ -992,7 +989,8 @@ void SD_task_unschedule(SD_task_t task)
   task->start_time = -1.0;
 }
 
-/* Destroys the data memorized by SD_task_schedule. Task state must be SD_SCHEDULED or SD_RUNNABLE.
+/* Destroys the data memorized by SD_task_schedule.
+ * Task state must be SD_SCHEDULED or SD_RUNNABLE.
  */
 static void __SD_task_destroy_scheduling_data(SD_task_t task)
 {
@@ -1007,9 +1005,9 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task)
   task->computation_amount = task->communication_amount = NULL;
 }
 
-/* Runs a task. This function is directly called by __SD_task_try_to_run if the task
- * doesn't have to wait in fifos. Otherwise, it is called by __SD_task_just_done when
- * the task gets out of its fifos.
+/* Runs a task. This function is directly called by __SD_task_try_to_run if
+ * the task doesn't have to wait in FIFOs. Otherwise, it is called by
+ * __SD_task_just_done when the task gets out of its FIFOs.
  */
 void __SD_task_really_run(SD_task_t task)
 {
@@ -1024,12 +1022,11 @@ void __SD_task_really_run(SD_task_t task)
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
 
-
-
   XBT_DEBUG("Really running task '%s'", SD_task_get_name(task));
+  int workstation_nb = task->workstation_nb;
 
   /* set this task as current task for the workstations in sequential mode */
-  for (i = 0; i < task->workstation_nb; i++) {
+  for (i = 0; i < workstation_nb; i++) {
     if (SD_workstation_get_access_mode(task->workstation_list[i]) ==
         SD_WORKSTATION_SEQUENTIAL_ACCESS) {
       task->workstation_list[i]->current_task = task;
@@ -1045,71 +1042,29 @@ void __SD_task_really_run(SD_task_t task)
 
   /* we have to create a Surf workstation array instead of the SimDag
    * workstation array */
-  surf_workstations = xbt_new(void *, task->workstation_nb);
+  surf_workstations = xbt_new(void *, workstation_nb);
 
-  for (i = 0; i < task->workstation_nb; i++)
+  for (i = 0; i < workstation_nb; i++)
     surf_workstations[i] = task->workstation_list[i]->surf_workstation;
 
-  /* It's allowed to pass a NULL vector as cost to mean vector of 0.0 (easing
-   * user's life). Let's deal with it */
-#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
+  double *computation_amount = xbt_new0(double, workstation_nb);
+  double *communication_amount = xbt_new0(double, workstation_nb * workstation_nb);
 
-  task->surf_action = NULL;
-  if ((task->workstation_nb == 1)
-      && (cost_or_zero(task->communication_amount, 0) == 0.0)) {
-    task->surf_action =
-        surf_workstation_model->extension.
-        workstation.execute(surf_workstations[0],
-                            cost_or_zero(task->computation_amount, 0));
-  } else if ((task->workstation_nb == 1)
-             && (cost_or_zero(task->computation_amount, 0) == 0.0)) {
-
-    task->surf_action =
-        surf_workstation_model->extension.
-        workstation.communicate(surf_workstations[0], surf_workstations[0],
-                                cost_or_zero(task->communication_amount,
-                                             0), task->rate);
-  } else if ((task->workstation_nb == 2)
-             && (cost_or_zero(task->computation_amount, 0) == 0.0)
-             && (cost_or_zero(task->computation_amount, 1) == 0.0)) {
-    int nb = 0;
-    double value = 0.0;
-
-    for (i = 0; i < task->workstation_nb * task->workstation_nb; i++) {
-      if (cost_or_zero(task->communication_amount, i) > 0.0) {
-        nb++;
-        value = cost_or_zero(task->communication_amount, i);
-      }
-    }
-    if (nb == 1) {
-      task->surf_action =
-          surf_workstation_model->extension.
-          workstation.communicate(surf_workstations[0],
-                                  surf_workstations[1], value, task->rate);
-    }
-  }
-#undef cost_or_zero
-
-  if (!task->surf_action) {
-    double *computation_amount = xbt_new(double, task->workstation_nb);
-    double *communication_amount = xbt_new(double, task->workstation_nb *
-                                           task->workstation_nb);
 
+  if(task->computation_amount)
     memcpy(computation_amount, task->computation_amount, sizeof(double) *
-           task->workstation_nb);
+           workstation_nb);
+  if(task->communication_amount)
     memcpy(communication_amount, task->communication_amount,
-           sizeof(double) * task->workstation_nb * task->workstation_nb);
+           sizeof(double) * workstation_nb * workstation_nb);
 
-    task->surf_action =
+  task->surf_action =
         surf_workstation_model->extension.
-        workstation.execute_parallel_task(task->workstation_nb,
+        workstation.execute_parallel_task(workstation_nb,
                                           surf_workstations,
                                           computation_amount,
                                           communication_amount,
                                           task->rate);
-  } else {
-    xbt_free(surf_workstations);
-  }
 
   surf_workstation_model->action_data_set(task->surf_action, task);
 
@@ -1127,10 +1082,11 @@ void __SD_task_really_run(SD_task_t task)
 
 }
 
-/* Tries to run a task. This function is called by SD_simulate() when a scheduled task becomes SD_RUNNABLE
- * (ie when its dependencies are satisfied).
- * If one of the workstations where the task is scheduled on is busy (in sequential mode),
- * the task doesn't start.
+/* Tries to run a task. This function is called by SD_simulate() when a
+ * scheduled task becomes SD_RUNNABLE (i.e., when its dependencies are
+ * satisfied).
+ * If one of the workstations where the task is scheduled on is busy (in
+ * sequential mode), the task doesn't start.
  * Returns whether the task has started.
  */
 int __SD_task_try_to_run(SD_task_t task)
@@ -1152,11 +1108,11 @@ int __SD_task_try_to_run(SD_task_t task)
 
   XBT_DEBUG("Task '%s' can start: %d", SD_task_get_name(task), can_start);
 
-  if (!can_start) {             /* if the task cannot start and is not in the fifos yet */
+  if (!can_start) {             /* if the task cannot start and is not in the FIFOs yet */
     for (i = 0; i < task->workstation_nb; i++) {
       workstation = task->workstation_list[i];
       if (workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-        XBT_DEBUG("Pushing task '%s' in the fifo of workstation '%s'",
+        XBT_DEBUG("Pushing task '%s' in the FIFO of workstation '%s'",
                SD_task_get_name(task),
                SD_workstation_get_name(workstation));
         xbt_fifo_push(workstation->task_fifo, task);
@@ -1175,7 +1131,7 @@ int __SD_task_try_to_run(SD_task_t task)
 
 /* This function is called by SD_simulate when a task is done.
  * It updates task->state and task->action and executes if necessary the tasks
- * which were waiting in fifos for the end of `task'
+ * which were waiting in FIFOs for the end of `task'
  */
 void __SD_task_just_done(SD_task_t task)
 {
@@ -1205,14 +1161,14 @@ void __SD_task_just_done(SD_task_t task)
   XBT_DEBUG("Looking for candidates");
 
   /* if the task was executed on sequential workstations,
-     maybe we can execute the next task of the fifo for each workstation */
+     maybe we can execute the next task of the FIFO for each workstation */
   for (i = 0; i < task->workstation_nb; i++) {
     workstation = task->workstation_list[i];
     XBT_DEBUG("Workstation '%s': access_mode = %d",
               SD_workstation_get_name(workstation), (int)workstation->access_mode);
     if (workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
       xbt_assert(workstation->task_fifo != NULL,
-                  "Workstation '%s' has sequential access but no fifo!",
+                  "Workstation '%s' has sequential access but no FIFO!",
                   SD_workstation_get_name(workstation));
       xbt_assert(workstation->current_task =
                   task, "Workstation '%s': current task should be '%s'",
@@ -1222,7 +1178,7 @@ void __SD_task_just_done(SD_task_t task)
       /* the task is over so we can release the workstation */
       workstation->current_task = NULL;
 
-      XBT_DEBUG("Getting candidate in fifo");
+      XBT_DEBUG("Getting candidate in FIFO");
       candidate =
           xbt_fifo_get_item_content(xbt_fifo_get_first_item
                                     (workstation->task_fifo));
@@ -1240,9 +1196,10 @@ void __SD_task_just_done(SD_task_t task)
       /* if there was a task waiting for my place */
       if (candidate != NULL) {
         /* Unfortunately, we are not sure yet that we can execute the task now,
-           because the task can be waiting more deeply in some other workstation's fifos...
-           So we memorize all candidate tasks, and then we will check for each candidate
-           whether or not all its workstations are available. */
+           because the task can be waiting more deeply in some other
+           workstation's FIFOs ...
+           So we memorize all candidate tasks, and then we will check for each
+           candidate whether or not all its workstations are available. */
 
         /* realloc if necessary */
         if (candidate_nb == candidate_capacity) {
@@ -1277,7 +1234,7 @@ void __SD_task_just_done(SD_task_t task)
       workstation = candidate->workstation_list[j];
 
       /* I can start on this workstation if the workstation is shared
-         or if I am the first task in the fifo */
+         or if I am the first task in the FIFO */
       can_start = workstation->access_mode == SD_WORKSTATION_SHARED_ACCESS
           || candidate ==
           xbt_fifo_get_item_content(xbt_fifo_get_first_item
@@ -1292,14 +1249,14 @@ void __SD_task_just_done(SD_task_t task)
       for (j = 0; j < candidate->workstation_nb && can_start; j++) {
         workstation = candidate->workstation_list[j];
 
-        /* update the fifo */
+        /* update the FIFO */
         if (workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
           candidate = xbt_fifo_shift(workstation->task_fifo);   /* the return value is stored just for debugging */
-          XBT_DEBUG("Head of the fifo: '%s'",
+          XBT_DEBUG("Head of the FIFO: '%s'",
                  (candidate !=
                   NULL) ? SD_task_get_name(candidate) : "NULL");
           xbt_assert(candidate == candidates[i],
-                      "Error in __SD_task_just_done: bad first task in the fifo");
+                      "Error in __SD_task_just_done: bad first task in the FIFO");
         }
       }                         /* for each workstation */
 
@@ -1407,21 +1364,23 @@ void SD_task_distribute_comp_amdhal(SD_task_t task, int ws_count)
 /** @brief Auto-schedules a task.
  *
  * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This
- * allows to specify the task costs at creation, and decorelate them from the
+ * allows to specify the task costs at creation, and decouple them from the
  * scheduling process where you just specify which resource should deliver the
  * mandatory power.
  *
- * To be auto-schedulable, a task must be created with SD_task_create_comm_e2e() or
- * SD_task_create_comp_seq(). Check their definitions for the exact semantic of each
- * of them.
+ * To be auto-schedulable, a task must be created with SD_task_create_comm_e2e()
+ * or SD_task_create_comp_seq(). Check their definitions for the exact semantic
+ * of each of them.
  *
  * @todo
  * We should create tasks kind for the following categories:
  *  - Point to point communication (done)
  *  - Sequential computation       (done)
  *  - group communication (redistribution, several kinds)
- *  - parallel tasks with no internal communication (one kind per speedup model such as amdal)
- *  - idem+ internal communication. Task type not enough since we cannot store comm cost alongside to comp one)
+ *  - parallel tasks with no internal communication (one kind per speedup
+ *    model such as Amdahl)
+ *  - idem+ internal communication. Task type not enough since we cannot store
+ *    comm cost alongside to comp one)
  */
 void SD_task_schedulev(SD_task_t task, int count,
                        const SD_workstation_t * list)
@@ -1437,7 +1396,9 @@ void SD_task_schedulev(SD_task_t task, int count,
     SD_task_distribute_comp_amdhal(task, count);
   case SD_TASK_COMM_E2E:
   case SD_TASK_COMP_SEQ:
-    xbt_assert(task->workstation_nb == count,"Got %d locations, but were expecting %d locations",count,task->workstation_nb);
+    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];
     if (SD_task_get_kind(task)== SD_TASK_COMP_SEQ && !task->computation_amount){
@@ -1460,7 +1421,8 @@ void SD_task_schedulev(SD_task_t task, int count,
 
   }
 
-  /* Iterate over all childs and parent being COMM_E2E to say where I am located (and start them if runnable) */
+  /* Iterate over all children and parents being COMM_E2E to say where I am
+   * located (and start them if runnable) */
   if (task->kind == SD_TASK_COMP_SEQ) {
     XBT_VERB("Schedule computation task %s on %s. It costs %.f flops",
           SD_task_get_name(task),
@@ -1504,7 +1466,8 @@ void SD_task_schedulev(SD_task_t task, int count,
       }
     }
   }
-  /* Iterate over all childs and parent being MXN_1D_BLOC to say where I am located (and start them if runnable) */
+  /* Iterate over all children and parents being MXN_1D_BLOCK to say where I am
+   * located (and start them if runnable) */
   if (task->kind == SD_TASK_COMP_PAR_AMDAHL) {
     XBT_VERB("Schedule computation task %s on %d workstations. %.f flops"
              " will be distributed following Amdahl'Law",
similarity index 62%
rename from src/surf/surf_config.c
rename to src/simgrid/sg_config.c
index debb767..3d853d4 100644 (file)
@@ -4,30 +4,36 @@
 /* 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. */
 
-/* surf_config: configuration infrastructure for the simulation world       */
+/* sg_config: configuration infrastructure for the simulation world       */
 
 #include "xbt/misc.h"
 #include "xbt/config.h"
 #include "xbt/log.h"
+#include "xbt/mallocator.h"
 #include "xbt/str.h"
-#include "surf/surf_private.h"
-#include "surf/surf_routing.h"  /* COORD_HOST_LEVEL and COORD_ASR_LEVEL */
+#include "xbt/lib.h" 
+#include "xbt/sysdep.h"
+#include "surf/surf.h"
+#include "surf/maxmin.h"
+#include "instr/instr_interface.h"
 #include "simgrid/simix.h"
-#include "mc/mc.h" /* configuration callbacks of model-checking */
+#include "simgrid/sg_config.h"
+#include "smpi/smpi_interface.h"
+#include "mc/mc.h"
+#include "instr/instr.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf,
-                                "About the configuration of surf (and the rest of the simulation)");
+                                "About the configuration of simgrid");
 
-xbt_cfg_t _surf_cfg_set = NULL;
-
-int _surf_init_status = 0;      /* 0: beginning of time (config cannot be changed yet);
-                                   1: initialized: cfg_set created (config can now be changed);
-                                   2: configured: command line parsed and config part of platform file was integrated also, platform construction ongoing or done.
-                                      (Config cannot be changed anymore!) */
+xbt_cfg_t _sg_cfg_set = NULL;
 
+int _sg_init_status = 0;      /* 0: beginning of time (config cannot be changed yet);
+                                  1: initialized: cfg_set created (config can now be changed);
+                                  2: configured: command line parsed and config part of platform file was integrated also, platform construction ongoing or done.
+                                     (Config cannot be changed anymore!) */
 
 /* Parse the command line, looking for options */
-static void surf_config_cmd_line(int *argc, char **argv)
+static void sg_config_cmd_line(int *argc, char **argv)
 {
   int shall_exit = 0;
   int i, j;
@@ -38,12 +44,12 @@ static void surf_config_cmd_line(int *argc, char **argv)
       opt = strchr(argv[i], '=');
       opt++;
 
-      xbt_cfg_set_parse(_surf_cfg_set, opt);
+      xbt_cfg_set_parse(_sg_cfg_set, opt);
       XBT_DEBUG("Did apply '%s' as config setting", opt);
     } else if (!strcmp(argv[i], "--cfg-help") || !strcmp(argv[i], "--help")) {
       printf
           ("Description of the configuration accepted by this simulator:\n");
-      xbt_cfg_help(_surf_cfg_set);
+      xbt_cfg_help(_sg_cfg_set);
       printf(
 "\n"
 "Each of these configurations can be used by adding\n"
@@ -88,21 +94,20 @@ static void surf_config_cmd_line(int *argc, char **argv)
     *argc = j;
   }
   if (shall_exit) {
-    _surf_init_status=1; // get everything cleanly cleaned on exit
+    _sg_init_status=1; // get everything cleanly cleaned on exit
     exit(0);
   }
 }
 
-
 /* callback of the workstation/model variable */
-static void _surf_cfg_cb__workstation_model(const char *name, int pos)
+static void _sg_cfg_cb__workstation_model(const char *name, int pos)
 {
   char *val;
 
-  xbt_assert(_surf_init_status == 1,
+  xbt_assert(_sg_init_status == 1,
               "Cannot change the model after the initialization");
 
-  val = xbt_cfg_get_string(_surf_cfg_set, name);
+  val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
     model_help("workstation", surf_workstation_model_description);
@@ -114,14 +119,14 @@ static void _surf_cfg_cb__workstation_model(const char *name, int pos)
 }
 
 /* callback of the cpu/model variable */
-static void _surf_cfg_cb__cpu_model(const char *name, int pos)
+static void _sg_cfg_cb__cpu_model(const char *name, int pos)
 {
   char *val;
 
-  xbt_assert(_surf_init_status == 1,
+  xbt_assert(_sg_init_status == 1,
               "Cannot change the model after the initialization");
 
-  val = xbt_cfg_get_string(_surf_cfg_set, name);
+  val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
     model_help("CPU", surf_cpu_model_description);
@@ -133,14 +138,14 @@ static void _surf_cfg_cb__cpu_model(const char *name, int pos)
 }
 
 /* callback of the cpu/model variable */
-static void _surf_cfg_cb__optimization_mode(const char *name, int pos)
+static void _sg_cfg_cb__optimization_mode(const char *name, int pos)
 {
   char *val;
 
-  xbt_assert(_surf_init_status == 1,
+  xbt_assert(_sg_init_status == 1,
               "Cannot change the model after the initialization");
 
-  val = xbt_cfg_get_string(_surf_cfg_set, name);
+  val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
     model_help("optimization", surf_optimization_mode_description);
@@ -152,14 +157,14 @@ static void _surf_cfg_cb__optimization_mode(const char *name, int pos)
 }
 
 /* callback of the cpu/model variable */
-static void _surf_cfg_cb__storage_mode(const char *name, int pos)
+static void _sg_cfg_cb__storage_mode(const char *name, int pos)
 {
   char *val;
 
-  xbt_assert(_surf_init_status == 1,
+  xbt_assert(_sg_init_status == 1,
               "Cannot change the model after the initialization");
 
-  val = xbt_cfg_get_string(_surf_cfg_set, name);
+  val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
     model_help("storage", surf_storage_model_description);
@@ -171,14 +176,14 @@ static void _surf_cfg_cb__storage_mode(const char *name, int pos)
 }
 
 /* callback of the workstation_model variable */
-static void _surf_cfg_cb__network_model(const char *name, int pos)
+static void _sg_cfg_cb__network_model(const char *name, int pos)
 {
   char *val;
 
-  xbt_assert(_surf_init_status == 1,
+  xbt_assert(_sg_init_status == 1,
               "Cannot change the model after the initialization");
 
-  val = xbt_cfg_get_string(_surf_cfg_set, name);
+  val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
     model_help("network", surf_network_model_description);
@@ -191,89 +196,91 @@ static void _surf_cfg_cb__network_model(const char *name, int pos)
 
 
 /* callbacks of the network models values */
-static void _surf_cfg_cb__tcp_gamma(const char *name, int pos)
+static void _sg_cfg_cb__tcp_gamma(const char *name, int pos)
 {
-  sg_tcp_gamma = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_tcp_gamma = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__maxmin_precision(const char* name, int pos)
+static void _sg_cfg_cb__maxmin_precision(const char* name, int pos)
 {
-  sg_maxmin_precision = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_maxmin_precision = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__sender_gap(const char* name, int pos)
+static void _sg_cfg_cb__sender_gap(const char* name, int pos)
 {
-  sg_sender_gap = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_sender_gap = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__latency_factor(const char *name, int pos)
+static void _sg_cfg_cb__latency_factor(const char *name, int pos)
 {
-  sg_latency_factor = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_latency_factor = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__bandwidth_factor(const char *name, int pos)
+static void _sg_cfg_cb__bandwidth_factor(const char *name, int pos)
 {
-  sg_bandwidth_factor = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_bandwidth_factor = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__weight_S(const char *name, int pos)
+static void _sg_cfg_cb__weight_S(const char *name, int pos)
 {
-  sg_weight_S_parameter = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_weight_S_parameter = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
 /* callback of the inclusion path */
-static void _surf_cfg_cb__surf_path(const char *name, int pos)
+static void _sg_cfg_cb__surf_path(const char *name, int pos)
 {
-  char *path = xbt_cfg_get_string_at(_surf_cfg_set, name, pos);
+  char *path = xbt_cfg_get_string_at(_sg_cfg_set, name, pos);
   xbt_dynar_push(surf_path, &path);
 }
 
 /* callback to decide if we want to use the model-checking */
 #include "xbt_modinter.h"
-extern int _surf_do_model_check;   /* this variable lives in xbt_main until I find a right location for it */
+#ifdef HAVE_MC
+extern int _sg_do_model_check;   /* this variable lives in xbt_main until I find a right location for it */
+#endif
 
-static void _surf_cfg_cb_model_check(const char *name, int pos)
+static void _sg_cfg_cb_model_check(const char *name, int pos)
 {
-  _surf_do_model_check = xbt_cfg_get_int(_surf_cfg_set, name);
-
-#ifndef HAVE_MC
-  if (_surf_do_model_check) {
+#ifdef HAVE_MC
+  _sg_do_model_check = xbt_cfg_get_int(_sg_cfg_set, name);
+#else
+  if (xbt_cfg_get_int(_sg_cfg_set, name)) {
     xbt_die("You tried to activate the model-checking from the command line, but it was not compiled in. Change your settings in cmake, recompile and try again");
   }
 #endif
 }
 
-extern int _surf_do_verbose_exit;
+extern int _sg_do_verbose_exit;
 
-static void _surf_cfg_cb_verbose_exit(const char *name, int pos)
+static void _sg_cfg_cb_verbose_exit(const char *name, int pos)
 {
-  _surf_do_verbose_exit = xbt_cfg_get_int(_surf_cfg_set, name);
+  _sg_do_verbose_exit = xbt_cfg_get_int(_sg_cfg_set, name);
 }
 
 
-static void _surf_cfg_cb_context_factory(const char *name, int pos) {
-  smx_context_factory_name = xbt_cfg_get_string(_surf_cfg_set, name);
+static void _sg_cfg_cb_context_factory(const char *name, int pos) {
+  smx_context_factory_name = xbt_cfg_get_string(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb_context_stack_size(const char *name, int pos)
+static void _sg_cfg_cb_context_stack_size(const char *name, int pos)
 {
   smx_context_stack_size_was_set = 1;
-  smx_context_stack_size = xbt_cfg_get_int(_surf_cfg_set, name) * 1024;
+  smx_context_stack_size = xbt_cfg_get_int(_sg_cfg_set, name) * 1024;
 }
 
-static void _surf_cfg_cb_contexts_nthreads(const char *name, int pos)
+static void _sg_cfg_cb_contexts_nthreads(const char *name, int pos)
 {
-  SIMIX_context_set_nthreads(xbt_cfg_get_int(_surf_cfg_set, name));
+  SIMIX_context_set_nthreads(xbt_cfg_get_int(_sg_cfg_set, name));
 }
 
-static void _surf_cfg_cb_contexts_parallel_threshold(const char *name, int pos)
+static void _sg_cfg_cb_contexts_parallel_threshold(const char *name, int pos)
 {
-  SIMIX_context_set_parallel_threshold(xbt_cfg_get_int(_surf_cfg_set, name));
+  SIMIX_context_set_parallel_threshold(xbt_cfg_get_int(_sg_cfg_set, name));
 }
 
-static void _surf_cfg_cb_contexts_parallel_mode(const char *name, int pos)
+static void _sg_cfg_cb_contexts_parallel_mode(const char *name, int pos)
 {
-  const char* mode_name = xbt_cfg_get_string(_surf_cfg_set, name);
+  const char* mode_name = xbt_cfg_get_string(_sg_cfg_set, name);
   if (!strcmp(mode_name, "posix")) {
     SIMIX_context_set_parallel_mode(XBT_PARMAP_POSIX);
   }
@@ -289,15 +296,10 @@ static void _surf_cfg_cb_contexts_parallel_mode(const char *name, int pos)
   }
 }
 
-static void _surf_cfg_cb_surf_nthreads(const char *name, int pos)
-{
-  surf_set_nthreads(xbt_cfg_get_int(_surf_cfg_set, name));
-}
-
-static void _surf_cfg_cb__surf_network_coordinates(const char *name,
+static void _sg_cfg_cb__surf_network_coordinates(const char *name,
                                                    int pos)
 {
-  char *val = xbt_cfg_get_string(_surf_cfg_set, name);
+  char *val = xbt_cfg_get_string(_sg_cfg_set, name);
   if (!strcmp(val, "yes")) {
     if (!COORD_HOST_LEVEL) {
       COORD_HOST_LEVEL = xbt_lib_add_level(host_lib,xbt_dynar_free_voidp);
@@ -311,26 +313,31 @@ static void _surf_cfg_cb__surf_network_coordinates(const char *name,
   }
 }
 
-static void _surf_cfg_cb__surf_network_crosstraffic(const char *name,
+static void _sg_cfg_cb_surf_nthreads(const char *name, int pos)
+{
+  surf_set_nthreads(xbt_cfg_get_int(_sg_cfg_set, name));
+}
+
+static void _sg_cfg_cb__surf_network_crosstraffic(const char *name,
                                                   int pos)
 {
-  sg_network_crosstraffic = xbt_cfg_get_int(_surf_cfg_set, name);
+  sg_network_crosstraffic = xbt_cfg_get_int(_sg_cfg_set, name);
 }
 
 #ifdef HAVE_GTNETS
-static void _surf_cfg_cb__gtnets_jitter(const char *name, int pos)
+static void _sg_cfg_cb__gtnets_jitter(const char *name, int pos)
 {
-  sg_gtnets_jitter = xbt_cfg_get_double(_surf_cfg_set, name);
+  sg_gtnets_jitter = xbt_cfg_get_double(_sg_cfg_set, name);
 }
 
-static void _surf_cfg_cb__gtnets_jitter_seed(const char *name, int pos)
+static void _sg_cfg_cb__gtnets_jitter_seed(const char *name, int pos)
 {
-  sg_gtnets_jitter_seed = xbt_cfg_get_int(_surf_cfg_set, name);
+  sg_gtnets_jitter_seed = xbt_cfg_get_int(_sg_cfg_set, name);
 }
 #endif
 
 /* create the config set, register what should be and parse the command line*/
-void surf_config_init(int *argc, char **argv)
+void sg_config_init(int *argc, char **argv)
 {
   char *description = xbt_malloc(1024), *p = description;
   char *default_value;
@@ -339,7 +346,7 @@ void surf_config_init(int *argc, char **argv)
   int i;
 
   /* Create the configuration support */
-  if (_surf_init_status == 0) { /* Only create stuff if not already inited */
+  if (_sg_init_status == 0) { /* Only create stuff if not already inited */
     sprintf(description,
             "The model to use for the CPU. Possible values: ");
     p = description;
@@ -350,8 +357,8 @@ 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,
-                     &default_value, 1, 1, &_surf_cfg_cb__cpu_model, NULL);
+    xbt_cfg_register(&_sg_cfg_set, "cpu/model", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__cpu_model, NULL);
 
     sprintf(description,
             "The optimization modes to use for the CPU. Possible values: ");
@@ -363,8 +370,8 @@ void surf_config_init(int *argc, char **argv)
     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);
+    xbt_cfg_register(&_sg_cfg_set, "cpu/optim", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__optimization_mode, NULL);
 
     sprintf(description,
             "The model to use for the storage. Possible values: ");
@@ -376,8 +383,8 @@ 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("default");
-    xbt_cfg_register(&_surf_cfg_set, "storage/model", description, xbt_cfgelm_string,
-                     &default_value, 1, 1, &_surf_cfg_cb__storage_mode,
+    xbt_cfg_register(&_sg_cfg_set, "storage/model", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__storage_mode,
                      NULL);
 
     /* ********************************************************************* */
@@ -392,8 +399,8 @@ 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("default");
-    xbt_cfg_register(&_surf_cfg_set, "new_model/model", description, xbt_cfgelm_string,
-                     &default_value, 1, 1, &_surf_cfg_cb__storage_mode,
+    xbt_cfg_register(&_sg_cfg_set, "new_model/model", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__storage_mode,
                      NULL);
     /* ********************************************************************* */
 
@@ -407,8 +414,8 @@ 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,
-                     &default_value, 1, 1, &_surf_cfg_cb__network_model,
+    xbt_cfg_register(&_sg_cfg_set, "network/model", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__network_model,
                      NULL);
 
     sprintf(description,
@@ -421,8 +428,8 @@ void surf_config_init(int *argc, char **argv)
     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);
+    xbt_cfg_register(&_sg_cfg_set, "network/optim", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_sg_cfg_cb__optimization_mode, NULL);
 
     sprintf(description,
             "The model to use for the workstation. Possible values: ");
@@ -434,150 +441,149 @@ 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("default");
-    xbt_cfg_register(&_surf_cfg_set, "workstation/model", description, xbt_cfgelm_string,
+    xbt_cfg_register(&_sg_cfg_set, "workstation/model", description, xbt_cfgelm_string,
                      &default_value, 1, 1,
-                     &_surf_cfg_cb__workstation_model, NULL);
+                     &_sg_cfg_cb__workstation_model, NULL);
 
     xbt_free(description);
 
-    xbt_cfg_register(&_surf_cfg_set, "network/TCP_gamma",
+    xbt_cfg_register(&_sg_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, "network/TCP_gamma", 4194304.0);
+                     _sg_cfg_cb__tcp_gamma, NULL);
+    xbt_cfg_setdefault_double(_sg_cfg_set, "network/TCP_gamma", 4194304.0);
 
-    xbt_cfg_register(&_surf_cfg_set, "maxmin/precision",
+    xbt_cfg_register(&_sg_cfg_set, "maxmin/precision",
                      "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!
+                     xbt_cfgelm_double, NULL, 1, 1, _sg_cfg_cb__maxmin_precision, NULL);
+    xbt_cfg_setdefault_double(_sg_cfg_set, "maxmin/precision", 0.00001); 
 
     /* The parameters of network models */
 
-    double_default_value = 0.0;
-    xbt_cfg_register(&_surf_cfg_set, "network/sender_gap",
+    xbt_cfg_register(&_sg_cfg_set, "network/sender_gap",
                      "Minimum gap between two overlapping sends",
-                     xbt_cfgelm_double, &double_default_value, 1, 1,
-                     _surf_cfg_cb__sender_gap, NULL);
+                     xbt_cfgelm_double, NULL, 1, 1, /* default is set in network.c */
+                     _sg_cfg_cb__sender_gap, NULL);
 
-    double_default_value = 1.0;
-    xbt_cfg_register(&_surf_cfg_set, "network/latency_factor",
+    double_default_value = 1.0; // FIXME use setdefault everywhere here!
+    xbt_cfg_register(&_sg_cfg_set, "network/latency_factor",
                      "Correction factor to apply to the provided latency (default value set by network model)",
                      xbt_cfgelm_double, &double_default_value, 1, 1,
-                     _surf_cfg_cb__latency_factor, NULL);
+                     _sg_cfg_cb__latency_factor, NULL);
     double_default_value = 1.0;
-    xbt_cfg_register(&_surf_cfg_set, "network/bandwidth_factor",
+    xbt_cfg_register(&_sg_cfg_set, "network/bandwidth_factor",
                      "Correction factor to apply to the provided bandwidth (default value set by network model)",
                      xbt_cfgelm_double, &double_default_value, 1, 1,
-                     _surf_cfg_cb__bandwidth_factor, NULL);
-    double_default_value = 0.0;
-    xbt_cfg_register(&_surf_cfg_set, "network/weight_S",
+                     _sg_cfg_cb__bandwidth_factor, NULL);
+
+    xbt_cfg_register(&_sg_cfg_set, "network/weight_S",
                      "Correction factor to apply to the weight of competing streams(default value set by network model)",
-                     xbt_cfgelm_double, &double_default_value, 1, 1,
-                     _surf_cfg_cb__weight_S, NULL);
+                     xbt_cfgelm_double, NULL, 1, 1, /* default is set in network.c */
+                     _sg_cfg_cb__weight_S, NULL);
 
     /* Inclusion path */
-    xbt_cfg_register(&_surf_cfg_set, "path",
+    xbt_cfg_register(&_sg_cfg_set, "path",
                      "Lookup path for inclusions in platform and deployment XML files",
                      xbt_cfgelm_string, NULL, 0, 0,
-                     _surf_cfg_cb__surf_path, NULL);
+                     _sg_cfg_cb__surf_path, NULL);
 
     default_value_int = 0;
-    xbt_cfg_register(&_surf_cfg_set, "cpu/maxmin_selective_update",
+    xbt_cfg_register(&_sg_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",
+    xbt_cfg_register(&_sg_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,
                      NULL, NULL);
 
 #ifdef HAVE_MC
     /* do model-checking */
-    xbt_cfg_register(&_surf_cfg_set, "model-check",
+    xbt_cfg_register(&_sg_cfg_set, "model-check",
                      "Verify the system through model-checking instead of simulating it (EXPERIMENTAL)",
                      xbt_cfgelm_int, NULL, 0, 1,
-                     _surf_cfg_cb_model_check, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "model-check", 0);
+                     _sg_cfg_cb_model_check, NULL);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "model-check", 0);
 
     /* do stateful model-checking */
-    xbt_cfg_register(&_surf_cfg_set, "model-check/checkpoint",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/checkpoint",
                      "Specify the amount of steps between checkpoints during stateful model-checking (default: 0 => stateless verification). "
                      "If value=1, one checkpoint is saved for each step => faster verification, but huge memory consumption; higher values are good compromises between speed and memory consumption.",
                      xbt_cfgelm_int, NULL, 0, 1,
                      _mc_cfg_cb_checkpoint, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "model-check/checkpoint", 0);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "model-check/checkpoint", 0);
     
     /* do liveness model-checking */
-    xbt_cfg_register(&_surf_cfg_set, "model-check/property",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/property",
                      "Specify the name of the file containing the property. It must be the result of the ltl2ba program.",
                      xbt_cfgelm_string, NULL, 0, 1,
                      _mc_cfg_cb_property, NULL);
-    xbt_cfg_setdefault_string(_surf_cfg_set, "model-check/property", "");
+    xbt_cfg_setdefault_string(_sg_cfg_set, "model-check/property", "");
 
     /* Specify the kind of model-checking reduction */
-    xbt_cfg_register(&_surf_cfg_set, "model-check/reduction",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/reduction",
                      "Specify the kind of exploration reduction (either none or DPOR)",
                      xbt_cfgelm_string, NULL, 0, 1,
                      _mc_cfg_cb_reduce, NULL);
-    xbt_cfg_setdefault_string(_surf_cfg_set, "model-check/reduction", "dpor");
+    xbt_cfg_setdefault_string(_sg_cfg_set, "model-check/reduction", "dpor");
 
     /* Enable/disable timeout for wait requests with model-checking */
-    xbt_cfg_register(&_surf_cfg_set, "model-check/timeout",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/timeout",
                      "Enable/Disable timeout for wait requests",
                      xbt_cfgelm_int, NULL, 0, 1,
                      _mc_cfg_cb_timeout, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "model-check/timeout", 0);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "model-check/timeout", 0);
 
     /* Set max depth exploration */
-    xbt_cfg_register(&_surf_cfg_set, "model-check/max_depth",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/max_depth",
                      "Specify the max depth of exploration (default : 1000)",
                      xbt_cfgelm_int, NULL, 0, 1,
                      _mc_cfg_cb_max_depth, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "model-check/max_depth", 1000);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "model-check/max_depth", 1000);
 
     /* Set number of visited state stored for state comparison reduction*/
-    xbt_cfg_register(&_surf_cfg_set, "model-check/visited",
+    xbt_cfg_register(&_sg_cfg_set, "model-check/visited",
                      "Specify the number of visited state stored for state comparison reduction. If value=5, the last 5 visited states are stored",
                      xbt_cfgelm_int, NULL, 0, 1,
                      _mc_cfg_cb_visited, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "model-check/visited", 0);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "model-check/visited", 0);
 #endif
 
     /* do verbose-exit */
     default_value_int = 1;
-    xbt_cfg_register(&_surf_cfg_set, "verbose-exit",
+    xbt_cfg_register(&_sg_cfg_set, "verbose-exit",
                      "Activate the \"do nothing\" mode in Ctrl-C",
                      xbt_cfgelm_int, &default_value_int, 0, 1,
-                     _surf_cfg_cb_verbose_exit, NULL);
+                     _sg_cfg_cb_verbose_exit, NULL);
     
     
     /* context factory */
     default_value = xbt_strdup("ucontext");
-    xbt_cfg_register(&_surf_cfg_set, "contexts/factory",
+    xbt_cfg_register(&_sg_cfg_set, "contexts/factory",
                      "Context factory to use in SIMIX (ucontext, thread or raw)",
-                     xbt_cfgelm_string, &default_value, 1, 1, _surf_cfg_cb_context_factory, NULL);
+                     xbt_cfgelm_string, &default_value, 1, 1, _sg_cfg_cb_context_factory, NULL);
 
     /* stack size of contexts in Ko */
     default_value_int = 128;
-    xbt_cfg_register(&_surf_cfg_set, "contexts/stack_size",
+    xbt_cfg_register(&_sg_cfg_set, "contexts/stack_size",
                      "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);
+                     _sg_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",
+    xbt_cfg_register(&_sg_cfg_set, "contexts/nthreads",
                      "Number of parallel threads used to execute user contexts",
                      xbt_cfgelm_int, &default_value_int, 1, 1,
-                     _surf_cfg_cb_contexts_nthreads, NULL);
+                     _sg_cfg_cb_contexts_nthreads, NULL);
 
     /* minimal number of user contexts to be run in parallel */
     default_value_int = 2;
-    xbt_cfg_register(&_surf_cfg_set, "contexts/parallel_threshold",
+    xbt_cfg_register(&_sg_cfg_set, "contexts/parallel_threshold",
         "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);
+        _sg_cfg_cb_contexts_parallel_threshold, NULL);
 
     /* synchronization mode for parallel user contexts */
 #ifdef HAVE_FUTEX_H
@@ -585,74 +591,74 @@ void surf_config_init(int *argc, char **argv)
 #else //No futex on mac and posix is unimplememted yet
     default_value = xbt_strdup("busy_wait");
 #endif
-    xbt_cfg_register(&_surf_cfg_set, "contexts/synchro",
+    xbt_cfg_register(&_sg_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);
+        _sg_cfg_cb_contexts_parallel_mode, NULL);
 
     /* number of parallel threads for Surf */
     default_value_int = surf_get_nthreads();
-    xbt_cfg_register(&_surf_cfg_set, "surf/nthreads",
+    xbt_cfg_register(&_sg_cfg_set, "surf/nthreads",
                      "Number of parallel threads used to update Surf models",
                      xbt_cfgelm_int, &default_value_int, 1, 1,
-                     _surf_cfg_cb_surf_nthreads, NULL);
+                     _sg_cfg_cb_surf_nthreads, NULL);
 
     default_value = xbt_strdup("no");
-    xbt_cfg_register(&_surf_cfg_set, "network/coordinates",
+    xbt_cfg_register(&_sg_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, "network/coordinates", default_value);
+                     _sg_cfg_cb__surf_network_coordinates, NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "network/coordinates", default_value);
 
     default_value_int = 0;
-    xbt_cfg_register(&_surf_cfg_set, "network/crosstraffic",
+    xbt_cfg_register(&_sg_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_crosstraffic, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "network/crosstraffic", default_value_int);
+                     _sg_cfg_cb__surf_network_crosstraffic, NULL);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "network/crosstraffic", default_value_int);
 
 #ifdef HAVE_GTNETS
-    xbt_cfg_register(&_surf_cfg_set, "gtnets/jitter",
+    xbt_cfg_register(&_sg_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);
+                     _sg_cfg_cb__gtnets_jitter, NULL);
+    xbt_cfg_setdefault_double(_sg_cfg_set, "gtnets/jitter", 0.0);
 
     default_value_int = 10;
-    xbt_cfg_register(&_surf_cfg_set, "gtnets/jitter_seed",
+    xbt_cfg_register(&_sg_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);
+                     _sg_cfg_cb__gtnets_jitter_seed, NULL);
 #endif
 #ifdef HAVE_NS3
-    xbt_cfg_register(&_surf_cfg_set, "ns3/TcpModel",
+    xbt_cfg_register(&_sg_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");
+    xbt_cfg_setdefault_string(_sg_cfg_set, "ns3/TcpModel", "default");
 #endif
 
 //SMPI
     double default_reference_speed = 20000.0;
-    xbt_cfg_register(&_surf_cfg_set, "smpi/running_power",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/running_power",
                      "Power of the host running the simulation (in flop/s). Used to bench the operations.",
                      xbt_cfgelm_double, &default_reference_speed, 1, 1, NULL,
                      NULL);
 
     int default_display_timing = 0;
-    xbt_cfg_register(&_surf_cfg_set, "smpi/display_timing",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/display_timing",
                      "Boolean indicating whether we should display the timing after simulation.",
                      xbt_cfgelm_int, &default_display_timing, 1, 1, NULL,
                      NULL);
 
     double default_threshold = 1e-6;
-    xbt_cfg_register(&_surf_cfg_set, "smpi/cpu_threshold",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/cpu_threshold",
                      "Minimal computation time (in seconds) not discarded.",
                      xbt_cfgelm_double, &default_threshold, 1, 1, NULL,
                      NULL);
 
     int default_small_messages_threshold = 0;
-    xbt_cfg_register(&_surf_cfg_set, "smpi/async_small_thres",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/async_small_thres",
                      "Maximal size of messages that are to be sent asynchronously, without waiting for the receiver",
                      xbt_cfgelm_int, &default_small_messages_threshold, 1, 1, NULL,
                      NULL);
@@ -662,18 +668,32 @@ void surf_config_init(int *argc, char **argv)
     //test is if( size >= thresholdN ) return valueN;
     //Values can be modified with command line --cfg=smpi/bw_factor:"threshold0:value0;threshold1:value1;...;thresholdN:valueN"
     //  or with tag config put line <prop id="smpi/bw_factor" value="threshold0:value0;threshold1:value1;...;thresholdN:valueN"></prop>
-    xbt_cfg_register(&_surf_cfg_set, "smpi/bw_factor",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/bw_factor",
                      "Bandwidth factors for smpi.",
                      xbt_cfgelm_string, NULL, 1, 1, NULL,
                      NULL);
-    xbt_cfg_setdefault_string(_surf_cfg_set, "smpi/bw_factor", "65472:0.940694;15424:0.697866;9376:0.58729;5776:1.08739;3484:0.77493;1426:0.608902;732:0.341987;257:0.338112;0:0.812084");
+    xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/bw_factor", "65472:0.940694;15424:0.697866;9376:0.58729;5776:1.08739;3484:0.77493;1426:0.608902;732:0.341987;257:0.338112;0:0.812084");
 
-    xbt_cfg_register(&_surf_cfg_set, "smpi/lat_factor",
+    xbt_cfg_register(&_sg_cfg_set, "smpi/lat_factor",
                      "Latency factors for smpi.",
                      xbt_cfgelm_string, NULL, 1, 1, NULL,
                      NULL);
-    xbt_cfg_setdefault_string(_surf_cfg_set, "smpi/lat_factor", "65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467");
-//END SMPI
+    xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/lat_factor", "65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467");
+
+    xbt_cfg_register(&_sg_cfg_set, "smpi/os",
+                     "Small messages timings (MPI_Isend/Send minimum time for small messages)",
+                     xbt_cfgelm_string, NULL, 1, 1, NULL,
+                     NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/os", "1:0:0:0:0");
+
+    xbt_cfg_register(&_sg_cfg_set, "smpi/or",
+                     "Small messages timings (MPI_Recv minimum time for small messages)",
+                     xbt_cfgelm_string, NULL, 1, 1, NULL,
+                     NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/or", "1:0:0:0:0");
+
+
+    //END SMPI
 
 
     if (!surf_path) {
@@ -683,25 +703,27 @@ void surf_config_init(int *argc, char **argv)
                   "__surf_get_initial_path() failed! Can't resolves current Windows directory");
 
       surf_path = xbt_dynar_new(sizeof(char *), NULL);
-      xbt_cfg_setdefault_string(_surf_cfg_set, "path", initial_path);
+      xbt_cfg_setdefault_string(_sg_cfg_set, "path", initial_path);
     }
 
-    _surf_init_status = 1;
+    _sg_init_status = 1;
+
+    sg_config_cmd_line(argc, argv);
 
-    surf_config_cmd_line(argc, argv);
+    xbt_mallocator_initialization_is_done(SIMIX_context_is_parallel());
 
   } else {
-    XBT_WARN("Call to surf_config_init() after initialization ignored");
+    XBT_WARN("Call to sg_config_init() after initialization ignored");
   }
 }
 
-void surf_config_finalize(void)
+void sg_config_finalize(void)
 {
-  if (!_surf_init_status)
+  if (!_sg_init_status)
     return;                     /* Not initialized yet. Nothing to do */
 
-  xbt_cfg_free(&_surf_cfg_set);
-  _surf_init_status = 0;
+  xbt_cfg_free(&_sg_cfg_set);
+  _sg_init_status = 0;
 }
 
 /* Pick the right models for CPU, net and workstation, and call their model_init_preparse */
@@ -715,24 +737,24 @@ void surf_config_models_setup()
   char *storage_model_name = NULL;
 
   workstation_model_name =
-      xbt_cfg_get_string(_surf_cfg_set, "workstation/model");
-  network_model_name = xbt_cfg_get_string(_surf_cfg_set, "network/model");
-  cpu_model_name = xbt_cfg_get_string(_surf_cfg_set, "cpu/model");
-  storage_model_name = xbt_cfg_get_string(_surf_cfg_set, "storage/model");
+      xbt_cfg_get_string(_sg_cfg_set, "workstation/model");
+  network_model_name = xbt_cfg_get_string(_sg_cfg_set, "network/model");
+  cpu_model_name = xbt_cfg_get_string(_sg_cfg_set, "cpu/model");
+  storage_model_name = xbt_cfg_get_string(_sg_cfg_set, "storage/model");
 
   /* Check whether we use a net/cpu model differing from the default ones, in which case
    * we should switch to the "compound" workstation model to correctly dispatch stuff to
    * the right net/cpu models.
    */
 
-  if((!xbt_cfg_is_default_value(_surf_cfg_set, "network/model") ||
-    !xbt_cfg_is_default_value(_surf_cfg_set, "cpu/model")) &&
-    xbt_cfg_is_default_value(_surf_cfg_set, "workstation/model"))
+  if((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
+    !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
+    xbt_cfg_is_default_value(_sg_cfg_set, "workstation/model"))
   {
       const char *val = "compound";
       XBT_INFO
           ("Switching workstation model to compound since you changed the network and/or cpu model(s)");
-      xbt_cfg_set_string(_surf_cfg_set, "workstation/model", val);
+      xbt_cfg_set_string(_sg_cfg_set, "workstation/model", val);
       workstation_model_name = (char *) "compound";
   }
 
@@ -771,9 +793,30 @@ void surf_config_models_setup()
   /* TUTORIAL: New model                                                   */
   int new_model_id = -1;
   char *new_model_name = NULL;
-  new_model_name = xbt_cfg_get_string(_surf_cfg_set, "new_model/model");
+  new_model_name = xbt_cfg_get_string(_sg_cfg_set, "new_model/model");
   XBT_DEBUG("Call new model_init");
   new_model_id = find_model_description(surf_new_model_description, new_model_name);
   surf_new_model_description[new_model_id].model_init_preparse();
   /* ********************************************************************* */
 }
+
+int sg_cfg_get_int(const char* name)
+{
+       return xbt_cfg_get_int(_sg_cfg_set,name);
+}
+double sg_cfg_get_double(const char* name)
+{
+       return xbt_cfg_get_double(_sg_cfg_set,name);
+}
+char* sg_cfg_get_string(const char* name)
+{
+       return xbt_cfg_get_string(_sg_cfg_set,name);
+}
+void sg_cfg_get_peer(const char *name, char **peer, int *port)
+{
+       xbt_cfg_get_peer(_sg_cfg_set,name, peer, port);
+}
+xbt_dynar_t sg_cfg_get_dynar(const char* name)
+{
+       return xbt_cfg_get_dynar(_sg_cfg_set,name);
+}
index 8c1e185..ba6d03f 100644 (file)
@@ -11,6 +11,7 @@
 #include "xbt/swag.h"
 #include "xbt/xbt_os_thread.h"
 #include "smx_private.h"
+#include "simgrid/sg_config.h"
 #include "internal_config.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_context, simix,
@@ -105,7 +106,7 @@ void SIMIX_context_mod_exit(void)
     finalize_factory = simix_global->context_factory->finalize;
     finalize_factory(&simix_global->context_factory);
   }
-  xbt_dict_remove((xbt_dict_t) _surf_cfg_set,"contexts/factory");
+  xbt_dict_remove((xbt_dict_t) _sg_cfg_set,"contexts/factory");
 }
 
 /**
index 9acbbd1..90e6b84 100644 (file)
@@ -232,11 +232,6 @@ static void smx_ctx_sysv_suspend_serial(smx_context_t context)
   smx_context_t next_context;
   unsigned long int i = sysv_process_index++;
 
-  if(MC_is_active()){
-    MC_ignore_stack("next_context", "smx_ctx_sysv_suspend_serial");
-    MC_ignore_stack("i", "smx_ctx_sysv_suspend_serial");
-  }
-
   if (i < xbt_dynar_length(simix_global->process_to_run)) {
     /* execute the next process */
     XBT_DEBUG("Run next process");
index 5cb246b..766658e 100644 (file)
@@ -76,6 +76,11 @@ static void parse_process(sg_platf_process_cbarg_t process)
   current_property_set = NULL;
 }
 
+void SIMIX_init_application(void){
+  surf_parse_reset_callbacks();
+  sg_platf_process_add_cb(parse_process);
+}
+
 /**
  * \brief An application deployer.
  *
@@ -98,9 +103,7 @@ void SIMIX_launch_application(const char *file)
   xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_launch_application.");
 
-  surf_parse_reset_callbacks();
-
-  sg_platf_process_add_cb(parse_process);
+  SIMIX_init_application();
 
   surf_parse_open(file);
   TRY {
index 3315b51..3d72dd4 100644 (file)
@@ -27,10 +27,10 @@ static void SIMIX_clean(void);
 /* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
 #include <signal.h>
 
-int _surf_do_verbose_exit = 1;
+int _sg_do_verbose_exit = 1;
 static void _XBT_CALL inthandler(int ignored)
 {
-  if ( _surf_do_verbose_exit ) {
+  if ( _sg_do_verbose_exit ) {
      XBT_INFO("CTRL-C pressed. Displaying status and bailing out");
      SIMIX_display_process_status();
   }
@@ -487,6 +487,9 @@ static void SIMIX_action_mallocator_reset_f(void* action) {
   ((smx_action_t) action)->simcalls = fifo;
 }
 
+xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name){
+  return SIMIX_asr_get_properties(name);
+}
 xbt_dict_t SIMIX_asr_get_properties(const char *name)
 {
   return xbt_lib_get_or_null(as_router_lib, name, ROUTING_PROP_ASR_LEVEL);
index 2308f27..f0b1e0d 100644 (file)
@@ -76,27 +76,28 @@ void SIMIX_host_destroy(void *h)
   return;
 }
 
-/**
- * \brief Returns a dict of all hosts.
- *
- * \return List of all hosts (as a #xbt_dict_t)
- */
-xbt_dict_t SIMIX_host_get_dict(void)
-{
-  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);
-  }
-  return host_dict;
-}
-
-smx_host_t SIMIX_host_get_by_name(const char *name)
-{
+///**
+// * \brief Returns a dict of all hosts.
+// *
+// * \return List of all hosts (as a #xbt_dict_t)
+// */
+//xbt_dict_t SIMIX_host_get_dict(void)
+//{
+//  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);
+//  }
+//  return host_dict;
+//}
+smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t simcall, const char *name){
+   return SIMIX_host_get_by_name(name);
+}
+smx_host_t SIMIX_host_get_by_name(const char *name){
   xbt_assert(((simix_global != NULL)
                && (host_lib != NULL)),
               "Environment not set yet");
@@ -110,6 +111,9 @@ smx_host_t SIMIX_host_self(void)
   return (process == NULL) ? NULL : SIMIX_process_get_host(process);
 }
 
+const char* SIMIX_pre_host_self_get_name(smx_simcall_t simcall){
+   return SIMIX_host_self_get_name();
+}
 /* needs to be public and without simcall because it is called
    by exceptions and logging events */
 const char* SIMIX_host_self_get_name(void)
@@ -121,56 +125,73 @@ const char* SIMIX_host_self_get_name(void)
   return SIMIX_host_get_name(host);
 }
 
-const char* SIMIX_host_get_name(smx_host_t host)
-{
+const char* SIMIX_pre_host_get_name(smx_simcall_t simcall, smx_host_t host){
+   return SIMIX_host_get_name(host);
+}
+const char* SIMIX_host_get_name(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters");
 
   return host->name;
 }
 
-xbt_dict_t SIMIX_host_get_properties(smx_host_t host)
-{
+xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t simcall, smx_host_t host){
+  return SIMIX_host_get_properties(host);
+}
+xbt_dict_t SIMIX_host_get_properties(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_model->extension.workstation.get_properties(host->host);
 }
 
-double SIMIX_host_get_speed(smx_host_t host)
-{
+double SIMIX_pre_host_get_speed(smx_simcall_t simcall, smx_host_t host){
+  return SIMIX_host_get_speed(host);
+}
+double SIMIX_host_get_speed(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_model->extension.workstation.
       get_speed(host->host, 1.0);
 }
 
-double SIMIX_host_get_available_speed(smx_host_t host)
-{
+double SIMIX_pre_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){
+  return SIMIX_host_get_available_speed(host);
+}
+double SIMIX_host_get_available_speed(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_model->extension.workstation.
       get_available_speed(host->host);
 }
 
-int SIMIX_host_get_state(smx_host_t host)
-{
+int SIMIX_pre_host_get_state(smx_simcall_t simcall, smx_host_t host){
+  return SIMIX_host_get_state(host);
+}
+int SIMIX_host_get_state(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_model->extension.workstation.
       get_state(host->host);
 }
 
+void* SIMIX_pre_host_self_get_data(smx_simcall_t simcall){
+  return SIMIX_host_self_get_data();
+}
 void* SIMIX_host_self_get_data(void)
 {
-  return SIMIX_host_get_data(SIMIX_host_self());
+  smx_host_t self = SIMIX_host_self();
+  return SIMIX_host_get_data(self);
 }
 
 void SIMIX_host_self_set_data(void *data)
 {
-  SIMIX_host_set_data(SIMIX_host_self(), data);
+  smx_host_t self = SIMIX_host_self();
+  SIMIX_host_set_data(self, data);
 }
 
-void* SIMIX_host_get_data(smx_host_t host)
-{
+void* SIMIX_pre_host_get_data(smx_simcall_t simcall,smx_host_t host){
+  return SIMIX_host_get_data(host);
+}
+void* SIMIX_host_get_data(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return host->data;
@@ -277,18 +298,23 @@ void SIMIX_host_autorestart(smx_host_t host)
     xbt_die("No function for simix_global->autorestart");
 }
 
-void SIMIX_host_set_data(smx_host_t host, void *data)
-{
+void SIMIX_pre_host_set_data(smx_simcall_t simcall, smx_host_t host, void *data) {
+  SIMIX_host_set_data(host, data);
+}
+void SIMIX_host_set_data(smx_host_t host, void *data){
   xbt_assert((host != NULL), "Invalid parameters");
   xbt_assert((host->data == NULL), "Data already set");
 
   host->data = data;
 }
 
-smx_action_t SIMIX_host_execute(const char *name, smx_host_t host,
-                                double computation_amount,
-                                double priority)
-{
+smx_action_t SIMIX_pre_host_execute(smx_simcall_t simcall,const char *name,
+    smx_host_t host, double computation_amount, double priority){
+  return SIMIX_host_execute(name, host, computation_amount, priority);
+}
+smx_action_t SIMIX_host_execute(const char *name,
+    smx_host_t host, double computation_amount, double priority){
+
   /* alloc structures and initialize */
   smx_action_t action = xbt_mallocator_get(simix_global->action_mallocator);
   action->type = SIMIX_ACTION_EXECUTE;
@@ -314,11 +340,18 @@ smx_action_t SIMIX_host_execute(const char *name, smx_host_t host,
   return action;
 }
 
-smx_action_t SIMIX_host_parallel_execute( const char *name,
+smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t simcall, const char *name,
     int host_nb, smx_host_t *host_list,
     double *computation_amount, double *communication_amount,
-    double amount, double rate)
-{
+    double amount, double rate){
+  return SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount,
+                                    communication_amount, amount, rate);
+}
+smx_action_t SIMIX_host_parallel_execute(const char *name,
+    int host_nb, smx_host_t *host_list,
+    double *computation_amount, double *communication_amount,
+    double amount, double rate){
+
   void **workstation_list = NULL;
   int i;
 
@@ -352,8 +385,10 @@ smx_action_t SIMIX_host_parallel_execute( const char *name,
   return action;
 }
 
-void SIMIX_host_execution_destroy(smx_action_t action)
-{
+void SIMIX_pre_host_execution_destroy(smx_simcall_t simcall, smx_action_t action){
+  SIMIX_host_execution_destroy(action);
+}
+void SIMIX_host_execution_destroy(smx_action_t action){
   XBT_DEBUG("Destroy action %p", action);
 
   if (action->execution.surf_exec) {
@@ -364,16 +399,20 @@ void SIMIX_host_execution_destroy(smx_action_t action)
   xbt_mallocator_release(simix_global->action_mallocator, action);
 }
 
-void SIMIX_host_execution_cancel(smx_action_t action)
-{
+void SIMIX_pre_host_execution_cancel(smx_simcall_t simcall, smx_action_t action){
+  SIMIX_host_execution_cancel(action);
+}
+void SIMIX_host_execution_cancel(smx_action_t action){
   XBT_DEBUG("Cancel action %p", action);
 
   if (action->execution.surf_exec)
     surf_workstation_model->action_cancel(action->execution.surf_exec);
 }
 
-double SIMIX_host_execution_get_remains(smx_action_t action)
-{
+double SIMIX_pre_host_execution_get_remains(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_host_execution_get_remains(action);
+}
+double SIMIX_host_execution_get_remains(smx_action_t action){
   double result = 0.0;
 
   if (action->state == SIMIX_RUNNING)
@@ -382,20 +421,23 @@ double SIMIX_host_execution_get_remains(smx_action_t action)
   return result;
 }
 
-e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action)
-{
+e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_host_execution_get_state(action);
+}
+e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action){
   return action->state;
 }
 
-void SIMIX_host_execution_set_priority(smx_action_t action, double priority)
-{
+void SIMIX_pre_host_execution_set_priority(smx_simcall_t simcall, smx_action_t action,
+                                       double priority){
+  return SIMIX_host_execution_set_priority(action, priority);
+}
+void SIMIX_host_execution_set_priority(smx_action_t action, double priority){
   if(action->execution.surf_exec)
     surf_workstation_model->set_priority(action->execution.surf_exec, priority);
 }
 
-void SIMIX_pre_host_execution_wait(smx_simcall_t simcall)
-{
-  smx_action_t action = simcall->host_execution_wait.execution;
+void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action){
 
   XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state);
 
@@ -463,7 +505,7 @@ void SIMIX_execution_finish(smx_action_t action)
     }
 
     simcall->issuer->waiting_action =    NULL;
-    simcall->host_execution_wait.result = action->state;
+    simcall_host_execution_wait__set__result(simcall, action->state);
     SIMIX_simcall_answer(simcall);
   }
 
@@ -500,6 +542,10 @@ void SIMIX_post_host_execute(smx_action_t action)
 
 
 #ifdef HAVE_TRACING
+void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
+                           const char *category){
+  SIMIX_set_category(action, category);
+}
 void SIMIX_set_category(smx_action_t action, const char *category)
 {
   if (action->state != SIMIX_RUNNING) return;
index 7da4059..6819f61 100644 (file)
@@ -31,6 +31,7 @@ void SIMIX_host_add_auto_restart_process(smx_host_t host,
                                          int argc, char **argv,
                                          xbt_dict_t properties,
                                          int auto_restart);
+
 void SIMIX_host_restart_processes(smx_host_t host);
 void SIMIX_host_autorestart(smx_host_t host);
 xbt_dict_t SIMIX_host_get_properties(smx_host_t host);
@@ -48,7 +49,27 @@ void SIMIX_host_execution_cancel(smx_action_t action);
 double SIMIX_host_execution_get_remains(smx_action_t action);
 e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action);
 void SIMIX_host_execution_set_priority(smx_action_t action, double priority);
-void SIMIX_pre_host_execution_wait(smx_simcall_t simcall);
+void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action);
+
+// pre prototypes
+smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t, const char*);
+const char* SIMIX_pre_host_self_get_name(smx_simcall_t);
+const char* SIMIX_pre_host_get_name(smx_simcall_t, smx_host_t);
+xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t, smx_host_t);
+double SIMIX_pre_host_get_speed(smx_simcall_t, smx_host_t);
+double SIMIX_pre_host_get_available_speed(smx_simcall_t, smx_host_t);
+int SIMIX_pre_host_get_state(smx_simcall_t, smx_host_t);
+void* SIMIX_pre_host_self_get_data(smx_simcall_t);
+void* SIMIX_pre_host_get_data(smx_simcall_t, smx_host_t);
+void SIMIX_pre_host_set_data(smx_simcall_t, smx_host_t, void*);
+smx_action_t SIMIX_pre_host_execute(smx_simcall_t, const char*, smx_host_t, double, double);
+smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*,
+                                             double*, double*, double, double);
+void SIMIX_pre_host_execution_destroy(smx_simcall_t, smx_action_t);
+void SIMIX_pre_host_execution_cancel(smx_simcall_t, smx_action_t);
+double SIMIX_pre_host_execution_get_remains(smx_simcall_t, smx_action_t);
+e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t, smx_action_t);
+void SIMIX_pre_host_execution_set_priority(smx_simcall_t, smx_action_t, double);
 
 void SIMIX_host_execution_suspend(smx_action_t action);
 void SIMIX_host_execution_resume(smx_action_t action);
@@ -56,6 +77,8 @@ void SIMIX_host_execution_resume(smx_action_t action);
 void SIMIX_post_host_execute(smx_action_t action);
 
 #ifdef HAVE_TRACING
+void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
+                           const char *category);
 void SIMIX_set_category(smx_action_t action, const char *category);
 #endif
 
index 0a11720..383510b 100644 (file)
@@ -15,13 +15,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix,
 
 
 //SIMIX FILE READ
-void SIMIX_pre_file_read(smx_simcall_t simcall)
+void SIMIX_pre_file_read(smx_simcall_t simcall, void *ptr, size_t size,
+                        size_t nmemb, smx_file_t stream)
 {
-  smx_action_t action = SIMIX_file_read(simcall->issuer,
-      simcall->file_read.ptr,
-      simcall->file_read.size,
-      simcall->file_read.nmemb,
-      simcall->file_read.stream);
+  smx_action_t action = SIMIX_file_read(simcall->issuer, ptr, size, nmemb, stream);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -55,13 +52,10 @@ smx_action_t SIMIX_file_read(smx_process_t process, void* ptr, size_t size, size
 }
 
 //SIMIX FILE WRITE
-void SIMIX_pre_file_write(smx_simcall_t simcall)
+void SIMIX_pre_file_write(smx_simcall_t simcall, const void *ptr, size_t size,
+                         size_t nmemb, smx_file_t stream)
 {
-  smx_action_t action = SIMIX_file_write(simcall->issuer,
-      simcall->file_write.ptr,
-      simcall->file_write.size,
-      simcall->file_write.nmemb,
-      simcall->file_write.stream);
+  smx_action_t action = SIMIX_file_write(simcall->issuer, ptr, size, nmemb, stream);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -95,12 +89,10 @@ smx_action_t SIMIX_file_write(smx_process_t process, const void* ptr, size_t siz
 }
 
 //SIMIX FILE OPEN
-void SIMIX_pre_file_open(smx_simcall_t simcall)
+void SIMIX_pre_file_open(smx_simcall_t simcall, const char* mount,
+                        const char* path, const char* mode)
 {
-  smx_action_t action = SIMIX_file_open(simcall->issuer,
-      simcall->file_open.mount,
-      simcall->file_open.path,
-      simcall->file_open.mode);
+  smx_action_t action = SIMIX_file_open(simcall->issuer, mount, path, mode);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -134,10 +126,9 @@ smx_action_t SIMIX_file_open(smx_process_t process ,const char* mount, const cha
 }
 
 //SIMIX FILE CLOSE
-void SIMIX_pre_file_close(smx_simcall_t simcall)
+void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fp)
 {
-  smx_action_t action = SIMIX_file_close(simcall->issuer,
-      simcall->file_close.fp);
+  smx_action_t action = SIMIX_file_close(simcall->issuer, fp);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -171,11 +162,9 @@ smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fp)
 }
 
 //SIMIX FILE STAT
-void SIMIX_pre_file_stat(smx_simcall_t simcall)
+void SIMIX_pre_file_stat(smx_simcall_t simcall, smx_file_t fd, s_file_stat_t *buf)
 {
-  smx_action_t action = SIMIX_file_stat(simcall->issuer,
-      simcall->file_stat.fd,
-      simcall->file_stat.buf);
+  smx_action_t action = SIMIX_file_stat(simcall->issuer, fd, *buf);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -208,10 +197,9 @@ smx_action_t SIMIX_file_stat(smx_process_t process, smx_file_t fd, s_file_stat_t
 }
 
 //SIMIX FILE UNLINK
-void SIMIX_pre_file_unlink(smx_simcall_t simcall)
+void SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd)
 {
-  smx_action_t action = SIMIX_file_unlink(simcall->issuer,
-      simcall->file_unlink.fd);
+  smx_action_t action = SIMIX_file_unlink(simcall->issuer, fd);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -244,10 +232,10 @@ smx_action_t SIMIX_file_unlink(smx_process_t process, smx_file_t fd)
 }
 
 //SIMIX FILE LS
-void SIMIX_pre_file_ls(smx_simcall_t simcall)
+void SIMIX_pre_file_ls(smx_simcall_t simcall,
+                       const char* mount, const char* path)
 {
-  smx_action_t action = SIMIX_file_ls(simcall->issuer,
-      simcall->file_ls.mount, simcall->file_ls.path);
+  smx_action_t action = SIMIX_file_ls(simcall->issuer, mount, path);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -298,34 +286,35 @@ void SIMIX_post_io(smx_action_t action)
 
   xbt_fifo_foreach(action->simcalls,i,simcall,smx_simcall_t) {
     switch (simcall->call) {
-    case SIMCALL_FILE_OPEN:
-      simcall->file_open.result = xbt_new(s_smx_file_t,1);
-      simcall->file_open.result->surf_file = (action->io.surf_io)->file;
+    case SIMCALL_FILE_OPEN:;
+      smx_file_t tmp = xbt_new(s_smx_file_t,1);
+      tmp->surf_file = (action->io.surf_io)->file;
+      simcall_file_open__set__result(simcall, tmp);
       break;
 
     case SIMCALL_FILE_CLOSE:
-      xbt_free(simcall->file_close.fp);
-      simcall->file_close.result = 0;
+      xbt_free(simcall_file_close__get__fp(simcall));
+      simcall_file_close__set__result(simcall, 0);
       break;
 
     case SIMCALL_FILE_WRITE:
-      simcall->file_write.result = (action->io.surf_io)->cost;
+      simcall_file_write__set__result(simcall, (action->io.surf_io)->cost);
       break;
 
     case SIMCALL_FILE_READ:
-      simcall->file_read.result = (action->io.surf_io)->cost;
+      simcall_file_read__set__result(simcall, (action->io.surf_io)->cost);
       break;
 
     case SIMCALL_FILE_STAT:
-      simcall->file_stat.result = 0;
-      dst = &(simcall->file_stat.buf);
+      simcall_file_stat__set__result(simcall, 0);
+      dst = simcall_file_stat__get__buf(simcall);
       src = &((action->io.surf_io)->stat);
       file_stat_copy(src,dst);
       break;
 
     case SIMCALL_FILE_UNLINK:
-      xbt_free(simcall->file_unlink.fd);
-      simcall->file_unlink.result = 0;
+      xbt_free(simcall_file_unlink__get__fd(simcall));
+      simcall_file_unlink__set__result(simcall, 0);
       break;
 
     case SIMCALL_FILE_LS:
@@ -337,7 +326,7 @@ void SIMIX_post_io(smx_action_t action)
           xbt_dict_set((action->io.surf_io)->ls_dict,key,dst,free_file_stat);
         }
       }
-      simcall->file_ls.result = (action->io.surf_io)->ls_dict;
+      simcall_file_ls__set__result(simcall, (action->io.surf_io)->ls_dict);
       break;
 
     default:
index b7df26c..c158322 100644 (file)
 #include "simgrid/simix.h"
 #include "smx_smurf_private.h"
 
-void SIMIX_pre_file_read(smx_simcall_t simcall);
-void SIMIX_pre_file_write(smx_simcall_t simcall);
-void SIMIX_pre_file_open(smx_simcall_t simcall);
-void SIMIX_pre_file_close(smx_simcall_t simcall);
-void SIMIX_pre_file_stat(smx_simcall_t simcall);
-void SIMIX_pre_file_unlink(smx_simcall_t simcall);
-void SIMIX_pre_file_ls(smx_simcall_t simcall);
+void SIMIX_pre_file_read(smx_simcall_t simcall, void *ptr, size_t size,
+                        size_t nmemb, smx_file_t stream);
+void SIMIX_pre_file_write(smx_simcall_t simcall, const void *ptr, size_t size,
+                         size_t nmemb, smx_file_t strea);
+void SIMIX_pre_file_open(smx_simcall_t simcall, const char* mount,
+                        const char* path, const char* mode);
+void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fp);
+void SIMIX_pre_file_stat(smx_simcall_t simcall, smx_file_t fd, s_file_stat_t *buf);
+void SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd);
+void SIMIX_pre_file_ls(smx_simcall_t simcall,
+                       const char* mount, const char* path);
 
 smx_action_t SIMIX_file_read(smx_process_t process, void* ptr, size_t size, size_t nmemb, smx_file_t stream);
 smx_action_t SIMIX_file_write(smx_process_t process, const void* ptr, size_t size, size_t nmemb, smx_file_t stream);
@@ -30,4 +34,6 @@ void SIMIX_post_io(smx_action_t action);
 void SIMIX_io_destroy(smx_action_t action);
 void SIMIX_io_finish(smx_action_t action);
 
+// pre prototypes
+
 #endif
index 82313fb..23600af 100644 (file)
@@ -43,6 +43,9 @@ void SIMIX_network_exit(void)
 /*                           Rendez-Vous Points                               */
 /******************************************************************************/
 
+smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name){
+  return SIMIX_rdv_create(name);
+}
 smx_rdv_t SIMIX_rdv_create(const char *name)
 {
   /* two processes may have pushed the same rdv_create simcall at the same time */
@@ -63,6 +66,9 @@ smx_rdv_t SIMIX_rdv_create(const char *name)
   return rdv;
 }
 
+void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv){
+  return SIMIX_rdv_destroy(rdv);
+}
 void SIMIX_rdv_destroy(smx_rdv_t rdv)
 {
   if (rdv->name)
@@ -85,11 +91,17 @@ xbt_dict_t SIMIX_get_rdv_points()
   return rdv_points;
 }
 
+smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name){
+  return SIMIX_rdv_get_by_name(name);
+}
 smx_rdv_t SIMIX_rdv_get_by_name(const char *name)
 {
   return xbt_dict_get_or_null(rdv_points, name);
 }
 
+int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){
+  return SIMIX_rdv_comm_count_by_host(rdv, host);
+}
 int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
 {
   smx_action_t comm = NULL;
@@ -104,11 +116,17 @@ int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
   return count;
 }
 
+smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv){
+  return SIMIX_rdv_get_head(rdv);
+}
 smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv)
 {
   return xbt_fifo_get_item_content(xbt_fifo_get_first_item(rdv->comm_fifo));
 }
 
+smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv){
+  return SIMIX_rdv_get_receiver(rdv);
+}
 /**
  *  \brief get the receiver (process associated to the mailbox)
  *  \param rdv The rendez-vous point
@@ -119,12 +137,16 @@ smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv)
   return rdv->permanent_receiver;
 }
 
+void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv,
+                           smx_process_t process){
+  SIMIX_rdv_set_receiver(rdv, process);
+}
 /**
  *  \brief set the receiver of the rendez vous point to allow eager sends
  *  \param rdv The rendez-vous point
  *  \param process The receiving process
  */
-void SIMIX_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process)
+void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t process)
 {
   rdv->permanent_receiver=process;
 }
@@ -245,6 +267,9 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
   /* set communication */
   act->comm.type = type;
   act->comm.refcount = 1;
+  act->comm.src_data=NULL;
+  act->comm.dst_data=NULL;
+
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   //initialize with unknown value
@@ -261,6 +286,9 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
   return act;
 }
 
+void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action){
+  SIMIX_comm_destroy(action);
+}
 /**
  *  \brief Destroy a communicate action
  *  \param action The communicate action to be destroyed
@@ -277,7 +305,7 @@ void SIMIX_comm_destroy(smx_action_t action)
   }
   action->comm.refcount--;
   if (action->comm.refcount > 0)
-    return;
+      return;
   XBT_DEBUG("Really free communication %p; refcount is now %d", action,
             action->comm.refcount);
 
@@ -297,6 +325,9 @@ void SIMIX_comm_destroy(smx_action_t action)
     action->comm.src_buff = NULL;
   }
 
+  if(action->comm.rdv)
+    SIMIX_rdv_remove(action->comm.rdv, action);
+
   xbt_mallocator_release(simix_global->action_mallocator, action);
 }
 
@@ -321,6 +352,27 @@ void SIMIX_comm_destroy_internal_actions(smx_action_t action)
   }
 }
 
+void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  double task_size, double rate,
+                                  void *src_buff, size_t src_buff_size,
+                                  int (*match_fun)(void *, void *,smx_action_t),
+                                 void *data, double timeout){
+  smx_action_t comm = SIMIX_comm_isend(simcall->issuer, rdv, task_size, rate,
+                                      src_buff, src_buff_size, match_fun, NULL,
+                                      data, 0);
+  simcall->mc_value = 0;
+  SIMIX_pre_comm_wait(simcall, comm, timeout);
+}
+smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  double task_size, double rate,
+                                  void *src_buff, size_t src_buff_size,
+                                  int (*match_fun)(void *, void *,smx_action_t),
+                                  void (*clean_fun)(void *), 
+                                 void *data, int detached){
+  return SIMIX_comm_isend(simcall->issuer, rdv, task_size, rate, src_buff,
+                         src_buff_size, match_fun, clean_fun, data, detached);
+
+}
 smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
                               double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
@@ -397,6 +449,22 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
   return (detached ? NULL : other_action);
 }
 
+void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  void *dst_buff, size_t *dst_buff_size,
+                                  int (*match_fun)(void *, void *, smx_action_t),
+                                 void *data, double timeout){
+  smx_action_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff,
+                                      dst_buff_size, match_fun, data);
+  simcall->mc_value = 0;
+  SIMIX_pre_comm_wait(simcall, comm, timeout);
+}
+smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  void *dst_buff, size_t *dst_buff_size,
+                                  int (*match_fun)(void *, void *, smx_action_t),
+                                 void *data){
+  return SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff, dst_buff_size,
+                         match_fun, data);
+}
 smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
                               void *dst_buff, size_t *dst_buff_size,
                               int (*match_fun)(void *, void *, smx_action_t), void *data)
@@ -432,7 +500,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
       }/*else{
          XBT_DEBUG("Not yet finished, we have to wait %d\n", xbt_fifo_size(rdv->comm_fifo));
          }*/
-     // other_action->comm.refcount--;
+      other_action->comm.refcount--;
       SIMIX_comm_destroy(this_action);
       --smx_total_comms; // this creation was a pure waste
     }
@@ -454,7 +522,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
       --smx_total_comms; // this creation was a pure waste
       other_action->state = SIMIX_READY;
       other_action->comm.type = SIMIX_COMM_READY;
-   //   other_action->comm.refcount--;
+      //other_action->comm.refcount--;
     }
     xbt_fifo_push(dst_proc->comms, other_action);
   }
@@ -482,6 +550,12 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
   return other_action;
 }
 
+smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv,
+                                   int src, int tag,
+                                   int (*match_fun)(void *, void *, smx_action_t),
+                                   void *data){
+  return SIMIX_comm_iprobe(simcall->issuer, rdv, src, tag, match_fun, data);
+}
 
 smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int src,
                               int tag, int (*match_fun)(void *, void *, smx_action_t), void *data)
@@ -509,9 +583,9 @@ smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int src,
   return other_action;
 }
 
-void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout, int idx)
+void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout)
 {
-
+  int idx = simcall->mc_value;
   /* the simcall may be a wait, a send or a recv */
   surf_action_t sleep;
 
@@ -555,13 +629,11 @@ void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double time
   }
 }
 
-void SIMIX_pre_comm_test(smx_simcall_t simcall)
+void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action)
 {
-  smx_action_t action = simcall->comm_test.comm;
-
   if(MC_is_active()){
-    simcall->comm_test.result = action->comm.src_proc && action->comm.dst_proc;
-    if(simcall->comm_test.result){
+    simcall_comm_test__set__result(simcall, action->comm.src_proc && action->comm.dst_proc);
+    if(simcall_comm_test__get__result(simcall)){
       action->state = SIMIX_DONE;
       xbt_fifo_push(action->simcalls, simcall);
       SIMIX_comm_finish(action);
@@ -571,8 +643,8 @@ void SIMIX_pre_comm_test(smx_simcall_t simcall)
     return;
   }
 
-  simcall->comm_test.result = (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING);
-  if (simcall->comm_test.result) {
+  simcall_comm_test__set__result(simcall, (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING));
+  if (simcall_comm_test__get__result(simcall)) {
     xbt_fifo_push(action->simcalls, simcall);
     SIMIX_comm_finish(action);
   } else {
@@ -580,19 +652,19 @@ void SIMIX_pre_comm_test(smx_simcall_t simcall)
   }
 }
 
-void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx)
+void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions)
 {
+  int idx = simcall->mc_value;
   unsigned int cursor;
   smx_action_t action;
-  xbt_dynar_t actions = simcall->comm_testany.comms;
-  simcall->comm_testany.result = -1;
+  simcall_comm_testany__set__result(simcall, -1);
 
   if (MC_is_active()){
     if(idx == -1){
       SIMIX_simcall_answer(simcall);
     }else{
       action = xbt_dynar_get_as(actions, idx, smx_action_t);
-      simcall->comm_testany.result = idx;
+      simcall_comm_testany__set__result(simcall, idx);
       xbt_fifo_push(action->simcalls, simcall);
       action->state = SIMIX_DONE;
       SIMIX_comm_finish(action);
@@ -600,9 +672,9 @@ void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx)
     return;
   }
 
-  xbt_dynar_foreach(simcall->comm_testany.comms,cursor,action) {
+  xbt_dynar_foreach(simcall_comm_testany__get__comms(simcall), cursor,action) {
     if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
-      simcall->comm_testany.result = cursor;
+      simcall_comm_testany__set__result(simcall, cursor);
       xbt_fifo_push(action->simcalls, simcall);
       SIMIX_comm_finish(action);
       return;
@@ -611,16 +683,16 @@ void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx)
   SIMIX_simcall_answer(simcall);
 }
 
-void SIMIX_pre_comm_waitany(smx_simcall_t simcall, int idx)
+void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions)
 {
+  int idx = simcall->mc_value;
   smx_action_t action;
   unsigned int cursor = 0;
-  xbt_dynar_t actions = simcall->comm_waitany.comms;
 
   if (MC_is_active()){
     action = xbt_dynar_get_as(actions, idx, smx_action_t);
     xbt_fifo_push(action->simcalls, simcall);
-    simcall->comm_waitany.result = idx;
+    simcall_comm_waitany__set__result(simcall, idx);
     action->state = SIMIX_DONE;
     SIMIX_comm_finish(action);
     return;
@@ -642,7 +714,7 @@ void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
 {
   smx_action_t action;
   unsigned int cursor = 0;
-  xbt_dynar_t actions = simcall->comm_waitany.comms;
+  xbt_dynar_t actions = simcall_comm_waitany__get__comms(simcall);
 
   xbt_dynar_foreach(actions, cursor, action) {
     xbt_fifo_remove(action->simcalls, simcall);
@@ -716,7 +788,7 @@ void SIMIX_comm_finish(smx_action_t action)
     if (simcall->call == SIMCALL_COMM_WAITANY) {
       SIMIX_waitany_remove_simcall_from_actions(simcall);
       if (!MC_is_active())
-        simcall->comm_waitany.result = xbt_dynar_search(simcall->comm_waitany.comms, &action);
+        simcall_comm_waitany__set__result(simcall, xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &action));
     }
 
     /* If the action is still in a rendez-vous point then remove from it */
@@ -791,10 +863,10 @@ void SIMIX_comm_finish(smx_action_t action)
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
     if (simcall->issuer->doexception) {
       if (simcall->call == SIMCALL_COMM_WAITANY) {
-        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall->comm_waitany.comms, &action);
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &action);
       }
       else if (simcall->call == SIMCALL_COMM_TESTANY) {
-        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall->comm_testany.comms, &action);
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_testany__get__comms(simcall), &action);
       }
     }
 
@@ -805,6 +877,16 @@ void SIMIX_comm_finish(smx_action_t action)
 
     simcall->issuer->waiting_action = NULL;
     xbt_fifo_remove(simcall->issuer->comms, action);
+    if(action->comm.detached){
+      if(simcall->issuer == action->comm.src_proc){
+        if(action->comm.dst_proc)
+          xbt_fifo_remove(action->comm.dst_proc->comms, action);
+      }
+      if(simcall->issuer == action->comm.dst_proc){
+        if(action->comm.src_proc)
+          xbt_fifo_remove(action->comm.src_proc->comms, action);
+      }
+    }
     SIMIX_simcall_answer(simcall);
     destroy_count++;
   }
@@ -860,6 +942,9 @@ void SIMIX_post_comm(smx_action_t action)
   }
 }
 
+void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action){
+  SIMIX_comm_cancel(action);
+}
 void SIMIX_comm_cancel(smx_action_t action)
 {
   /* if the action is a waiting state means that it is still in a rdv */
@@ -894,6 +979,9 @@ void SIMIX_comm_resume(smx_action_t action)
 
 /************* Action Getters **************/
 
+double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_remains(action);
+}
 /**
  *  \brief get the amount remaining from the communication
  *  \param action The communication
@@ -924,11 +1012,17 @@ double SIMIX_comm_get_remains(smx_action_t action)
   return remains;
 }
 
+e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_state(action);
+}
 e_smx_state_t SIMIX_comm_get_state(smx_action_t action)
 {
   return action->state;
 }
 
+void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_src_data(action);
+}
 /**
  *  \brief Return the user data associated to the sender of the communication
  *  \param action The communication
@@ -939,6 +1033,9 @@ void* SIMIX_comm_get_src_data(smx_action_t action)
   return action->comm.src_data;
 }
 
+void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_dst_data(action);
+}
 /**
  *  \brief Return the user data associated to the receiver of the communication
  *  \param action The communication
@@ -949,11 +1046,17 @@ void* SIMIX_comm_get_dst_data(smx_action_t action)
   return action->comm.dst_data;
 }
 
+smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_src_proc(action);
+}
 smx_process_t SIMIX_comm_get_src_proc(smx_action_t action)
 {
   return action->comm.src_proc;
 }
 
+smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action){
+  return SIMIX_comm_get_dst_proc(action);
+}
 smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action)
 {
   return action->comm.dst_proc;
index 54b45bc..4add3ef 100644 (file)
@@ -56,13 +56,13 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
                               int (*)(void *, void *, smx_action_t), void *data);
 void SIMIX_comm_destroy(smx_action_t action);
 void SIMIX_comm_destroy_internal_actions(smx_action_t action);
-void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout, int idx);
 smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int src,
                               int tag, int (*match_fun)(void *, void *, smx_action_t), void *data);
-void SIMIX_pre_comm_waitany(smx_simcall_t simcall, int idx);
+void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout);
+void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions);
 void SIMIX_post_comm(smx_action_t action);
-void SIMIX_pre_comm_test(smx_simcall_t simcall);
-void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx);
+void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action);
+void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions);
 void SIMIX_comm_cancel(smx_action_t action);
 double SIMIX_comm_get_remains(smx_action_t action);
 e_smx_state_t SIMIX_comm_get_state(smx_action_t action);
@@ -71,5 +71,45 @@ void SIMIX_comm_resume(smx_action_t action);
 smx_process_t SIMIX_comm_get_src_proc(smx_action_t action);
 smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action);
 
+// pre prototypes
+smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv,
+                                   int src, int tag,
+                                   int (*match_fun)(void *, void *, smx_action_t),
+                                   void *data);
+smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name);
+void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv);
+smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name);
+int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host);
+smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv);
+smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv);
+void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv,
+                           smx_process_t process);
+void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  double task_size, double rate,
+                                  void *src_buff, size_t src_buff_size,
+                                  int (*match_fun)(void *, void *,smx_action_t),
+                                 void *data, double timeout);
+smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  double task_size, double rate,
+                                  void *src_buff, size_t src_buff_size,
+                                  int (*match_fun)(void *, void *,smx_action_t),
+                                  void (*clean_fun)(void *), 
+                                 void *data, int detached);
+void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  void *dst_buff, size_t *dst_buff_size,
+                                  int (*match_fun)(void *, void *, smx_action_t),
+                                 void *data, double timeout);
+smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
+                                  void *dst_buff, size_t *dst_buff_size,
+                                  int (*match_fun)(void *, void *, smx_action_t),
+                                 void *data);
+void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action);
+void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action);
+double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action);
+e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action);
+void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action);
+void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action);
+smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action);
+smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action);
 #endif
 
index e9418a4..434f87a 100644 (file)
@@ -38,6 +38,9 @@ int SIMIX_process_has_pending_comms(smx_process_t process) {
   return xbt_fifo_size(process->comms) > 0;
 }
 
+void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process) {
+  SIMIX_process_cleanup(process);
+}
 /**
  * \brief Moves a process to the list of processes to destroy.
  */
@@ -192,6 +195,20 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
   return process;
 }
 
+
+void SIMIX_pre_process_create(smx_simcall_t simcall,
+                         smx_process_t *process,
+                          const char *name,
+                          xbt_main_func_t code,
+                          void *data,
+                          const char *hostname,
+                          double kill_time,
+                          int argc, char **argv,
+                          xbt_dict_t properties,
+                          int auto_restart){
+  return SIMIX_process_create(process, name, code, data, hostname,
+                              kill_time, argc, argv, properties, auto_restart);
+}
 /**
  * \brief Internal function to create a process.
  *
@@ -231,6 +248,7 @@ void SIMIX_process_create(smx_process_t *process,
     (*process)->data = data;
     (*process)->comms = xbt_fifo_new();
     (*process)->simcall.issuer = *process;
+    
     /* Process data for auto-restart */
     (*process)->auto_restart = auto_restart;
     (*process)->code = code;
@@ -288,6 +306,9 @@ void SIMIX_process_runall(void)
   xbt_dynar_reset(simix_global->process_to_run);
 }
 
+void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process) {
+  SIMIX_process_kill(process, simcall->issuer);
+}
 /**
  * \brief Internal function to kill a SIMIX process.
  *
@@ -349,6 +370,9 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
 }
 
+void SIMIX_pre_process_killall(smx_simcall_t simcall) {
+  SIMIX_process_killall(simcall->issuer);
+}
 /**
  * \brief Kills all running processes.
  * \param issuer this one will not be killed
@@ -368,6 +392,11 @@ void SIMIX_process_killall(smx_process_t issuer)
   SIMIX_process_empty_trash();
 }
 
+void SIMIX_pre_process_change_host(smx_simcall_t simcall, smx_process_t process,
+                                  smx_host_t dest)
+{
+  process->new_host = dest;
+}
 void SIMIX_process_change_host(smx_process_t process,
              smx_host_t dest)
 {
@@ -377,14 +406,9 @@ void SIMIX_process_change_host(smx_process_t process,
   xbt_swag_insert(process, dest->process_list);
 }
 
-void SIMIX_pre_process_change_host(smx_process_t process, smx_host_t dest)
-{
-  process->new_host = dest;
-}
 
-void SIMIX_pre_process_suspend(smx_simcall_t simcall)
+void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process)
 {
-  smx_process_t process = simcall->process_suspend.process;
   smx_action_t action_suspend =
       SIMIX_process_suspend(process, simcall->issuer);
 
@@ -448,6 +472,10 @@ smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
   }
 }
 
+void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process){
+  SIMIX_process_resume(process, simcall->issuer);
+}
+
 void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
 {
   xbt_assert((process != NULL), "Invalid parameters");
@@ -502,11 +530,18 @@ int SIMIX_process_get_maxpid(void) {
   return simix_process_maxpid;
 }
 
+int SIMIX_pre_process_count(smx_simcall_t simcall){
+  return SIMIX_process_count();
+}
 int SIMIX_process_count(void)
 {
   return xbt_swag_size(simix_global->process_list);
 }
 
+void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t self){
+  return SIMIX_process_self_get_data(self);    
+}
+
 void* SIMIX_process_self_get_data(smx_process_t self)
 {
   xbt_assert(self == SIMIX_process_self(), "This is not the current process");
@@ -517,6 +552,10 @@ void* SIMIX_process_self_get_data(smx_process_t self)
   return SIMIX_process_get_data(self);
 }
 
+void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process,
+                                void *data){
+  SIMIX_process_set_data(process, data);
+}
 void SIMIX_process_self_set_data(smx_process_t self, void *data)
 {
   xbt_assert(self == SIMIX_process_self(), "This is not the current process");
@@ -524,6 +563,9 @@ void SIMIX_process_self_set_data(smx_process_t self, void *data)
   SIMIX_process_set_data(self, data);
 }
 
+void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process){
+  return SIMIX_process_get_data(process);
+}
 void* SIMIX_process_get_data(smx_process_t process)
 {
   return process->data;
@@ -534,6 +576,9 @@ void SIMIX_process_set_data(smx_process_t process, void *data)
   process->data = data;
 }
 
+smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process){
+  return SIMIX_process_get_host(process);
+}
 smx_host_t SIMIX_process_get_host(smx_process_t process)
 {
   return process->smx_host;
@@ -550,6 +595,9 @@ const char* SIMIX_process_self_get_name(void) {
   return SIMIX_process_get_name(process);
 }
 
+const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process) {
+  return SIMIX_process_get_name(process);
+}
 const char* SIMIX_process_get_name(smx_process_t process)
 {
   return process->name;
@@ -567,25 +615,31 @@ smx_process_t SIMIX_process_get_by_name(const char* name)
   return NULL;
 }
 
+int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process){
+  return SIMIX_process_is_suspended(process);
+}
 int SIMIX_process_is_suspended(smx_process_t process)
 {
   return process->suspended;
 }
 
+xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process){
+  return SIMIX_process_get_properties(process);
+}
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
 {
   return process->properties;
 }
 
-void SIMIX_pre_process_sleep(smx_simcall_t simcall)
+void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration)
 {
   if (MC_is_active()) {
-    MC_process_clock_add(simcall->issuer, simcall->process_sleep.duration);
-    simcall->process_sleep.result = SIMIX_DONE;
+    MC_process_clock_add(simcall->issuer, duration);
+    simcall_process_sleep__set__result(simcall, SIMIX_DONE);
     SIMIX_simcall_answer(simcall);
     return;
   }
-  smx_action_t action = SIMIX_process_sleep(simcall->issuer, simcall->process_sleep.duration);
+  smx_action_t action = SIMIX_process_sleep(simcall->issuer, duration);
   xbt_fifo_push(action->simcalls, simcall);
   simcall->issuer->waiting_action = action;
 }
@@ -644,7 +698,7 @@ void SIMIX_post_process_sleep(smx_action_t action)
         workstation.get_state(simcall->issuer->smx_host->host) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
-    simcall->process_sleep.result = state;
+    simcall_process_sleep__set__result(simcall, state);
     simcall->issuer->waiting_action = NULL;
     SIMIX_simcall_answer(simcall);
 
@@ -764,6 +818,8 @@ xbt_dynar_t SIMIX_processes_as_dynar(void) {
   }
   return res;
 }
+
+
 void SIMIX_process_on_exit_runall(smx_process_t process) {
   s_smx_process_exit_fun_t exit_fun;
 
@@ -772,6 +828,12 @@ void SIMIX_process_on_exit_runall(smx_process_t process) {
     (exit_fun.fun)(exit_fun.arg);
   }
 }
+
+void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process,
+                              int_f_pvoid_t fun, void *data) {
+  SIMIX_process_on_exit(process, fun, data);
+}
+
 void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data) {
   xbt_assert(process, "current process not found: are you in maestro context ?");
 
@@ -783,6 +845,11 @@ void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data)
 
   xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun);
 }
+
+void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
+                                       int auto_restart) {
+  SIMIX_process_auto_restart_set(process, auto_restart);       
+}
 /**
  * \brief Sets the auto-restart status of the process.
  * If set to 1, the process will be automatically restarted when its host
@@ -791,6 +858,10 @@ void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data)
 void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart) {
   process->auto_restart = auto_restart;
 }
+
+smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process) {
+  return SIMIX_process_restart(process, simcall->issuer);      
+}
 /**
  * \brief Restart a process.
  * Restart a process, starting it again from the beginning.
index 4e65afa..414d8b1 100644 (file)
@@ -81,12 +81,11 @@ void SIMIX_process_empty_trash(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,
+void SIMIX_pre_process_change_host(smx_simcall_t, smx_process_t process,
            smx_host_t dest);
 void SIMIX_process_change_host(smx_process_t process,
              smx_host_t dest);
-void SIMIX_pre_process_change_host(smx_process_t process, smx_host_t host);
-void SIMIX_pre_process_suspend(smx_simcall_t simcall);
+void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process);
 smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer);
 void SIMIX_process_resume(smx_process_t process, smx_process_t issuer);
 void* SIMIX_process_get_data(smx_process_t process);
@@ -96,7 +95,7 @@ const char* SIMIX_process_get_name(smx_process_t process);
 smx_process_t SIMIX_process_get_by_name(const char* name);
 int SIMIX_process_is_suspended(smx_process_t process);
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process);
-void SIMIX_pre_process_sleep(smx_simcall_t simcall);
+void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration);
 smx_action_t SIMIX_process_sleep(smx_process_t process, double duration);
 void SIMIX_post_process_sleep(smx_action_t action);
 
@@ -106,4 +105,27 @@ void SIMIX_process_sleep_destroy(smx_action_t action);
 void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart);
 smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer);
 
+// pre prototypes
+void SIMIX_pre_process_create(smx_simcall_t simcall, smx_process_t *process,
+                             const char *name, xbt_main_func_t code, void *data,
+                             const char *hostname, double kill_time, int argc,
+                             char **argv, xbt_dict_t properties, int auto_restart);
+void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process);
+void SIMIX_pre_process_killall(smx_simcall_t simcall);
+void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process);
+void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process);
+int SIMIX_pre_process_count(smx_simcall_t simcall);
+void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t process);
+void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process);
+void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process,
+                                void *data);
+smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process);
+const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process);
+int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process);
+xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process);
+void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process,
+                              int_f_pvoid_t fun, void *data);
+void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
+                                       int auto_restart);
+smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process);
 #endif
index 67dc288..aec3439 100644 (file)
@@ -48,531 +48,12 @@ void SIMIX_simcall_answer(smx_simcall_t simcall)
 void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
 {
   XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
-
+  simcall->mc_value = value;
   switch (simcall->call) {
-    case SIMCALL_COMM_TEST:
-      SIMIX_pre_comm_test(simcall);
-      break;
-
-    case SIMCALL_COMM_TESTANY:
-      SIMIX_pre_comm_testany(simcall, value);
-      break;
-
-    case SIMCALL_COMM_WAIT:
-      SIMIX_pre_comm_wait(simcall,
-          simcall->comm_wait.comm,
-          simcall->comm_wait.timeout,
-          value);
-      break;
-
-    case SIMCALL_COMM_WAITANY:
-      SIMIX_pre_comm_waitany(simcall, value);
-      break;
-
-    case SIMCALL_COMM_SEND:
-    {
-      smx_action_t comm = SIMIX_comm_isend(
-          simcall->issuer,
-          simcall->comm_send.rdv,
-          simcall->comm_send.task_size,
-          simcall->comm_send.rate,
-          simcall->comm_send.src_buff,
-          simcall->comm_send.src_buff_size,
-          simcall->comm_send.match_fun,
-          NULL, /* no clean function since it's not detached */
-          simcall->comm_send.data,
-          0);
-      SIMIX_pre_comm_wait(simcall, comm, simcall->comm_send.timeout, 0);
-      break;
-    }
-
-    case SIMCALL_COMM_ISEND:
-      simcall->comm_isend.result = SIMIX_comm_isend(
-          simcall->issuer,
-          simcall->comm_isend.rdv,
-          simcall->comm_isend.task_size,
-          simcall->comm_isend.rate,
-          simcall->comm_isend.src_buff,
-          simcall->comm_isend.src_buff_size,
-          simcall->comm_isend.match_fun,
-          simcall->comm_isend.clean_fun,
-          simcall->comm_isend.data,
-          simcall->comm_isend.detached);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_RECV:
-    {
-      smx_action_t comm = SIMIX_comm_irecv(
-          simcall->issuer,
-          simcall->comm_recv.rdv,
-          simcall->comm_recv.dst_buff,
-          simcall->comm_recv.dst_buff_size,
-          simcall->comm_recv.match_fun,
-          simcall->comm_recv.data);
-      SIMIX_pre_comm_wait(simcall, comm, simcall->comm_recv.timeout, 0);
-      break;
-    }
-
-    case SIMCALL_COMM_IRECV:
-      simcall->comm_irecv.result = SIMIX_comm_irecv(
-          simcall->issuer,
-          simcall->comm_irecv.rdv,
-          simcall->comm_irecv.dst_buff,
-          simcall->comm_irecv.dst_buff_size,
-          simcall->comm_irecv.match_fun,
-          simcall->comm_irecv.data);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_IPROBE:
-      simcall->comm_iprobe.result = SIMIX_comm_iprobe(
-          simcall->issuer,
-          simcall->comm_iprobe.rdv,
-          simcall->comm_iprobe.src,
-          simcall->comm_iprobe.tag,
-          simcall->comm_iprobe.match_fun,
-          simcall->comm_iprobe.data);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_DESTROY:
-      SIMIX_comm_destroy(simcall->comm_destroy.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_CANCEL:
-      SIMIX_comm_cancel(simcall->comm_cancel.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_REMAINS:
-      simcall->comm_get_remains.result =
-          SIMIX_comm_get_remains(simcall->comm_get_remains.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_STATE:
-      simcall->comm_get_state.result =
-          SIMIX_comm_get_state(simcall->comm_get_state.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_SRC_DATA:
-      simcall->comm_get_src_data.result = SIMIX_comm_get_src_data(simcall->comm_get_src_data.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_DST_DATA:
-      simcall->comm_get_dst_data.result = SIMIX_comm_get_dst_data(simcall->comm_get_dst_data.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_SRC_PROC:
-      simcall->comm_get_src_proc.result =
-          SIMIX_comm_get_src_proc(simcall->comm_get_src_proc.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COMM_GET_DST_PROC:
-      simcall->comm_get_dst_proc.result =
-          SIMIX_comm_get_dst_proc(simcall->comm_get_dst_proc.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-    case SIMCALL_COMM_IS_LATENCY_BOUNDED:
-      simcall->comm_is_latency_bounded.result =
-          SIMIX_comm_is_latency_bounded(simcall->comm_is_latency_bounded.comm);
-      SIMIX_simcall_answer(simcall);
-      break;
-#endif
-
-    case SIMCALL_RDV_CREATE:
-      simcall->rdv_create.result = SIMIX_rdv_create(simcall->rdv_create.name);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_DESTROY:
-      SIMIX_rdv_destroy(simcall->rdv_destroy.rdv);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_GEY_BY_NAME:
-      simcall->rdv_get_by_name.result =
-        SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_COMM_COUNT_BY_HOST:
-      simcall->rdv_comm_count_by_host.result = SIMIX_rdv_comm_count_by_host(
-          simcall->rdv_comm_count_by_host.rdv,
-          simcall->rdv_comm_count_by_host.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_GET_HEAD:
-      simcall->rdv_get_head.result = SIMIX_rdv_get_head(simcall->rdv_get_head.rdv);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_SET_RECV:
-      SIMIX_rdv_set_receiver(simcall->rdv_set_rcv_proc.rdv, simcall->rdv_set_rcv_proc.receiver);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_RDV_GET_RECV:
-      simcall->rdv_get_rcv_proc.result = SIMIX_rdv_get_receiver(simcall->rdv_set_rcv_proc.rdv);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_BY_NAME:
-      simcall->host_get_by_name.result =
-        SIMIX_host_get_by_name(simcall->host_get_by_name.name);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_NAME:
-      simcall->host_get_name.result =  SIMIX_host_get_name(simcall->host_get_name.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_PROPERTIES:
-      simcall->host_get_properties.result =
-        SIMIX_host_get_properties(simcall->host_get_properties.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_SPEED:
-      simcall->host_get_speed.result = 
-        SIMIX_host_get_speed(simcall->host_get_speed.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_AVAILABLE_SPEED:
-      simcall->host_get_available_speed.result =
-        SIMIX_host_get_available_speed(simcall->host_get_available_speed.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_STATE:
-      simcall->host_get_state.result = 
-        SIMIX_host_get_state(simcall->host_get_state.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_GET_DATA:
-      simcall->host_get_data.result =  SIMIX_host_get_data(simcall->host_get_data.host);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_SET_DATA:
-      SIMIX_host_set_data(simcall->host_set_data.host, simcall->host_set_data.data);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTE:
-      simcall->host_execute.result = SIMIX_host_execute(
-    simcall->host_execute.name,
-    simcall->host_execute.host,
-    simcall->host_execute.computation_amount,
-    simcall->host_execute.priority);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_PARALLEL_EXECUTE:
-      simcall->host_parallel_execute.result = SIMIX_host_parallel_execute(
-    simcall->host_parallel_execute.name,
-    simcall->host_parallel_execute.host_nb,
-    simcall->host_parallel_execute.host_list,
-    simcall->host_parallel_execute.computation_amount,
-    simcall->host_parallel_execute.communication_amount,
-    simcall->host_parallel_execute.amount,
-    simcall->host_parallel_execute.rate);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_DESTROY:
-      SIMIX_host_execution_destroy(simcall->host_execution_destroy.execution);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_CANCEL:
-      SIMIX_host_execution_cancel(simcall->host_execution_cancel.execution);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_GET_REMAINS:
-      simcall->host_execution_get_remains.result =
-        SIMIX_host_execution_get_remains(simcall->host_execution_get_remains.execution);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_GET_STATE:
-      simcall->host_execution_get_state.result =
-        SIMIX_host_execution_get_state(simcall->host_execution_get_state.execution);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_SET_PRIORITY:
-      SIMIX_host_execution_set_priority(
-    simcall->host_execution_set_priority.execution,
-    simcall->host_execution_set_priority.priority);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_HOST_EXECUTION_WAIT:
-      SIMIX_pre_host_execution_wait(simcall);
-      break;
-
-    case SIMCALL_PROCESS_CREATE:
-      SIMIX_process_create(
-          simcall->process_create.process,
-    simcall->process_create.name,
-    simcall->process_create.code,
-    simcall->process_create.data,
-    simcall->process_create.hostname,
-    simcall->process_create.kill_time,
-    simcall->process_create.argc,
-    simcall->process_create.argv,
-    simcall->process_create.properties,
-    simcall->process_create.auto_restart);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_KILL:
-      SIMIX_process_kill(simcall->process_kill.process,simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_KILLALL:
-      SIMIX_process_killall(simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_CLEANUP:
-      SIMIX_process_cleanup(simcall->process_cleanup.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_CHANGE_HOST:
-      SIMIX_pre_process_change_host(
-          simcall->process_change_host.process,
-          simcall->process_change_host.dest);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_SUSPEND:
-      SIMIX_pre_process_suspend(simcall);
-      break;
-
-    case SIMCALL_PROCESS_RESUME:
-      SIMIX_process_resume(simcall->process_resume.process, simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_COUNT:
-      simcall->process_count.result = SIMIX_process_count();
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_GET_DATA:
-      simcall->process_get_data.result =
-        SIMIX_process_get_data(simcall->process_get_data.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-    case SIMCALL_PROCESS_ON_EXIT:
-      SIMIX_process_on_exit(simcall->process_on_exit.process,
-                            simcall->process_on_exit.fun,
-                            simcall->process_on_exit.data);
-      SIMIX_simcall_answer(simcall);
-    break;
-    case SIMCALL_PROCESS_RESTART:
-      simcall->process_restart.result = SIMIX_process_restart(simcall->process_restart.process, simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-    break;
-    case SIMCALL_PROCESS_AUTO_RESTART_SET:
-      SIMIX_process_auto_restart_set(simcall->process_auto_restart.process,simcall->process_auto_restart.auto_restart);
-      SIMIX_simcall_answer(simcall);
-    break;
-    case SIMCALL_PROCESS_SET_DATA:
-      SIMIX_process_set_data(
-    simcall->process_set_data.process,
-    simcall->process_set_data.data);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_GET_HOST:
-      simcall->process_get_host.result = SIMIX_process_get_host(simcall->process_get_host.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_GET_NAME:
-      simcall->process_get_name.result = SIMIX_process_get_name(simcall->process_get_name.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_IS_SUSPENDED:
-      simcall->process_is_suspended.result =
-        SIMIX_process_is_suspended(simcall->process_is_suspended.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_GET_PROPERTIES:
-      simcall->process_get_properties.result =
-        SIMIX_process_get_properties(simcall->process_get_properties.process);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_PROCESS_SLEEP:
-      SIMIX_pre_process_sleep(simcall);
-      break;
-
-#ifdef HAVE_TRACING
-    case SIMCALL_SET_CATEGORY:
-      SIMIX_set_category(
-          simcall->set_category.action,
-          simcall->set_category.category);
-      SIMIX_simcall_answer(simcall);
-      break;
-#endif
-
-    case SIMCALL_MUTEX_INIT:
-      simcall->mutex_init.result = SIMIX_mutex_init();
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_MUTEX_DESTROY:
-      SIMIX_mutex_destroy(simcall->mutex_destroy.mutex);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_MUTEX_LOCK:
-      SIMIX_pre_mutex_lock(simcall);
-      break;
-
-    case SIMCALL_MUTEX_TRYLOCK:
-      simcall->mutex_trylock.result =
-        SIMIX_mutex_trylock(simcall->mutex_trylock.mutex, simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_MUTEX_UNLOCK:
-      SIMIX_mutex_unlock(simcall->mutex_unlock.mutex, simcall->issuer);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COND_INIT:
-      simcall->cond_init.result = SIMIX_cond_init();
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COND_DESTROY:
-      SIMIX_cond_destroy(simcall->cond_destroy.cond);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COND_SIGNAL:
-      SIMIX_cond_signal(simcall->cond_signal.cond);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_COND_WAIT:
-      SIMIX_pre_cond_wait(simcall);
-      break;
-
-    case SIMCALL_COND_WAIT_TIMEOUT:
-      SIMIX_pre_cond_wait_timeout(simcall);
+SIMCALL_LIST(SIMCALL_CASE, SIMCALL_SEP_NOTHING)
+    case NUM_SIMCALLS:;
       break;
-
-    case SIMCALL_COND_BROADCAST:
-      SIMIX_cond_broadcast(simcall->cond_broadcast.cond);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_SEM_INIT:
-      simcall->sem_init.result = SIMIX_sem_init(simcall->sem_init.capacity);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_SEM_DESTROY:
-      SIMIX_sem_destroy(simcall->sem_destroy.sem);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_SEM_RELEASE:
-      SIMIX_sem_release(simcall->sem_release.sem);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_SEM_WOULD_BLOCK:
-      simcall->sem_would_block.result =
-        SIMIX_sem_would_block(simcall->sem_would_block.sem);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_SEM_ACQUIRE:
-      SIMIX_pre_sem_acquire(simcall);
-      break;
-
-    case SIMCALL_SEM_ACQUIRE_TIMEOUT:
-      SIMIX_pre_sem_acquire_timeout(simcall);
-      break;
-
-    case SIMCALL_SEM_GET_CAPACITY:
-      simcall->sem_get_capacity.result = 
-        SIMIX_sem_get_capacity(simcall->sem_get_capacity.sem);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_FILE_READ:
-      SIMIX_pre_file_read(simcall);
-      break;
-
-    case SIMCALL_FILE_WRITE:
-      SIMIX_pre_file_write(simcall);
-      break;
-
-    case SIMCALL_FILE_OPEN:
-      SIMIX_pre_file_open(simcall);
-      break;
-
-    case SIMCALL_FILE_CLOSE:
-      SIMIX_pre_file_close(simcall);
-      break;
-
-    case SIMCALL_FILE_STAT:
-      SIMIX_pre_file_stat(simcall);
-      break;
-
-    case SIMCALL_FILE_UNLINK:
-      SIMIX_pre_file_unlink(simcall);
-      break;
-
-    case SIMCALL_FILE_LS:
-      SIMIX_pre_file_ls(simcall);
-      break;
-
-    case SIMCALL_ASR_GET_PROPERTIES:
-      simcall->asr_get_properties.result =
-        SIMIX_asr_get_properties(simcall->asr_get_properties.name);
-      SIMIX_simcall_answer(simcall);
-      break;
-
-#ifdef HAVE_MC
-    case SIMCALL_MC_SNAPSHOT:
-      simcall->mc_snapshot.s = MC_take_snapshot();
-      SIMIX_simcall_answer(simcall);
-      break;
-
-    case SIMCALL_MC_COMPARE_SNAPSHOTS:
-      simcall->mc_compare_snapshots.result =
-        snapshot_compare(simcall->mc_compare_snapshots.snapshot1, simcall->mc_compare_snapshots.snapshot2, NULL, NULL);
-      SIMIX_simcall_answer(simcall);
-      break;
-#endif /* HAVE_MC */
-
-    case SIMCALL_NONE:
+    case SIMCALL_NONE:;
       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
           SIMIX_process_get_name(simcall->issuer),
           SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
@@ -621,3 +102,30 @@ void SIMIX_simcall_post(smx_action_t action)
       break;
   }
 }
+
+/* New Simcal interface */
+
+/* FIXME: add types for every simcall */
+//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
+/* FIXME find a way to make this work
+simcall_handler_t simcall_table[NUM_SIMCALLS] = {
+#undef SIMCALL_ENUM_ELEMENT
+#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values 
+SIMCALL_LIST
+#undef SIMCALL_ENUM_ELEMENT
+};*/
+
+/* New Simcal interface */
+
+/* FIXME: add types for every simcall */
+//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p", [SIMCALL_HOST_EXECUTION_WAIT] = "%p%p" };
+
+
+/*TOFIX find a way to make this work
+simcall_handler_t simcall_table[NUM_SIMCALLS] = {
+#undef SIMCALL_ENUM_ELEMENT
+#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values
+SIMCALL_LIST
+#undef SIMCALL_ENUM_ELEMENT
+};*/
+
index ad7ef06..82a65ca 100644 (file)
 
 /********************************* Simcalls *********************************/
 
-/* we want to build the e_smx_simcall_t enumeration and the table of the
- * corresponding strings automatically, using macros */
-
-#define SIMCALL_LIST1 \
-SIMCALL_ENUM_ELEMENT(SIMCALL_NONE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_BY_NAME),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_NAME),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_PROPERTIES),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_SPEED),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_AVAILABLE_SPEED),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_STATE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_SET_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_PARALLEL_EXECUTE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_CANCEL),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_GET_REMAINS),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_GET_STATE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_SET_PRIORITY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_WAIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CREATE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_KILL),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_KILLALL),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CLEANUP),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CHANGE_HOST),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SUSPEND),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_RESUME),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_COUNT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SET_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_HOST),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_NAME),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_IS_SUSPENDED),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_PROPERTIES),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SLEEP),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_ON_EXIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_AUTO_RESTART_SET),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_RESTART),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_CREATE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GEY_BY_NAME),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_COMM_COUNT_BY_HOST),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GET_HEAD),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_SET_RECV),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GET_RECV),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_SEND),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_ISEND),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_RECV),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IRECV),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_CANCEL),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAITANY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TEST),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TESTANY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IPROBE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_REMAINS),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_STATE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_SRC_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_DST_DATA),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_SRC_PROC),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_DST_PROC),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_INIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_LOCK),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_TRYLOCK),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_UNLOCK),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_INIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_SIGNAL),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_WAIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_WAIT_TIMEOUT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_COND_BROADCAST),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_INIT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_DESTROY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_RELEASE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_WOULD_BLOCK),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_ACQUIRE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_ACQUIRE_TIMEOUT),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_GET_CAPACITY),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_READ),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_WRITE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_OPEN),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_CLOSE),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_STAT), \
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_UNLINK),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_LS),\
-SIMCALL_ENUM_ELEMENT(SIMCALL_ASR_GET_PROPERTIES), \
-/* ****************************************************************************************** */ \
-/* TUTORIAL: New API                                                                        */ \
-/* ****************************************************************************************** */ \
-SIMCALL_ENUM_ELEMENT(SIMCALL_NEW_API_INIT)
+/* we want to build the e_smx_simcall_t enumeration, the table of the
+ * corresponding simcalls string names, and the simcall handlers table
+ * automatically, using macros.
+ * To add a new simcall follow the following syntax:
+ *
+ * SIMCALL_ENUM_ELEMENT(<simcall_enumeration_id>, <simcall_handler_function>)
+ *
+ * */
+
+/****************************
+ * SIMCALL GENERATING MACRO *
+ ****************************
+ *
+ * action(ENUM_NAME, func_name, result_type, params…) 
+ *
+ **/
+
+/*
+ * Some macro machinery to get a MAP over the arguments of a variadic macro.
+ * It uses a FOLD to apply a macro to every argument, and because there is
+ * no recursion in the C preprocessor we must create a new macro for every
+ * depth of FOLD's recursion.
+ */
 
+/* FOLD macro */
+#define FE_0(WHAT, X, ...)
+#define FE_1(I, WHAT, X) WHAT(I, X)
+#define FE_2(I, WHAT, X, ...) WHAT(I, X), FE_1(I+1, WHAT, __VA_ARGS__)
+#define FE_3(I, WHAT, X, ...) WHAT(I, X), FE_2(I+1, WHAT, __VA_ARGS__)
+#define FE_4(I, WHAT, X, ...) WHAT(I, X), FE_3(I+1, WHAT, __VA_ARGS__)
+#define FE_5(I, WHAT, X, ...) WHAT(I, X), FE_4(I+1, WHAT, __VA_ARGS__)
+#define FE_6(I, WHAT, X, ...) WHAT(I, X), FE_5(I+1, WHAT, __VA_ARGS__)
+#define FE_7(I, WHAT, X, ...) WHAT(I, X), FE_6(I+1, WHAT, __VA_ARGS__)
+#define FE_8(I, WHAT, X, ...) WHAT(I, X), FE_7(I+1, WHAT, __VA_ARGS__)
+#define FE_9(I, WHAT, X, ...) WHAT(I, X), FE_8(I+1, WHAT, __VA_ARGS__)
+#define FE_10(I, WHAT, X, ...) WHAT(I, X), FE_9(I+1, WHAT, __VA_ARGS__)
+
+/* NOTE: add as many FE_n as needed (maximum number of simcall arguments )*/
+
+/* Make a MAP macro usgin FOLD (will apply 'action' to the arguments.
+ * GET_MACRO is a smart hack that counts the number of arguments passed to
+ * the variadic macro, and it is used to invoke the right FOLD depth.
+ */
+#define GET_MACRO(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,NAME,...) NAME
+#define MAP(action, ...) \
+  GET_MACRO(, ##__VA_ARGS__, FE_10,FE_9,FE_8,FE_7,FE_6,FE_5,FE_4,FE_3,FE_2,FE_1, FE_0) (0, action, __VA_ARGS__)
+
+/* MAP with default arguments */
+#define APPLY_MAP(WHAT, I, X, ...) WHAT(I, __VA_ARGS__, X)
+#define FE_DA_0(I, WHAT, args, X, ...)
+#define FE_DA_1(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args)
+#define FE_DA_2(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_1(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_3(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_2(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_4(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_3(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_5(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_4(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_6(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_5(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_7(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_6(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_8(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_7(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_9(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_8(I+1, WHAT, args, __VA_ARGS__)
+#define FE_DA_10(I, WHAT, args, X, ...) APPLY_MAP(WHAT, I, X, args) FE_DA_9(I+1, WHAT, args, __VA_ARGS__)
+
+#define MAP_WITH_DEFAULT_ARGS(action, args, ...) \
+  GET_MACRO(, ##__VA_ARGS__, FE_DA_10,FE_DA_9,FE_DA_8,FE_DA_7,FE_DA_6,FE_DA_5,FE_DA_4,FE_DA_3,FE_DA_2,FE_DA_1, FE_DA_0) (0, action, args, __VA_ARGS__)
+
+/*
+ * Define scalar type wrappers to ease the use of simcalls.
+ * These are used to wrap the arguments in SIMIX_simcall macro.
+ */
+#define TCHAR(n) (n, char, c)
+#define TSTRING(n) (n, const char*, cc)
+#define TSHORT(n) (n, short, s)
+#define TINT(n) (n, int, i)
+#define TLONG(n) (n, long, l)
+#define TUCHAR(n) (n, unsigned char, uc)
+#define TUSHORT(n) (n, unsigned short, us)
+#define TUINT(n) (n, unsigned int, ui)
+#define TULONG(n) (n, unsigned long, ul)
+#define TFLOAT(n) (n, float, f)
+#define TDOUBLE(n) (n, double, d)
+#define TPTR(n) (n, void*, p)
+#define TCPTR(n) (n, const void*, cp)
+#define TSIZE(n) (n, size_t, si)
+#define TVOID(n) (n, void)
+#define TSPEC(n,t) (n, t, p)
+
+/* use comma or nothing to separate elements*/
+#define SIMCALL_SEP_COMMA ,
+#define SIMCALL_SEP_NOTHING
+
+/* get the name of the parameter */
+#define SIMCALL_NAME_(name, type, field) name
+#define SIMCALL_NAME(i, v) SIMCALL_NAME_ v
+
+/* get the %s format code of the parameter */
+#define SIMCALL_FORMAT_(name, type, field) %field
+#define SIMCALL_FORMAT(i, v) SIMCALL_FORMAT_ v
+
+/* get the field of the parameter */
+#define SIMCALL_FIELD_(name, type, field) field
+#define SIMCALL_FIELD(i, v) SIMCALL_FIELD_ v
+
+/* get the parameter declaration */
+#define SIMCALL_ARG_(name, type, field) type name
+#define SIMCALL_ARG(i, v) SIMCALL_ARG_ v
+
+/* get the parameter initialisation field */
+#define SIMCALL_INIT_FIELD_(name, type, field) .field = name
+#define SIMCALL_INIT_FIELD(i, d, v) self->simcall.args[i]SIMCALL_INIT_FIELD_ v;
+
+/* get the case of the parameter */
+#define SIMCALL_CASE_PARAM_(name, type, field) field
+#define SIMCALL_CASE_PARAM(i, v) simcall->args[i].SIMCALL_CASE_PARAM_ v
+
+/* generate some code for SIMCALL_CASE if the simcall has an answer */
+#define MAYBE2(_0, _1, func, ...) func
+
+#define SIMCALL_WITH_RESULT_BEGIN(name, type, field) simcall->result.field =
+#define SIMCALL_WITHOUT_RESULT_BEGIN(name, type, field)
+#define SIMCALL_RESULT_BEGIN_(name, type, ...)\
+        MAYBE2(,##__VA_ARGS__, SIMCALL_WITH_RESULT_BEGIN, SIMCALL_WITHOUT_RESULT_BEGIN)\
+       (name, type, __VA_ARGS__)
+#define SIMCALL_RESULT_BEGIN(answer, res) answer(SIMCALL_RESULT_BEGIN_ res)
+
+#define SIMCALL_RESULT_END_(name, type, ...)\
+       SIMIX_simcall_answer(simcall);
+#define SIMCALL_RESULT_END(answer, res) answer(SIMCALL_RESULT_END_ res)
+
+/* generate some code for BODY function */
+#define SIMCALL_FUNC_RETURN_TYPE_(name, type, ...) type
+#define SIMCALL_FUNC_RETURN_TYPE(res) SIMCALL_FUNC_RETURN_TYPE_ res
+
+#define SIMCALL_WITH_FUNC_SIMCALL(name, type, field) smx_simcall_t simcall = 
+#define SIMCALL_WITHOUT_FUNC_SIMCALL(name, type, field)
+#define SIMCALL_FUNC_SIMCALL_(name, type, ...)\
+        MAYBE2(,##__VA_ARGS__, SIMCALL_WITH_FUNC_SIMCALL, SIMCALL_WITHOUT_FUNC_SIMCALL)\
+       (name, type, __VA_ARGS__)
+#define SIMCALL_FUNC_SIMCALL(res) SIMCALL_FUNC_SIMCALL_ res
+
+#define SIMCALL_WITH_FUNC_RETURN(name, type, field) return self->simcall.result.field;
+#define SIMCALL_WITHOUT_FUNC_RETURN(name, type, field)
+#define SIMCALL_FUNC_RETURN_(name, type, ...)\
+        MAYBE2(,##__VA_ARGS__, SIMCALL_WITH_FUNC_RETURN, SIMCALL_WITHOUT_FUNC_RETURN)\
+       (name, type, __VA_ARGS__)
+#define SIMCALL_FUNC_RETURN(res) SIMCALL_FUNC_RETURN_ res
+
+
+/* generate the simcall enumeration */
+#define SIMCALL_ENUM(type, ...)\
+       type
+
+/* generate the strings name from the enumeration values */
+#define SIMCALL_STRING_TYPE(type, name, answer, res, ...)\
+       [type] = STRINGIFY(type)
+
+/* generate strings from the enumeration values */
+#define SIMCALL_TYPE(type, name, answer, res, ...)\
+       [type] = STRINGIFY(MAP(SIMCALL_FORMAT, __VA_ARGS__))
+
+/* generate the simcalls BODY functions */
+#define SIMCALL_FUNC(TYPE, NAME, ANSWER, RES, ...)\
+  inline static SIMCALL_FUNC_RETURN_TYPE(RES) simcall_BODY_##NAME(MAP(SIMCALL_ARG, ##__VA_ARGS__)) { \
+    smx_process_t self = SIMIX_process_self(); \
+    self->simcall.call = TYPE; \
+    MAP_WITH_DEFAULT_ARGS(SIMCALL_INIT_FIELD, (), ##__VA_ARGS__) \
+    if (self != simix_global->maestro_process) { \
+      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, \
+                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); \
+      SIMIX_process_yield(self); \
+    } else { \
+      SIMIX_simcall_pre(&self->simcall, 0); \
+    } \
+    SIMCALL_FUNC_RETURN(RES) \
+  }
+
+/* generate a comma if there is an argument*/
+#define WITHOUT_COMMA 
+#define WITH_COMMA ,
+#define GET_CLEAN(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10, NAME,...) NAME
+#define MAYBE_COMMA(...) GET_CLEAN(,##__VA_ARGS__,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITH_COMMA,WITHOUT_COMMA)
+
+/* generate the simcalls cases for the SIMIX_simcall_pre function */
+#define WITH_ANSWER(...) __VA_ARGS__
+#define WITHOUT_ANSWER(...) 
+#define SIMCALL_CASE(type, name, answer, res, ...)\
+    case type:\
+      SIMCALL_RESULT_BEGIN(answer, res) SIMIX_pre_ ## name(simcall MAYBE_COMMA(__VA_ARGS__) MAP(SIMCALL_CASE_PARAM, ##__VA_ARGS__));\
+      SIMCALL_RESULT_END(answer, res)\
+      break;
+
+
+/*
+ * Generate simcall args and result getter/setter
+ */
+#define SIMCALL_GS_SC_NAME_(n) n
+#define SIMCALL_GS_SC_NAME(n) SIMCALL_GS_SC_NAME_ n
+#define SIMCALL_GS_ARG_NAME(n) SIMCALL_NAME_ n
+#define JOIN2(_0, _1) _0 ##__## _1
+#define JOIN3(_0, _1, _2) JOIN2(_0 ##__## _1, _2)
+#define JOIN4(_0, _1, _2, _3) JOIN3(_0 ##_## _1, _2, _3)
+#define SIMCALL_GS_FUNC(scname, setget, vname) \
+   JOIN4(simcall, scname, setget, vname)
+
+/* generate the simcalls args getter/setter */
+#define SIMCALL_ARG_GETSET_(i, name, v) \
+  static inline SIMCALL_FUNC_RETURN_TYPE(v) SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME(name), get, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall){\
+    return simcall->args[i].SIMCALL_FIELD_ v ;\
+  }\
+  static inline void SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME(name), set, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall, SIMCALL_ARG_ v){\
+    simcall->args[i].SIMCALL_FIELD_ v = SIMCALL_NAME_ v ;\
+  }
+
+#define SIMCALL_ARG_GETSET(type, name, answer, res, ...)\
+    MAP_WITH_DEFAULT_ARGS(SIMCALL_ARG_GETSET_, (name), ##__VA_ARGS__)
+
+/* generate the simcalls result getter/setter */
+#define SIMCALL_WITH_RES_GETSET(name, v) \
+  static inline SIMCALL_FUNC_RETURN_TYPE(v) SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME((name)), get, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall){\
+    return simcall->result.SIMCALL_FIELD_ v ;\
+  }\
+  static inline void SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME((name)), set, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall, SIMCALL_ARG_ v){\
+    simcall->result.SIMCALL_FIELD_ v = SIMCALL_NAME_ v ;\
+  }
+#define SIMCALL_WITHOUT_RES_GETSET(name, v)
+#define SIMCALL_RES_GETSET__(name, type, ...)\
+        MAYBE2(,##__VA_ARGS__, SIMCALL_WITH_RES_GETSET, SIMCALL_WITHOUT_RES_GETSET)
+#define SIMCALL_RES_GETSET_(scname, v)\
+        SIMCALL_RES_GETSET__ v (scname, v)
+#define SIMCALL_RES_GETSET(type, name, answer, res, ...)\
+  SIMCALL_RES_GETSET_(name, res)
+
+/* generate the simcalls result getter/setter protos*/
+#define SIMCALL_WITH_RES_GETSET_PROTO(name, v) \
+  inline SIMCALL_FUNC_RETURN_TYPE(v) SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME((name)), get, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall);\
+  inline void SIMCALL_GS_FUNC(SIMCALL_GS_SC_NAME((name)), set, SIMCALL_GS_ARG_NAME(v))(smx_simcall_t simcall, SIMCALL_ARG_ v);
+#define SIMCALL_WITHOUT_RES_GETSET_PROTO(name, v)
+#define SIMCALL_RES_GETSET_PROTO__(name, type, ...)\
+        MAYBE2(,##__VA_ARGS__, SIMCALL_WITH_RES_GETSET_PROTO, SIMCALL_WITHOUT_RES_GETSET_PROTO)
+#define SIMCALL_RES_GETSET_PROTO_(scname, v)\
+        SIMCALL_RES_GETSET_PROTO__ v (scname, v)
+#define SIMCALL_RES_GETSET_PROTO(type, name, answer, res, ...)\
+  SIMCALL_RES_GETSET_PROTO_(name, res)
+
+/* stringify arguments */
+#define STRINGIFY_(...) #__VA_ARGS__
+#define STRINGIFY(...) STRINGIFY_(__VA_ARGS__)
+
+/* the list of simcalls definitions */
+#define SIMCALL_LIST1(ACTION, sep) \
+ACTION(SIMCALL_HOST_GET_BY_NAME, host_get_by_name, WITH_ANSWER, TSPEC(result, smx_host_t), TSTRING(name)) sep \
+ACTION(SIMCALL_HOST_GET_NAME, host_get_name, WITH_ANSWER, TSTRING(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_PROPERTIES, host_get_properties, WITH_ANSWER, TSPEC(result, xbt_dict_t), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_SPEED, host_get_speed, WITH_ANSWER, TDOUBLE(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_AVAILABLE_SPEED, host_get_available_speed, WITH_ANSWER, TDOUBLE(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_STATE, host_get_state, WITH_ANSWER, TINT(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_DATA, host_get_data, WITH_ANSWER, TPTR(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_SET_DATA, host_set_data, WITH_ANSWER, TVOID(result), TSPEC(host, smx_host_t), TPTR(data)) sep \
+ACTION(SIMCALL_HOST_EXECUTE, host_execute, WITH_ANSWER, TSPEC(result, smx_action_t), TSTRING(name), TSPEC(host, smx_host_t), TDOUBLE(computation_amount), TDOUBLE(priority)) sep \
+ACTION(SIMCALL_HOST_PARALLEL_EXECUTE, host_parallel_execute, WITH_ANSWER, TSPEC(result, smx_action_t), TSTRING(name), TINT(host_nb), TSPEC(host_list, smx_host_t*), TSPEC(computation_amount, double*), TSPEC(communication_amount, double*), TDOUBLE(amount), TDOUBLE(rate)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_DESTROY, host_execution_destroy, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_CANCEL, host_execution_cancel, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_GET_REMAINS, host_execution_get_remains, WITH_ANSWER, TDOUBLE(result), TSPEC(execution, smx_action_t)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_GET_STATE, host_execution_get_state, WITH_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_SET_PRIORITY, host_execution_set_priority, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TDOUBLE(priority)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_WAIT, host_execution_wait, WITHOUT_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
+ACTION(SIMCALL_PROCESS_CREATE, process_create, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t*), TSTRING(name), TSPEC(code, xbt_main_func_t), TPTR(data), TSTRING(hostname), TDOUBLE(kill_time), TINT(argc), TSPEC(argv, char**), TSPEC(properties, xbt_dict_t), TINT(auto_restart)) sep \
+ACTION(SIMCALL_PROCESS_KILL, process_kill, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_KILLALL, process_killall, WITH_ANSWER, TVOID(result)) sep \
+ACTION(SIMCALL_PROCESS_CLEANUP, process_cleanup, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_CHANGE_HOST, process_change_host, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t), TSPEC(dest, smx_host_t)) sep \
+ACTION(SIMCALL_PROCESS_SUSPEND, process_suspend, WITHOUT_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_RESUME, process_resume, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_COUNT, process_count, WITH_ANSWER, TINT(result)) sep \
+ACTION(SIMCALL_PROCESS_GET_DATA, process_get_data, WITH_ANSWER, TPTR(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_SET_DATA, process_set_data, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t), TPTR(data)) sep \
+ACTION(SIMCALL_PROCESS_GET_HOST, process_get_host, WITH_ANSWER, TSPEC(result, smx_host_t), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_GET_NAME, process_get_name, WITH_ANSWER, TSTRING(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_IS_SUSPENDED, process_is_suspended, WITH_ANSWER, TINT(result), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_GET_PROPERTIES, process_get_properties, WITH_ANSWER, TSPEC(result, xbt_dict_t), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_PROCESS_SLEEP, process_sleep, WITHOUT_ANSWER, TINT(result), TDOUBLE(duration)) sep \
+ACTION(SIMCALL_PROCESS_ON_EXIT, process_on_exit, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t), TSPEC(fun, int_f_pvoid_t), TPTR(data)) sep \
+ACTION(SIMCALL_PROCESS_AUTO_RESTART_SET, process_auto_restart_set, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t), TINT(auto_restart)) sep \
+ACTION(SIMCALL_PROCESS_RESTART, process_restart, WITH_ANSWER, TSPEC(result, smx_process_t), TSPEC(process, smx_process_t)) sep \
+ACTION(SIMCALL_RDV_CREATE, rdv_create, WITH_ANSWER, TSPEC(result, smx_rdv_t), TSTRING(name)) sep \
+ACTION(SIMCALL_RDV_DESTROY, rdv_destroy, WITH_ANSWER, TVOID(result), TSPEC(rdv, smx_rdv_t)) sep \
+ACTION(SIMCALL_RDV_GET_BY_NAME, rdv_get_by_name, WITH_ANSWER, TSPEC(result, smx_host_t), TSTRING(name)) sep \
+ACTION(SIMCALL_RDV_COMM_COUNT_BY_HOST, rdv_comm_count_by_host, WITH_ANSWER, TUINT(result), TSPEC(rdv, smx_rdv_t), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_RDV_GET_HEAD, rdv_get_head, WITH_ANSWER, TSPEC(result, smx_action_t), TSPEC(rdv, smx_rdv_t)) sep \
+ACTION(SIMCALL_RDV_SET_RECV, rdv_set_receiver, WITH_ANSWER, TVOID(result), TSPEC(rdv, smx_rdv_t), TSPEC(receiver, smx_process_t)) sep \
+ACTION(SIMCALL_RDV_GET_RECV, rdv_get_receiver, WITH_ANSWER, TSPEC(result, smx_process_t), TSPEC(rdv, smx_rdv_t)) sep \
+ACTION(SIMCALL_COMM_IPROBE, comm_iprobe, WITH_ANSWER, TSPEC(result, smx_action_t), TSPEC(rdv, smx_rdv_t), TINT(src), TINT(tag), TSPEC(match_fun, simix_match_func_t), TPTR(data)) sep \
+ACTION(SIMCALL_COMM_SEND, comm_send, WITHOUT_ANSWER, TVOID(result), TSPEC(rdv, smx_rdv_t), TDOUBLE(task_size), TDOUBLE(rate), TPTR(src_buff), TSIZE(src_buff_size), TSPEC(match_fun, simix_match_func_t), TPTR(data), TDOUBLE(timeout)) sep \
+ACTION(SIMCALL_COMM_ISEND, comm_isend, WITH_ANSWER, TSPEC(result, smx_action_t), TSPEC(rdv, smx_rdv_t), TDOUBLE(task_size), TDOUBLE(rate), TPTR(src_buff), TSIZE(src_buff_size), TSPEC(match_fun, simix_match_func_t), TSPEC(clean_fun, simix_clean_func_t), TPTR(data), TINT(detached)) sep \
+ACTION(SIMCALL_COMM_RECV, comm_recv, WITHOUT_ANSWER, TVOID(result), TSPEC(rdv, smx_rdv_t), TPTR(dst_buff), TSPEC(dst_buff_size, size_t*), TSPEC(match_fun, simix_match_func_t), TPTR(data), TDOUBLE(timeout)) sep \
+ACTION(SIMCALL_COMM_IRECV, comm_irecv, WITH_ANSWER, TSPEC(result, smx_action_t), TSPEC(rdv, smx_rdv_t), TPTR(dst_buff), TSPEC(dst_buff_size, size_t*), TSPEC(match_fun, simix_match_func_t), TPTR(data)) sep \
+ACTION(SIMCALL_COMM_DESTROY, comm_destroy, WITH_ANSWER, TVOID(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_CANCEL, comm_cancel, WITH_ANSWER, TVOID(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_WAITANY, comm_waitany, WITHOUT_ANSWER, TINT(result), TSPEC(comms, xbt_dynar_t)) sep \
+ACTION(SIMCALL_COMM_WAIT, comm_wait, WITHOUT_ANSWER, TVOID(result), TSPEC(comm, smx_action_t), TDOUBLE(timeout)) sep \
+ACTION(SIMCALL_COMM_TEST, comm_test, WITHOUT_ANSWER, TINT(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_TESTANY, comm_testany, WITHOUT_ANSWER, TINT(result), TSPEC(comms, xbt_dynar_t)) sep \
+ACTION(SIMCALL_COMM_GET_REMAINS, comm_get_remains, WITH_ANSWER, TDOUBLE(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_GET_STATE, comm_get_state, WITH_ANSWER, TINT(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_GET_SRC_DATA, comm_get_src_data, WITH_ANSWER, TPTR(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_GET_DST_DATA, comm_get_dst_data, WITH_ANSWER, TPTR(result), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_GET_SRC_PROC, comm_get_src_proc, WITH_ANSWER, TSPEC(result, smx_process_t), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_COMM_GET_DST_PROC, comm_get_dst_proc, WITH_ANSWER, TSPEC(result, smx_process_t), TSPEC(comm, smx_action_t)) sep \
+ACTION(SIMCALL_MUTEX_INIT, mutex_init, WITH_ANSWER, TSPEC(result, smx_mutex_t)) sep \
+ACTION(SIMCALL_MUTEX_DESTROY, mutex_destroy, WITH_ANSWER, TVOID(result), TSPEC(mutex, smx_mutex_t)) sep \
+ACTION(SIMCALL_MUTEX_LOCK, mutex_lock, WITHOUT_ANSWER, TVOID(result), TSPEC(mutex, smx_mutex_t)) sep \
+ACTION(SIMCALL_MUTEX_TRYLOCK, mutex_trylock, WITH_ANSWER, TINT(result), TSPEC(mutex, smx_mutex_t)) sep \
+ACTION(SIMCALL_MUTEX_UNLOCK, mutex_unlock, WITH_ANSWER, TVOID(result), TSPEC(mutex, smx_mutex_t)) sep \
+ACTION(SIMCALL_COND_INIT, cond_init, WITH_ANSWER, TSPEC(result, smx_cond_t)) sep \
+ACTION(SIMCALL_COND_DESTROY, cond_destroy, WITH_ANSWER, TVOID(result), TSPEC(cond, smx_cond_t)) sep \
+ACTION(SIMCALL_COND_SIGNAL, cond_signal, WITH_ANSWER, TVOID(result), TSPEC(cond, smx_cond_t)) sep \
+ACTION(SIMCALL_COND_WAIT, cond_wait, WITHOUT_ANSWER, TVOID(result), TSPEC(cond, smx_cond_t), TSPEC(mutex, smx_mutex_t)) sep \
+ACTION(SIMCALL_COND_WAIT_TIMEOUT, cond_wait_timeout, WITHOUT_ANSWER, TVOID(result), TSPEC(cond, smx_cond_t), TSPEC(mutex, smx_mutex_t), TDOUBLE(timeout)) sep \
+ACTION(SIMCALL_COND_BROADCAST, cond_broadcast, WITH_ANSWER, TVOID(result), TSPEC(cond, smx_cond_t)) sep \
+ACTION(SIMCALL_SEM_INIT, sem_init, WITH_ANSWER, TSPEC(result, smx_sem_t), TINT(capacity)) sep \
+ACTION(SIMCALL_SEM_DESTROY, sem_destroy, WITH_ANSWER, TVOID(result), TSPEC(sem, smx_sem_t)) sep \
+ACTION(SIMCALL_SEM_RELEASE, sem_release, WITH_ANSWER, TVOID(result), TSPEC(sem, smx_sem_t)) sep \
+ACTION(SIMCALL_SEM_WOULD_BLOCK, sem_would_block, WITH_ANSWER, TINT(result), TSPEC(sem, smx_sem_t)) sep \
+ACTION(SIMCALL_SEM_ACQUIRE, sem_acquire, WITHOUT_ANSWER, TVOID(result), TSPEC(sem, smx_sem_t)) sep \
+ACTION(SIMCALL_SEM_ACQUIRE_TIMEOUT, sem_acquire_timeout, WITHOUT_ANSWER, TVOID(result), TSPEC(sem, smx_sem_t), TDOUBLE(timeout)) sep \
+ACTION(SIMCALL_SEM_GET_CAPACITY, sem_get_capacity, WITH_ANSWER, TINT(result), TSPEC(sem, smx_sem_t)) sep \
+ACTION(SIMCALL_FILE_READ, file_read, WITHOUT_ANSWER, TDOUBLE(result), TPTR(ptr), TSIZE(size), TSIZE(nmemb), TSPEC(stream, smx_file_t)) sep \
+ACTION(SIMCALL_FILE_WRITE, file_write, WITHOUT_ANSWER, TSIZE(result), TCPTR(ptr), TSIZE(size), TSIZE(nmemb), TSPEC(stream, smx_file_t)) sep \
+ACTION(SIMCALL_FILE_OPEN, file_open, WITHOUT_ANSWER, TSPEC(result, smx_file_t), TSTRING(mount), TSTRING(path), TSTRING(mode)) sep \
+ACTION(SIMCALL_FILE_CLOSE, file_close, WITHOUT_ANSWER, TINT(result), TSPEC(fp, smx_file_t)) sep \
+ACTION(SIMCALL_FILE_STAT, file_stat, WITHOUT_ANSWER, TINT(result), TSPEC(fd, smx_file_t), TSPEC(buf, s_file_stat_t*)) sep \
+ACTION(SIMCALL_FILE_UNLINK, file_unlink, WITHOUT_ANSWER, TINT(result), TSPEC(fd, smx_file_t)) sep \
+ACTION(SIMCALL_FILE_LS, file_ls, WITHOUT_ANSWER, TSPEC(result, xbt_dict_t), TSTRING(mount), TSTRING(path)) sep \
+ACTION(SIMCALL_ASR_GET_PROPERTIES, asr_get_properties, WITH_ANSWER, TSPEC(result, xbt_dict_t), TSTRING(name)) sep 
 
 /* SIMCALL_COMM_IS_LATENCY_BOUNDED and SIMCALL_SET_CATEGORY make things complicated
  * because they are not always present */
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-#define SIMCALL_LIST2 \
-,SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IS_LATENCY_BOUNDED)
+#define SIMCALL_LIST2(ACTION, sep) \
+ACTION(SIMCALL_COMM_IS_LATENCY_BOUNDED, comm_is_latency_bounded, WITH_ANSWER, TINT(result), TSPEC(comm, smx_action_t)) sep
 #else
-#define SIMCALL_LIST2
+#define SIMCALL_LIST2(ACTION, sep)
 #endif
 
 #ifdef HAVE_TRACING
-#define SIMCALL_LIST3 \
-,SIMCALL_ENUM_ELEMENT(SIMCALL_SET_CATEGORY)
+#define SIMCALL_LIST3(ACTION, sep) \
+ACTION(SIMCALL_SET_CATEGORY, set_category, WITH_ANSWER, TVOID(result), TSPEC(action, smx_action_t), TSTRING(category)) sep
 #else
-#define SIMCALL_LIST3
+#define SIMCALL_LIST3(ACTION, sep)
 #endif
 
 #ifdef HAVE_MC
-#define SIMCALL_LIST4                                        \
-  ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_SNAPSHOT)                 \
-  ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_COMPARE_SNAPSHOTS)
+#define SIMCALL_LIST4(ACTION, sep) \
+ACTION(SIMCALL_MC_SNAPSHOT, mc_snapshot, WITH_ANSWER, TPTR(result)) sep \
+ACTION(SIMCALL_MC_COMPARE_SNAPSHOTS, mc_compare_snapshots, WITH_ANSWER, TINT(result), TPTR(s1), TPTR(s2)) sep 
 #else
-#define SIMCALL_LIST4
+#define SIMCALL_LIST4(ACTION, sep)
 #endif
 
 /* SIMCALL_LIST is the final macro to use */
-#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3 SIMCALL_LIST4
+#define SIMCALL_LIST(ACTION, ...) \
+  SIMCALL_LIST1(ACTION, ##__VA_ARGS__)\
+  SIMCALL_LIST2(ACTION, ##__VA_ARGS__)\
+  SIMCALL_LIST3(ACTION, ##__VA_ARGS__)\
+  SIMCALL_LIST4(ACTION, ##__VA_ARGS__)
+
 
 /* you can redefine the following macro differently to generate something else
  * with the list of enumeration values (e.g. a table of strings or a table of function pointers) */
-#define SIMCALL_ENUM_ELEMENT(x) x
+#define SIMCALL_ENUM_ELEMENT(x, y) x
 
 /**
  * \brief All possible simcalls.
  */
 typedef enum {
-SIMCALL_LIST
+SIMCALL_NONE,
+SIMCALL_LIST(SIMCALL_ENUM, SIMCALL_SEP_COMMA)
+SIMCALL_NEW_API_INIT,
+NUM_SIMCALLS
 } e_smx_simcall_t;
 
+typedef int (*simix_match_func_t)(void *, void *, smx_action_t);
+typedef void (*simix_clean_func_t)(void *);
+
+/* Pack all possible scalar types in an union */
+union u_smx_scalar {
+  char            c;
+  const char*     cc;
+  short           s;
+  int             i;
+  long            l;
+  unsigned char   uc;
+  unsigned short  us;
+  unsigned int    ui;
+  unsigned long   ul;
+  float           f;
+  double          d;
+  size_t          si;
+  void*           p;
+  const void*     cp;
+};
+
 /**
  * \brief Represents a simcall to the kernel.
  */
 typedef struct s_smx_simcall {
   e_smx_simcall_t call;
   smx_process_t issuer;
-
+  int mc_value;
+  union u_smx_scalar args[10];
+  union u_smx_scalar result;
+  //FIXME: union u_smx_scalar retval;
   union {
-
-    struct {
-      const char *name;
-      smx_host_t result;
-    } host_get_by_name;
-
-    struct {
-      smx_host_t host;
-      const char* result;
-    } host_get_name;
-
-    struct {
-      smx_host_t host;
-      xbt_dict_t result;
-    } host_get_properties;
-
-    struct {
-      smx_host_t host;
-      double result;
-    } host_get_speed;
-
-    struct {
-      smx_host_t host;
-      double result;
-    } host_get_available_speed;
-
-    struct {
-      smx_host_t host;
-      int result;
-    } host_get_state;
-
-    struct {
-      smx_host_t host;
-      void* result;
-    } host_get_data;
-
-    struct {
-      smx_host_t host;
-      void* data;
-    } host_set_data;
-
-    struct {
-      const char* name;
-      smx_host_t host;
-      double computation_amount;
-      double priority;
-      smx_action_t result;
-    } host_execute;
-
-    struct {
-      const char *name;
-      int host_nb;
-      smx_host_t *host_list;
-      double *computation_amount;
-      double *communication_amount;
-      double amount;
-      double rate;
-      smx_action_t result;
-    } host_parallel_execute;
-
-    struct {
-      smx_action_t execution;
-    } host_execution_destroy;
-
-    struct {
-      smx_action_t execution;
-    } host_execution_cancel;
-
-    struct {
-      smx_action_t execution;
-      double result;
-    } host_execution_get_remains;
-
-    struct {
-      smx_action_t execution;
-      e_smx_state_t result;
-    } host_execution_get_state;
-
-    struct {
-      smx_action_t execution;
-      double priority;
-    } host_execution_set_priority;
-
-    struct {
-      smx_action_t execution;
-      e_smx_state_t result;
-    } host_execution_wait;
-
-    struct {
-      smx_process_t *process;
-      const char *name;
-      xbt_main_func_t code;
-      void *data;
-      const char *hostname;
-      double kill_time;
-      int argc;
-      char **argv;
-      xbt_dict_t properties;
-      int auto_restart;
-    } process_create;
-
-    struct {
-      smx_process_t process;
-    } process_kill;
-
-    struct {
-      smx_process_t process;
-    } process_cleanup;
-
-    struct {
-      smx_process_t process;
-      smx_host_t dest;
-    } process_change_host;
-
-    struct {
-      smx_process_t process;
-    } process_suspend;
-
-    struct {
-      smx_process_t process;
-    } process_resume;
-
-    struct {
-      int result;
-    } process_count;
-
-    struct {
-      smx_process_t process;
-      void* result;
-    } process_get_data;
-
-    struct {
-      smx_process_t process;
-      void* data;
-    } process_set_data;
-
-    struct {
-      smx_process_t process;
-      smx_host_t result;
-    } process_get_host;
-
-    struct {
-      smx_process_t process;
-      const char *result;
-    } process_get_name;
-
-    struct {
-      smx_process_t process;
-      int result;
-    } process_is_suspended;
-
-    struct {
-      smx_process_t process;
-      xbt_dict_t result;
-    } process_get_properties;
-
-    struct {
-      double duration;
-      e_smx_state_t result;
-    } process_sleep;
-
-    struct {
-      smx_process_t process;
-      int_f_pvoid_t fun;
-      void *data;
-    } process_on_exit;
-
-    struct {
-      smx_process_t process;
-      int auto_restart;
-    } process_auto_restart;
-
-    struct {
-      smx_process_t process;
-      smx_process_t result;
-    } process_restart;
-
-    struct {
-      const char *name;
-      smx_rdv_t result;
-    } rdv_create;
-
-    struct {
-      smx_rdv_t rdv;
-    } rdv_destroy;
-
-    struct {
-      const char* name;
-      smx_rdv_t result;
-    } rdv_get_by_name;
-
-    struct {
-      smx_rdv_t rdv;
-      smx_host_t host;
-      unsigned int result; 
-    } rdv_comm_count_by_host;
-
-    struct {
-      smx_rdv_t rdv;
-      smx_action_t result;
-    } rdv_get_head;
-
-    struct {
-      smx_rdv_t rdv;
-      smx_process_t receiver;
-    } rdv_set_rcv_proc;
-
-    struct {
-      smx_rdv_t rdv;
-      smx_process_t result;
-    } rdv_get_rcv_proc;
-
-    struct {
-      smx_rdv_t rdv;
-      double task_size;
-      double rate;
-      void *src_buff;
-      size_t src_buff_size;
-      int (*match_fun)(void *, void *, smx_action_t);
-      void *data;
-      double timeout;
-    } comm_send;
-
-    struct {
-      smx_rdv_t rdv;
-      double task_size;
-      double rate;
-      void *src_buff;
-      size_t src_buff_size;
-      int (*match_fun)(void *, void *, smx_action_t);
-      void (*clean_fun)(void *);
-      void *data;
-      int detached;
-      smx_action_t result;
-    } comm_isend;
-
-    struct {
-      smx_rdv_t rdv;
-      void *dst_buff;
-      size_t *dst_buff_size;
-      int (*match_fun)(void *, void *, smx_action_t);
-      void *data;
-      double timeout;
-    } comm_recv;
-
-    struct {
-      smx_rdv_t rdv;
-      void *dst_buff;
-      size_t *dst_buff_size;
-      int (*match_fun)(void *, void *, smx_action_t);
-      void *data;
-      smx_action_t result;
-    } comm_irecv;
-
-    struct {
-      smx_rdv_t rdv;
-      int src;
-      int tag;
-      int (*match_fun)(void *, void *, smx_action_t);
-      void *data;
-      smx_action_t result;
-    } comm_iprobe;
-
-    struct {
-      smx_action_t comm;
-    } comm_destroy;
-
-    struct {
-      smx_action_t comm;
-    } comm_cancel;
-
-    struct {
-      xbt_dynar_t comms;
-      unsigned int result;
-    } comm_waitany;
-
-    struct {
-      smx_action_t comm;
-      double timeout;
-    } comm_wait;
-
-    struct {
-      smx_action_t comm;
-      int result;
-    } comm_test;
-
-    struct {
-      xbt_dynar_t comms;
-      int result;
-    } comm_testany;
-
-    struct {
-      smx_action_t comm;
-      double result;
-    } comm_get_remains;
-
-    struct {
-      smx_action_t comm;
-      e_smx_state_t result;
-    } comm_get_state;
-
-    struct {
-      smx_action_t comm;
-      void *result;
-    } comm_get_src_data;
-
-    struct {
-      smx_action_t comm;
-      void *result;
-    } comm_get_dst_data;
-
-    struct {
-      smx_action_t comm;
-      smx_process_t result;
-    } comm_get_src_proc;
-
-    struct {
-      smx_action_t comm;
-      smx_process_t result;
-    } comm_get_dst_proc;
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-    struct {
-      smx_action_t comm;
-      int result;
-    } comm_is_latency_bounded;
-#endif
-
-#ifdef HAVE_TRACING
-    struct {
-      smx_action_t action;
-      const char *category;
-    } set_category;
-#endif
-
-    struct {
-      smx_mutex_t result;
-    } mutex_init;
-
-    struct {
-      smx_mutex_t mutex;
-    } mutex_lock;
-
-    struct {
-      smx_mutex_t mutex;
-      int result;
-    } mutex_trylock;
-
-    struct {
-      smx_mutex_t mutex;
-    } mutex_unlock;
-
-    struct {
-      smx_mutex_t mutex;
-    } mutex_destroy;
-
-    struct {
-      smx_cond_t result;
-    } cond_init;
-
-    struct {
-      smx_cond_t cond;
-    } cond_destroy;
-
-    struct {
-      smx_cond_t cond;
-    } cond_signal;
-
-    struct {
-      smx_cond_t cond;
-      smx_mutex_t mutex;
-    } cond_wait;
-
-    struct {
-      smx_cond_t cond;
-      smx_mutex_t mutex;
-      double timeout;
-    } cond_wait_timeout;
-
-    struct {
-      smx_cond_t cond;
-    } cond_broadcast;
-
-    struct {
-      int capacity;
-      smx_sem_t result;
-    } sem_init;
-
-    struct {
-      smx_sem_t sem;
-    } sem_destroy;
-
-    struct {
-      smx_sem_t sem;
-    } sem_release;
-
-    struct {
-      smx_sem_t sem;
-      int result;
-    } sem_would_block;
-
-    struct {
-      smx_sem_t sem;
-    } sem_acquire;
-
-    struct {
-      smx_sem_t sem;
-      double timeout;
-    } sem_acquire_timeout;
-
-    struct {
-      smx_sem_t sem;
-      int result;
-    } sem_get_capacity;
-
-    struct {
-      void *ptr;
-      size_t size;
-      size_t nmemb;
-      smx_file_t stream;
-      double result;
-    } file_read;
-
-    struct {
-      const void *ptr;
-      size_t size;
-      size_t nmemb;
-      smx_file_t stream;
-      size_t result;
-    } file_write;
-
-    struct {
-      const char* mount;
-      const char* path;
-      const char* mode;
-      smx_file_t result;
-    } file_open;
-
-    struct {
-      smx_file_t fp;
-      int result;
-    } file_close;
-
-    struct {
-      smx_file_t fd;
-      s_file_stat_t buf;
-      int result;
-    } file_stat;
-
-    struct {
-      smx_file_t fd;
-      int result;
-    } file_unlink;
-
-    struct {
-      const char *mount;
-      const char *path;
-      xbt_dict_t result;
-    } file_ls;
-
-    struct {
-      const char* name;
-      xbt_dict_t result;
-    } asr_get_properties;
-
-    struct{
-      void *s;
-    } mc_snapshot;
-
-    struct{
-      void *snapshot1;
-      void *snapshot2;
-      int result;
-    } mc_compare_snapshots;
-
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
     struct {
       const char* param1;
       double param2;
@@ -637,6 +429,9 @@ typedef struct s_smx_simcall {
   };
 } s_smx_simcall_t, *smx_simcall_t;
 
+SIMCALL_LIST(SIMCALL_RES_GETSET, SIMCALL_SEP_NOTHING)
+SIMCALL_LIST(SIMCALL_ARG_GETSET, SIMCALL_SEP_NOTHING)
+
 /******************************** General *************************************/
 
 void SIMIX_simcall_push(smx_process_t self);
@@ -645,6 +440,17 @@ void SIMIX_simcall_pre(smx_simcall_t, int);
 void SIMIX_simcall_post(smx_action_t);
 smx_simcall_t SIMIX_simcall_mine(void);
 const char *SIMIX_simcall_name(e_smx_simcall_t kind);
+//TOFIX put it in a better place
+xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name);
+
+/*************************** New simcall interface ****************************/
+
+smx_simcall_t __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args);
+
+typedef smx_action_t (*simcall_handler_t)(u_smx_scalar_t *);
+
+extern const char *simcall_types[];
+extern simcall_handler_t simcall_table[];
 
 #endif
 
index 689576c..1237446 100644 (file)
@@ -41,23 +41,23 @@ void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall)
   switch (simcall->call) {
 
     case SIMCALL_MUTEX_LOCK:
-      xbt_swag_remove(process, simcall->mutex_lock.mutex->sleeping);
+      xbt_swag_remove(process, simcall_mutex_lock__get__mutex(simcall)->sleeping);
       break;
 
     case SIMCALL_COND_WAIT:
-      xbt_swag_remove(process, simcall->cond_wait.cond->sleeping);
+      xbt_swag_remove(process, simcall_cond_wait__get__cond(simcall)->sleeping);
       break;
 
     case SIMCALL_COND_WAIT_TIMEOUT:
-      xbt_swag_remove(process, simcall->cond_wait_timeout.cond->sleeping);
+      xbt_swag_remove(process, simcall_cond_wait_timeout__get__cond(simcall)->sleeping);
       break;
 
     case SIMCALL_SEM_ACQUIRE:
-      xbt_swag_remove(process, simcall->sem_acquire.sem->sleeping);
+      xbt_swag_remove(process, simcall_sem_acquire__get__sem(simcall)->sleeping);
       break;
 
     case SIMCALL_SEM_ACQUIRE_TIMEOUT:
-      xbt_swag_remove(process, simcall->sem_acquire_timeout.sem->sleeping);
+      xbt_swag_remove(process, simcall_sem_acquire_timeout__get__sem(simcall)->sleeping);
       break;
 
     default:
@@ -117,6 +117,9 @@ static void SIMIX_synchro_finish(smx_action_t action)
 }
 /*********************************** Mutex ************************************/
 
+smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall){
+  return SIMIX_mutex_init();
+}
 /**
  * \brief Initialize a mutex.
  *
@@ -139,12 +142,11 @@ smx_mutex_t SIMIX_mutex_init(void)
  * \brief Handles a mutex lock simcall.
  * \param simcall the simcall
  */
-void SIMIX_pre_mutex_lock(smx_simcall_t simcall)
+void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
 {
   XBT_IN("(%p)",simcall);
   /* FIXME: check where to validate the arguments */
   smx_action_t sync_act = NULL;
-  smx_mutex_t mutex = simcall->mutex_lock.mutex;
   smx_process_t process = simcall->issuer;
 
   if (mutex->locked) {
@@ -163,6 +165,9 @@ void SIMIX_pre_mutex_lock(smx_simcall_t simcall)
   XBT_OUT();
 }
 
+int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex){
+  return SIMIX_mutex_trylock(mutex, simcall->issuer);
+}      
 /**
  * \brief Tries to lock a mutex.
  *
@@ -186,6 +191,9 @@ int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer)
   return 1;
 }
 
+void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex){
+   SIMIX_mutex_unlock(mutex, simcall->issuer);
+}
 /**
  * \brief Unlocks a mutex.
  *
@@ -220,6 +228,9 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer)
   XBT_OUT();
 }
 
+void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex){
+  SIMIX_mutex_destroy(mutex);
+}
 /**
  * \brief Destroys a mutex.
  *
@@ -238,6 +249,9 @@ void SIMIX_mutex_destroy(smx_mutex_t mutex)
 
 /********************************* Condition **********************************/
 
+smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall){
+  return SIMIX_cond_init();
+}
 /**
  * \brief Initialize a condition.
  *
@@ -245,7 +259,7 @@ void SIMIX_mutex_destroy(smx_mutex_t mutex)
  * It have to be called before the use of the condition.
  * \return A condition
  */
-smx_cond_t SIMIX_cond_init()
+smx_cond_t SIMIX_cond_init(void)
 {
   XBT_IN("()");
   s_smx_process_t p;
@@ -260,12 +274,10 @@ smx_cond_t SIMIX_cond_init()
  * \brief Handle a condition waiting simcall without timeouts
  * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait(smx_simcall_t simcall)
+void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex)
 {
   XBT_IN("(%p)",simcall);
   smx_process_t issuer = simcall->issuer;
-  smx_cond_t cond = simcall->cond_wait.cond;
-  smx_mutex_t mutex = simcall->cond_wait.mutex;
 
   _SIMIX_cond_wait(cond, mutex, -1, issuer, simcall);
   XBT_OUT();
@@ -275,13 +287,11 @@ void SIMIX_pre_cond_wait(smx_simcall_t simcall)
  * \brief Handle a condition waiting simcall with timeouts
  * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall)
+void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
+                                smx_mutex_t mutex, double timeout)
 {
   XBT_IN("(%p)",simcall);
   smx_process_t issuer = simcall->issuer;
-  smx_cond_t cond = simcall->cond_wait_timeout.cond;
-  smx_mutex_t mutex = simcall->cond_wait_timeout.mutex;
-  double timeout = simcall->cond_wait_timeout.timeout;
 
   _SIMIX_cond_wait(cond, mutex, timeout, issuer, simcall);
   XBT_OUT();
@@ -310,6 +320,9 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
   XBT_OUT();
 }
 
+void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond){
+  SIMIX_cond_signal(cond);
+}
 /**
  * \brief Signalizes a condition.
  *
@@ -337,18 +350,19 @@ void SIMIX_cond_signal(smx_cond_t cond)
     /* Now transform the cond wait simcall into a mutex lock one */
     simcall = &proc->simcall;
     if(simcall->call == SIMCALL_COND_WAIT)
-      mutex = simcall->cond_wait.mutex;
+      mutex = simcall_cond_wait__get__mutex(simcall);
     else
-      mutex = simcall->cond_wait_timeout.mutex;
-
+      mutex = simcall_cond_wait_timeout__get__mutex(simcall);
     simcall->call = SIMCALL_MUTEX_LOCK;
-    simcall->mutex_lock.mutex = mutex;
 
-    SIMIX_pre_mutex_lock(simcall);
+    SIMIX_pre_mutex_lock(simcall, mutex);
   }
   XBT_OUT();
 }
 
+void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond){
+  SIMIX_cond_broadcast(cond);
+}
 /**
  * \brief Broadcasts a condition.
  *
@@ -368,6 +382,9 @@ void SIMIX_cond_broadcast(smx_cond_t cond)
   XBT_OUT();
 }
 
+void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond){
+  SIMIX_cond_destroy(cond);
+}
 /**
  * \brief Destroys a contidion.
  *
@@ -391,6 +408,9 @@ void SIMIX_cond_destroy(smx_cond_t cond)
 
 /******************************** Semaphores **********************************/
 #define SMX_SEM_NOLIMIT 99999
+smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value){
+  return SIMIX_sem_init(value);
+}
 /** @brief Initialize a semaphore */
 smx_sem_t SIMIX_sem_init(unsigned int value)
 {
@@ -404,6 +424,9 @@ smx_sem_t SIMIX_sem_init(unsigned int value)
   return sem;
 }
 
+void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem){
+  SIMIX_sem_destroy(sem);
+}
 /** @brief Destroys a semaphore */
 void SIMIX_sem_destroy(smx_sem_t sem)
 {
@@ -418,6 +441,9 @@ void SIMIX_sem_destroy(smx_sem_t sem)
   XBT_OUT();
 }
 
+void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem){
+  SIMIX_sem_release(sem);
+}
 /** @brief release the semaphore
  *
  * Unlock a process waiting on the semaphore.
@@ -448,6 +474,9 @@ XBT_INLINE int SIMIX_sem_would_block(smx_sem_t sem)
   return (sem->value <= 0);
 }
 
+int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem){
+  return SIMIX_sem_get_capacity(sem);
+}
 /** @brief Returns the current capacity of the semaphore */
 int SIMIX_sem_get_capacity(smx_sem_t sem)
 {
@@ -479,10 +508,10 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
  * \brief Handles a sem acquire simcall without timeout.
  * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire(smx_simcall_t simcall)
+void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
 {
   XBT_IN("(%p)",simcall);
-  _SIMIX_sem_wait(simcall->sem_acquire.sem, -1, simcall->issuer, simcall);
+  _SIMIX_sem_wait(sem, -1, simcall->issuer, simcall);
   XBT_OUT();
 }
 
@@ -490,10 +519,9 @@ void SIMIX_pre_sem_acquire(smx_simcall_t simcall)
  * \brief Handles a sem acquire simcall with timeout.
  * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall)
+void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout)
 {
   XBT_IN("(%p)",simcall);
-  _SIMIX_sem_wait(simcall->sem_acquire_timeout.sem,
-                  simcall->sem_acquire_timeout.timeout, simcall->issuer, simcall);  
+  _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall);  
   XBT_OUT();
 }
index f3ec15c..5b73ad8 100644 (file)
@@ -26,23 +26,42 @@ void SIMIX_synchro_destroy(smx_action_t action);
 
 smx_mutex_t SIMIX_mutex_init(void);
 void SIMIX_mutex_destroy(smx_mutex_t mutex);
-void SIMIX_pre_mutex_lock(smx_simcall_t simcall);
+void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
 int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer);
 void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer);
 
 smx_cond_t SIMIX_cond_init(void);
 void SIMIX_cond_destroy(smx_cond_t cond);
 void SIMIX_cond_signal(smx_cond_t cond);
-void SIMIX_pre_cond_wait(smx_simcall_t simcall);
-void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall);
+void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex);
+void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
+                                smx_mutex_t mutex, double timeout);
 void SIMIX_cond_broadcast(smx_cond_t cond);
 
 smx_sem_t SIMIX_sem_init(unsigned int value);
 void SIMIX_sem_destroy(smx_sem_t sem);
 void SIMIX_sem_release(smx_sem_t sem);
 int SIMIX_sem_would_block(smx_sem_t sem);
-void SIMIX_pre_sem_acquire(smx_simcall_t simcall);
-void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall);
+void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);
+void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout);
 int SIMIX_sem_get_capacity(smx_sem_t sem);
 
+// pre prototypes
+smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall);
+void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex);
+int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
+void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
+smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall);
+void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond);
+void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond);
+void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond);
+smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value);
+void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem);
+void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem);
+static XBT_INLINE int SIMIX_pre_sem_would_block(smx_simcall_t simcall,
+                                                smx_sem_t sem)
+{
+  return SIMIX_sem_would_block(sem);
+}
+int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem);
 #endif
index 47d9021..cf5caa2 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
+/* generate strings from the enumeration values */
 static const char* simcall_names[] = {
-#undef SIMCALL_ENUM_ELEMENT
-#define SIMCALL_ENUM_ELEMENT(x) #x /* generate strings from the enumeration values */
-SIMCALL_LIST
-#undef SIMCALL_ENUM_ELEMENT
+SIMCALL_LIST(SIMCALL_STRING_TYPE, SIMCALL_SEP_COMMA)
+[SIMCALL_NONE] = "NONE"
 };
 
+SIMCALL_LIST(SIMCALL_FUNC, SIMCALL_SEP_NOTHING)
+
 /**
  * \ingroup simix_host_management
  * \brief Returns a host given its name.
@@ -28,14 +29,7 @@ SIMCALL_LIST
  */
 smx_host_t simcall_host_get_by_name(const char *name)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_BY_NAME;
-  simcall->host_get_by_name.name = name;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_get_by_name.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_by_name.result;
+  return simcall_BODY_host_get_by_name(name);
 }
 
 /**
@@ -47,14 +41,7 @@ smx_host_t simcall_host_get_by_name(const char *name)
  */
 const char* simcall_host_get_name(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_NAME;
-  simcall->host_get_name.host = host;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_get_name.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_name.result;
+  return simcall_BODY_host_get_name(host);
 }
 
 /**
@@ -66,14 +53,7 @@ const char* simcall_host_get_name(smx_host_t host)
  */
 xbt_dict_t simcall_host_get_properties(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_PROPERTIES;
-  simcall->host_get_properties.host = host;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_get_properties.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_properties.result;
+  return simcall_BODY_host_get_properties(host);
 }
 
 /**
@@ -85,14 +65,7 @@ xbt_dict_t simcall_host_get_properties(smx_host_t host)
  */
 xbt_dict_t simcall_asr_get_properties(const char *name)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_ASR_GET_PROPERTIES;
-  simcall->asr_get_properties.name = name;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->asr_get_properties.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->asr_get_properties.result;
+  return simcall_BODY_asr_get_properties(name);
 }
 
 
@@ -106,14 +79,7 @@ xbt_dict_t simcall_asr_get_properties(const char *name)
  */
 double simcall_host_get_speed(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_SPEED;
-  simcall->host_get_speed.host = host;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->host_get_speed.result = 0.0;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_speed.result;
+  return simcall_BODY_host_get_speed(host);
 }
 
 /**
@@ -124,14 +90,7 @@ double simcall_host_get_speed(smx_host_t host)
  */
 double simcall_host_get_available_speed(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
-  simcall->host_get_available_speed.host = host;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->host_get_available_speed.result = 0.0;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_available_speed.result;
+  return simcall_BODY_host_get_available_speed(host);
 }
 
 /**
@@ -144,14 +103,7 @@ double simcall_host_get_available_speed(smx_host_t host)
  */
 int simcall_host_get_state(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_STATE;
-  simcall->host_get_state.host = host;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->host_get_state.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_state.result;
+  return simcall_BODY_host_get_state(host);
 }
 
 /**
@@ -163,14 +115,7 @@ int simcall_host_get_state(smx_host_t host)
  */
 void* simcall_host_get_data(smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_GET_DATA;
-  simcall->host_get_data.host = host;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_get_data.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_get_data.result;
+  return simcall_BODY_host_get_data(host);
 }
 
 /**
@@ -183,12 +128,7 @@ void* simcall_host_get_data(smx_host_t host)
  */
 void simcall_host_set_data(smx_host_t host, void *data)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_SET_DATA;
-  simcall->host_set_data.host = host;
-  simcall->host_set_data.data = data;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_host_set_data(host, data);
 }
 
 /**
@@ -204,6 +144,7 @@ void simcall_host_set_data(smx_host_t host, void *data)
  * \param priority computation priority
  * \return A new SIMIX execution action
  */
+
 smx_action_t simcall_host_execute(const char *name, smx_host_t host,
                                     double computation_amount,
                                     double priority)
@@ -212,17 +153,7 @@ smx_action_t simcall_host_execute(const char *name, smx_host_t host,
   xbt_assert(isfinite(computation_amount), "computation_amount is not finite!");
   xbt_assert(isfinite(priority), "priority is not finite!");
   
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTE;
-  simcall->host_execute.name = name;
-  simcall->host_execute.host = host;
-  simcall->host_execute.computation_amount = computation_amount;
-  simcall->host_execute.priority = priority;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_execute.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_execute.result;
+  return simcall_BODY_host_execute(name, host, computation_amount, priority);
 }
 
 /**
@@ -261,20 +192,11 @@ smx_action_t simcall_host_parallel_execute(const char *name,
   xbt_assert(isfinite(amount), "amount is not finite!");
   xbt_assert(isfinite(rate), "rate is not finite!");
   
-  smx_simcall_t simcall = SIMIX_simcall_mine();
+  return simcall_BODY_host_parallel_execute(name, host_nb, host_list,
+                                            computation_amount,
+                                            communication_amount,
+                                            amount, rate);
 
-  simcall->call = SIMCALL_HOST_PARALLEL_EXECUTE;
-  simcall->host_parallel_execute.name = name;
-  simcall->host_parallel_execute.host_nb = host_nb;
-  simcall->host_parallel_execute.host_list = host_list;
-  simcall->host_parallel_execute.computation_amount = computation_amount;
-  simcall->host_parallel_execute.communication_amount = communication_amount;
-  simcall->host_parallel_execute.amount = amount;
-  simcall->host_parallel_execute.rate = rate;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->host_parallel_execute.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_parallel_execute.result;
 }
 
 /**
@@ -286,11 +208,7 @@ smx_action_t simcall_host_parallel_execute(const char *name,
  */
 void simcall_host_execution_destroy(smx_action_t execution)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_DESTROY;
-  simcall->host_execution_destroy.execution = execution;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_host_execution_destroy(execution);
 }
 
 /**
@@ -302,11 +220,7 @@ void simcall_host_execution_destroy(smx_action_t execution)
  */
 void simcall_host_execution_cancel(smx_action_t execution)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_CANCEL;
-  simcall->host_execution_cancel.execution = execution;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_host_execution_cancel(execution);
 }
 
 /**
@@ -318,14 +232,7 @@ void simcall_host_execution_cancel(smx_action_t execution)
  */
 double simcall_host_execution_get_remains(smx_action_t execution)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
-  simcall->host_execution_get_remains.execution = execution;
-  if(MC_is_active()) /* Initializeialize result to a default value for snapshot comparison done during simcall */
-    simcall->host_execution_get_remains.result = 0.0;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_execution_get_remains.result;
+  return simcall_BODY_host_execution_get_remains(execution);
 }
 
 /**
@@ -337,13 +244,7 @@ double simcall_host_execution_get_remains(smx_action_t execution)
  */
 e_smx_state_t simcall_host_execution_get_state(smx_action_t execution)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_GET_STATE;
-  simcall->host_execution_get_state.execution = execution;
-  simcall->host_execution_get_state.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_execution_get_state.result;
+  return simcall_BODY_host_execution_get_state(execution);
 }
 
 /**
@@ -359,12 +260,7 @@ void simcall_host_execution_set_priority(smx_action_t execution, double priority
   /* checking for infinite values */
   xbt_assert(isfinite(priority), "priority is not finite!");
   
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
-  simcall->host_execution_set_priority.execution = execution;
-  simcall->host_execution_set_priority.priority = priority;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_host_execution_set_priority(execution, priority);
 }
 
 /**
@@ -375,14 +271,7 @@ void simcall_host_execution_set_priority(smx_action_t execution, double priority
  */
 e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_HOST_EXECUTION_WAIT;
-  simcall->host_execution_wait.execution = execution;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->host_execution_wait.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->host_execution_wait.result;
+  return simcall_BODY_host_execution_wait(execution);
 }
 
 /**
@@ -412,20 +301,9 @@ void simcall_process_create(smx_process_t *process, const char *name,
                               xbt_dict_t properties,
                               int auto_restart)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_CREATE;
-  simcall->process_create.process = process;
-  simcall->process_create.name = name;
-  simcall->process_create.code = code;
-  simcall->process_create.data = data;
-  simcall->process_create.hostname = hostname;
-  simcall->process_create.kill_time = kill_time;
-  simcall->process_create.argc = argc;
-  simcall->process_create.argv = argv;
-  simcall->process_create.properties = properties;
-  simcall->process_create.auto_restart = auto_restart;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_create(process, name, code, data, hostname,
+                              kill_time, argc, argv, properties,
+                              auto_restart);
 }
 
 /**
@@ -438,11 +316,7 @@ void simcall_process_create(smx_process_t *process, const char *name,
  */
 void simcall_process_kill(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_KILL;
-  simcall->process_kill.process = process;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_kill(process);
 }
 
 /**
@@ -451,10 +325,7 @@ void simcall_process_kill(smx_process_t process)
  */
 void simcall_process_killall(void)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_KILLALL;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_killall();
 }
 
 /**
@@ -464,11 +335,7 @@ void simcall_process_killall(void)
  */
 void simcall_process_cleanup(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_CLEANUP;
-  simcall->process_cleanup.process = process;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_cleanup(process);
 }
 
 /**
@@ -482,12 +349,7 @@ void simcall_process_cleanup(smx_process_t process)
  */
 void simcall_process_change_host(smx_process_t process, smx_host_t dest)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_CHANGE_HOST;
-  simcall->process_change_host.process = process;
-  simcall->process_change_host.dest = dest;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_change_host(process, dest);
 }
 
 /**
@@ -503,11 +365,7 @@ void simcall_process_suspend(smx_process_t process)
 {
   xbt_assert(process, "Invalid parameters");
 
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_SUSPEND;
-  simcall->process_suspend.process = process;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_suspend(process);
 }
 
 /**
@@ -521,11 +379,7 @@ void simcall_process_suspend(smx_process_t process)
  */
 void simcall_process_resume(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_RESUME;
-  simcall->process_resume.process = process;
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_resume(process);
 }
 
 /**
@@ -536,13 +390,7 @@ void simcall_process_resume(smx_process_t process)
  */
 int simcall_process_count(void)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_COUNT;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->process_count.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_count.result;
+  return simcall_BODY_process_count();
 }
 
 /**
@@ -558,14 +406,7 @@ void* simcall_process_get_data(smx_process_t process)
     return SIMIX_process_get_data(process);
   }
 
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_GET_DATA;
-  simcall->process_get_data.process = process;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->process_get_data.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_get_data.result;
+  return simcall_BODY_process_get_data(process);
 }
 
 /**
@@ -583,13 +424,7 @@ void simcall_process_set_data(smx_process_t process, void *data)
     SIMIX_process_self_set_data(process, data);
   }
   else {
-
-    smx_simcall_t simcall = SIMIX_simcall_mine();
-
-    simcall->call = SIMCALL_PROCESS_SET_DATA;
-    simcall->process_set_data.process = process;
-    simcall->process_set_data.data = data;
-    SIMIX_simcall_push(simcall->issuer);
+    simcall_BODY_process_set_data(process, data);
   }
 }
 
@@ -622,14 +457,7 @@ void simcall_process_set_kill_time(smx_process_t process, double kill_time)
  */
 smx_host_t simcall_process_get_host(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_GET_HOST;
-  simcall->process_get_host.process = process;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->process_get_host.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_get_host.result;
+  return simcall_BODY_process_get_host(process);
 }
 
 /**
@@ -646,15 +474,7 @@ const char* simcall_process_get_name(smx_process_t process)
     /* avoid a simcall if this function is called by the process itself */
     return process->name;
   }
-
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_GET_NAME;
-  simcall->process_get_name.process = process;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->process_get_name.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_get_name.result;
+  return simcall_BODY_process_get_name(process);
 }
 
 /**
@@ -667,14 +487,7 @@ const char* simcall_process_get_name(smx_process_t process)
  */
 int simcall_process_is_suspended(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_IS_SUSPENDED;
-  simcall->process_is_suspended.process = process;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->process_is_suspended.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_is_suspended.result;
+  return  simcall_BODY_process_is_suspended(process);
 }
 
 /**
@@ -685,14 +498,7 @@ int simcall_process_is_suspended(smx_process_t process)
  */
 xbt_dict_t simcall_process_get_properties(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_GET_PROPERTIES;
-  simcall->process_get_properties.process = process;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->process_get_properties.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_get_properties.result;
+  return simcall_BODY_process_get_properties(process);
 }
 /**
  * \ingroup simix_process_management
@@ -701,14 +507,7 @@ xbt_dict_t simcall_process_get_properties(smx_process_t process)
  */
 XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_ON_EXIT;
-  simcall->process_on_exit.process = process;
-  simcall->process_on_exit.fun = fun;
-  simcall->process_on_exit.data = data;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_on_exit(process, fun, data);
 }
 /**
  * \ingroup simix_process_management
@@ -718,30 +517,16 @@ XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_t fu
 
 XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_AUTO_RESTART_SET;
-  simcall->process_auto_restart.process = process;
-  simcall->process_auto_restart.auto_restart = auto_restart;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_process_auto_restart_set(process, auto_restart);
 }
+
 /**
  * \ingroup simix_process_management
  * \brief Restarts the process, killing it and starting it again from scratch.
  */
 XBT_PUBLIC(smx_process_t) simcall_process_restart(smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_RESTART;
-  simcall->process_restart.process = process;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->process_restart.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->process_restart.result;
+  return simcall_BODY_process_restart(process);
 }
 /**
  * \ingroup simix_process_management
@@ -758,15 +543,7 @@ e_smx_state_t simcall_process_sleep(double duration)
 {
   /* checking for infinite values */
   xbt_assert(isfinite(duration), "duration is not finite!");
-  
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_PROCESS_SLEEP;
-  simcall->process_sleep.duration = duration;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->process_sleep.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->process_sleep.result;
+  return simcall_BODY_process_sleep(duration);
 }
 
 /**
@@ -777,15 +554,7 @@ e_smx_state_t simcall_process_sleep(double duration)
  */
 smx_rdv_t simcall_rdv_create(const char *name)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_CREATE;
-  simcall->rdv_create.name = name;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->rdv_create.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->rdv_create.result;
+  return simcall_BODY_rdv_create(name);
 }
 
 
@@ -796,12 +565,7 @@ smx_rdv_t simcall_rdv_create(const char *name)
  */
 void simcall_rdv_destroy(smx_rdv_t rdv)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_DESTROY;
-  simcall->rdv_destroy.rdv = rdv;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_rdv_destroy(rdv);
 }
 /**
  *  \ingroup simix_rdv_management
@@ -835,16 +599,7 @@ smx_rdv_t simcall_rdv_get_by_name(const char *name)
  */
 int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
-  simcall->rdv_comm_count_by_host.rdv = rdv;
-  simcall->rdv_comm_count_by_host.host = host;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->rdv_comm_count_by_host.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->rdv_comm_count_by_host.result;
+  return simcall_BODY_rdv_comm_count_by_host(rdv, host);
 }
 
 /**
@@ -855,39 +610,17 @@ int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
  */
 smx_action_t simcall_rdv_get_head(smx_rdv_t rdv)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_GET_HEAD;
-  simcall->rdv_get_head.rdv = rdv;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->rdv_get_head.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->rdv_get_head.result;
+  return simcall_BODY_rdv_get_head(rdv);
 }
 
-void simcall_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process)
+void simcall_rdv_set_receiver(smx_rdv_t rdv, smx_process_t process)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_SET_RECV;
-  simcall->rdv_set_rcv_proc.rdv = rdv;
-  simcall->rdv_set_rcv_proc.receiver = process;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_rdv_set_receiver(rdv, process);
 }
 
 smx_process_t simcall_rdv_get_receiver(smx_rdv_t rdv)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_RDV_GET_RECV;
-  simcall->rdv_get_rcv_proc.rdv = rdv;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->rdv_get_rcv_proc.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->rdv_get_rcv_proc.result;
+  return simcall_BODY_rdv_get_receiver(rdv);
 }
 
 /**
@@ -912,21 +645,11 @@ void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
     simcall_comm_wait(comm, timeout);
   }
   else {
-    smx_simcall_t simcall = SIMIX_simcall_mine();
-
-    simcall->call = SIMCALL_COMM_SEND;
-    simcall->comm_send.rdv = rdv;
-    simcall->comm_send.task_size = task_size;
-    simcall->comm_send.rate = rate;
-    simcall->comm_send.src_buff = src_buff;
-    simcall->comm_send.src_buff_size = src_buff_size;
-    simcall->comm_send.match_fun = match_fun;
-    simcall->comm_send.data = data;
-    simcall->comm_send.timeout = timeout;
-
-    SIMIX_simcall_push(simcall->issuer);
+    simcall_BODY_comm_send(rdv, task_size, rate, src_buff, src_buff_size,
+                         match_fun, data, timeout);
   }
 }
+
 /**
  * \ingroup simix_comm_management
  */
@@ -943,23 +666,9 @@ smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
   
   xbt_assert(rdv, "No rendez-vous point defined for isend");
 
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_ISEND;
-  simcall->comm_isend.rdv = rdv;
-  simcall->comm_isend.task_size = task_size;
-  simcall->comm_isend.rate = rate;
-  simcall->comm_isend.src_buff = src_buff;
-  simcall->comm_isend.src_buff_size = src_buff_size;
-  simcall->comm_isend.match_fun = match_fun;
-  simcall->comm_isend.clean_fun = clean_fun;
-  simcall->comm_isend.data = data;
-  simcall->comm_isend.detached = detached;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_isend.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_isend.result;
+  return simcall_BODY_comm_isend(rdv, task_size, rate, src_buff,
+                                 src_buff_size, match_fun,
+                                 clean_fun, data, detached);
 }
 /**
  * \ingroup simix_comm_management
@@ -977,40 +686,20 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
     simcall_comm_wait(comm, timeout);
   }
   else {
-    smx_simcall_t simcall = SIMIX_simcall_mine();
-
-    simcall->call = SIMCALL_COMM_RECV;
-    simcall->comm_recv.rdv = rdv;
-    simcall->comm_recv.dst_buff = dst_buff;
-    simcall->comm_recv.dst_buff_size = dst_buff_size;
-    simcall->comm_recv.match_fun = match_fun;
-    simcall->comm_recv.data = data;
-    simcall->comm_recv.timeout = timeout;
-
-    SIMIX_simcall_push(simcall->issuer);
+    simcall_BODY_comm_recv(rdv, dst_buff, dst_buff_size,
+                           match_fun, data, timeout);
   }
 }
 /**
  * \ingroup simix_comm_management
  */
-smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
                                   int (*match_fun)(void *, void *, smx_action_t), void *data)
 {
   xbt_assert(rdv, "No rendez-vous point defined for irecv");
 
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_IRECV;
-  simcall->comm_irecv.rdv = rdv;
-  simcall->comm_irecv.dst_buff = dst_buff;
-  simcall->comm_irecv.dst_buff_size = dst_buff_size;
-  simcall->comm_irecv.match_fun = match_fun;
-  simcall->comm_irecv.data = data;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_irecv.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_irecv.result;
+  return simcall_BODY_comm_irecv(rdv, dst_buff, dst_buff_size, 
+                                 match_fun, data);
 }
 
 
@@ -1022,20 +711,9 @@ smx_action_t simcall_comm_iprobe(smx_rdv_t rdv, int src, int tag,
 {
   xbt_assert(rdv, "No rendez-vous point defined for iprobe");
 
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_IPROBE;
-  simcall->comm_iprobe.rdv = rdv;
-  simcall->comm_iprobe.src = src;
-  simcall->comm_iprobe.match_fun = match_fun;
-  simcall->comm_iprobe.data = data;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_iprobe.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_iprobe.result;
+  return simcall_BODY_comm_iprobe(rdv, src, tag, match_fun, data);
 }
 
-
 void simcall_comm_destroy(smx_action_t comm)
 {
   xbt_assert(comm, "Invalid parameter");
@@ -1051,64 +729,40 @@ void simcall_comm_destroy(smx_action_t comm)
   SIMIX_simcall_push(simcall->issuer);
   */
 }
+
 /**
  * \ingroup simix_comm_management
  */
 void simcall_comm_cancel(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_CANCEL;
-  simcall->comm_cancel.comm = comm;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_comm_cancel(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  */
 unsigned int simcall_comm_waitany(xbt_dynar_t comms)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_WAITANY;
-  simcall->comm_waitany.comms = comms;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->comm_waitany.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_waitany.result;
+  return simcall_BODY_comm_waitany(comms);
 }
+
 /**
  * \ingroup simix_comm_management
  */
 int simcall_comm_testany(xbt_dynar_t comms)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
   if (xbt_dynar_is_empty(comms))
     return -1;
-
-  simcall->call = SIMCALL_COMM_TESTANY;
-  simcall->comm_testany.comms = comms;
-    if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-      simcall->comm_testany.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_testany.result;
+  return simcall_BODY_comm_testany(comms);
 }
+
 /**
  * \ingroup simix_comm_management
  */
 void simcall_comm_wait(smx_action_t comm, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
-  
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_WAIT;
-  simcall->comm_wait.comm = comm;
-  simcall->comm_wait.timeout = timeout;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_comm_wait(comm, timeout);
 }
 
 #ifdef HAVE_TRACING
@@ -1124,143 +778,80 @@ void simcall_set_category(smx_action_t action, const char *category)
   if (category == NULL) {
     return;
   }
-
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SET_CATEGORY;
-  simcall->set_category.action = action;
-  simcall->set_category.category = category;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_set_category(action, category);
 }
 #endif
+
 /**
  * \ingroup simix_comm_management
  *
  */
 int simcall_comm_test(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_TEST;
-  simcall->comm_test.comm = comm;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->comm_test.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_test.result;
+  return simcall_BODY_comm_test(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 double simcall_comm_get_remains(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_REMAINS;
-  simcall->comm_get_remains.comm = comm;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->comm_get_remains.result = 0.0;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_remains.result;
+  return simcall_BODY_comm_get_remains(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 e_smx_state_t simcall_comm_get_state(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_STATE;
-  simcall->comm_get_state.comm = comm;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->comm_get_state.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_state.result;
+  return simcall_BODY_comm_get_state(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 void *simcall_comm_get_src_data(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_SRC_DATA;
-  simcall->comm_get_src_data.comm = comm;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_get_src_data.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_src_data.result;
+  return simcall_BODY_comm_get_src_data(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 void *simcall_comm_get_dst_data(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_DST_DATA;
-  simcall->comm_get_dst_data.comm = comm;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_get_dst_data.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_dst_data.result;
+  return simcall_BODY_comm_get_dst_data(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 smx_process_t simcall_comm_get_src_proc(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_SRC_PROC;
-  simcall->comm_get_src_proc.comm = comm;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_get_src_proc.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_src_proc.result;
+  return simcall_BODY_comm_get_src_proc(comm);
 }
+
 /**
  * \ingroup simix_comm_management
  *
  */
 smx_process_t simcall_comm_get_dst_proc(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_GET_DST_PROC;
-  simcall->comm_get_dst_proc.comm = comm;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->comm_get_dst_proc.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_get_dst_proc.result;
+  return simcall_BODY_comm_get_dst_proc(comm);  
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
 int simcall_comm_is_latency_bounded(smx_action_t comm)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
-  simcall->comm_is_latency_bounded.comm = comm;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->comm_is_latency_bounded.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->comm_is_latency_bounded.result;
+  return simcall_BODY_comm_is_latency_bounded(comm);
 }
 #endif
+
 /**
  * \ingroup simix_synchro_management
  *
@@ -1271,125 +862,81 @@ smx_mutex_t simcall_mutex_init(void)
     fprintf(stderr,"You must run MSG_init before using MSG\n"); // We can't use xbt_die since we may get there before the initialization
     xbt_abort();
   }
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_MUTEX_INIT;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->mutex_init.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->mutex_init.result;
+  return simcall_BODY_mutex_init();
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_mutex_destroy(smx_mutex_t mutex)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_MUTEX_DESTROY;
-  simcall->mutex_destroy.mutex = mutex;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_mutex_destroy(mutex);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_mutex_lock(smx_mutex_t mutex)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_MUTEX_LOCK;
-  simcall->mutex_lock.mutex = mutex;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_mutex_lock(mutex);  
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 int simcall_mutex_trylock(smx_mutex_t mutex)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_MUTEX_TRYLOCK;
-  simcall->mutex_trylock.mutex = mutex;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->mutex_trylock.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->mutex_trylock.result;
+  return simcall_BODY_mutex_trylock(mutex);  
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_mutex_unlock(smx_mutex_t mutex)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_MUTEX_UNLOCK;
-  simcall->mutex_unlock.mutex = mutex;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_mutex_unlock(mutex); 
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 smx_cond_t simcall_cond_init(void)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_INIT;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->cond_init.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->cond_init.result;
+  return simcall_BODY_cond_init();
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_cond_destroy(smx_cond_t cond)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_DESTROY;
-  simcall->cond_destroy.cond = cond;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_cond_destroy(cond);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_cond_signal(smx_cond_t cond)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_SIGNAL;
-  simcall->cond_signal.cond = cond;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_cond_signal(cond);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_WAIT;
-  simcall->cond_wait.cond = cond;
-  simcall->cond_wait.mutex = mutex;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_cond_wait(cond, mutex);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
@@ -1399,100 +946,63 @@ void simcall_cond_wait_timeout(smx_cond_t cond,
                                  double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
-  
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_WAIT_TIMEOUT;
-  simcall->cond_wait_timeout.cond = cond;
-  simcall->cond_wait_timeout.mutex = mutex;
-  simcall->cond_wait_timeout.timeout = timeout;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_cond_wait_timeout(cond, mutex, timeout);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_cond_broadcast(smx_cond_t cond)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_COND_BROADCAST;
-  simcall->cond_broadcast.cond = cond;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_cond_broadcast(cond);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 smx_sem_t simcall_sem_init(int capacity)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_INIT;
-  simcall->sem_init.capacity = capacity;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->sem_init.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->sem_init.result;
+  return simcall_BODY_sem_init(capacity);  
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_sem_destroy(smx_sem_t sem)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_DESTROY;
-  simcall->sem_destroy.sem = sem;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_sem_destroy(sem);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_sem_release(smx_sem_t sem)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_RELEASE;
-  simcall->sem_release.sem = sem;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_sem_release(sem);  
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 int simcall_sem_would_block(smx_sem_t sem)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_WOULD_BLOCK;
-  simcall->sem_would_block.sem = sem;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->sem_would_block.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->sem_would_block.result;
+  return simcall_BODY_sem_would_block(sem);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 void simcall_sem_acquire(smx_sem_t sem)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_ACQUIRE;
-  simcall->sem_acquire.sem = sem;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_sem_acquire(sem);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
@@ -1500,120 +1010,61 @@ void simcall_sem_acquire(smx_sem_t sem)
 void simcall_sem_acquire_timeout(smx_sem_t sem, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
-  
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
-  simcall->sem_acquire_timeout.sem = sem;
-  simcall->sem_acquire_timeout.timeout = timeout;
-
-  SIMIX_simcall_push(simcall->issuer);
+  simcall_BODY_sem_acquire_timeout(sem, timeout);
 }
+
 /**
  * \ingroup simix_synchro_management
  *
  */
 int simcall_sem_get_capacity(smx_sem_t sem)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_SEM_GET_CAPACITY;
-  simcall->sem_get_capacity.sem = sem;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->sem_get_capacity.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->sem_get_capacity.result;
+  return simcall_BODY_sem_get_capacity(sem);
 }
+
 /**
  * \ingroup simix_file_management
  *
  */
 double simcall_file_read(void* ptr, size_t size, size_t nmemb, smx_file_t stream)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_FILE_READ;
-  simcall->file_read.ptr = ptr;
-  simcall->file_read.size = size;
-  simcall->file_read.nmemb = nmemb;
-  simcall->file_read.stream = stream;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_read.result = 0.0;
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_read.result;
+  return simcall_BODY_file_read(ptr, size, nmemb, stream);
 }
+
 /**
  * \ingroup simix_file_management
  *
  */
 size_t simcall_file_write(const void* ptr, size_t size, size_t nmemb, smx_file_t stream)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_FILE_WRITE;
-  simcall->file_write.ptr = ptr;
-  simcall->file_write.size = size;
-  simcall->file_write.nmemb = nmemb;
-  simcall->file_write.stream = stream;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_write.result = 0;
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_write.result;
+  return simcall_BODY_file_write(ptr, size, nmemb, stream);
 }
+
 /**
  * \ingroup simix_file_management
  * \brief
  */
 smx_file_t simcall_file_open(const char* mount, const char* path, const char* mode)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_FILE_OPEN;
-  simcall->file_open.mount = mount;
-  simcall->file_open.path = path;
-  simcall->file_open.mode = mode;
-  if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
-    simcall->file_open.result = NULL;
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_open.result;
+  return simcall_BODY_file_open(mount, path, mode);
 }
+
 /**
  * \ingroup simix_file_management
  *
  */
 int simcall_file_close(smx_file_t fp)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-
-  simcall->call = SIMCALL_FILE_CLOSE;
-  simcall->file_close.fp = fp;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_close.result = -1;
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_close.result;
+  return simcall_BODY_file_close(fp);  
 }
+
 /**
  * \ingroup simix_file_management
  *
  */
 int simcall_file_stat(smx_file_t fd, s_file_stat_t *buf)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_FILE_STAT;
-  simcall->file_stat.fd = fd;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_stat.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-
-  *buf = simcall->file_stat.buf;
-
-  return simcall->file_stat.result;
+  return simcall_BODY_file_stat(fd, buf);
 }
 
 /**
@@ -1622,15 +1073,7 @@ int simcall_file_stat(smx_file_t fd, s_file_stat_t *buf)
  */
 int simcall_file_unlink(smx_file_t fd)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_FILE_UNLINK;
-  simcall->file_unlink.fd = fd;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_unlink.result = -1;
-
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_unlink.result;
+  return simcall_BODY_file_unlink(fd);
 }
 
 /**
@@ -1639,43 +1082,18 @@ int simcall_file_unlink(smx_file_t fd)
  */
 xbt_dict_t simcall_file_ls(const char* mount, const char* path)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_FILE_LS;
-  simcall->file_ls.mount = mount;
-  simcall->file_ls.path = path;
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->file_ls.result = NULL;
-
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->file_ls.result;
+  return simcall_BODY_file_ls(mount, path);
 }
 
 #ifdef HAVE_MC
 
 void *simcall_mc_snapshot(void)
 {
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_MC_SNAPSHOT;
-  
-  SIMIX_simcall_push(simcall->issuer);
-
-  return simcall->mc_snapshot.s;
+  return simcall_BODY_mc_snapshot();
 }
 
-int simcall_mc_compare_snapshots(void *s1, void *s2){
-  
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_MC_COMPARE_SNAPSHOTS;
-  simcall->mc_compare_snapshots.snapshot1 = s1;
-  simcall->mc_compare_snapshots.snapshot2 = s2;
-  
-  if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
-    simcall->mc_compare_snapshots.result = -1;
-  
-  SIMIX_simcall_push(simcall->issuer);
-  
-  return simcall->mc_compare_snapshots.result;
+int simcall_mc_compare_snapshots(void *s1, void *s2){ 
+  return simcall_BODY_mc_compare_snapshots(s1, s2);
 }
 
 #endif /* HAVE_MC */
similarity index 99%
rename from src/instr/instr_smpi.c
rename to src/smpi/instr_smpi.c
index cd30016..b4239be 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 "instr/instr_private.h"
+#include "private.h"
 #include "mc/mc.h"
 #include <ctype.h>
 #include <wchar.h>
@@ -41,7 +41,6 @@ static const char *smpi_colors[] ={
     "scatterv",      "0.52 0 0.52",
     "scatter",       "1 0.74 0.54",
     "computing",     "0 1 1",
-
     NULL, NULL,
 };
 
index 4219adb..148f4b0 100644 (file)
@@ -10,7 +10,7 @@
 #include "xbt.h"
 #include "xbt/xbt_os_time.h"
 #include "simgrid/simix.h"
-#include "smpi/smpi.h"
+#include "smpi/smpi_interface.h"
 #include "smpi/smpif.h"
 #include "smpi/smpi_cocci.h"
 #include "instr/instr_private.h"
@@ -22,7 +22,7 @@ typedef struct s_smpi_process_data *smpi_process_data_t;
 #define NON_PERSISTENT 0x2
 #define SEND           0x4
 #define RECV           0x8
-
+#define RECV_DELETE     0x10
 
 // this struct is here to handle the problem of non-contignous data
 // for each such structure these function should be implemented (vector
@@ -42,6 +42,7 @@ typedef struct s_smpi_mpi_datatype{
   int flags;
   /* this let us know how to serialize and unserialize*/
   void *substruct;
+  int in_use;
 } s_smpi_mpi_datatype_t;
 
 //*****************************************************************************************
@@ -58,10 +59,18 @@ typedef struct s_smpi_mpi_request {
   int src;
   int dst;
   int tag;
+  //to handle cases where we have an unknown sender
+  //We can't override src, tag, and size, because the request may be reused later
+  int real_src;
+  int real_tag;
+  int truncated;
+  size_t real_size;
   MPI_Comm comm;
   smx_action_t action;
   unsigned flags;
   int detached;
+  MPI_Request detached_sender;
+  int refcount;
 #ifdef HAVE_TRACING
   int send;
   int recv;
@@ -99,6 +108,9 @@ MPI_Aint smpi_datatype_get_extent(MPI_Datatype datatype);
 int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                        void *recvbuf, int recvcount,
                        MPI_Datatype recvtype);
+void smpi_datatype_use(MPI_Datatype type);
+void smpi_datatype_unuse(MPI_Datatype type);
+
 int smpi_datatype_contiguous(int count, MPI_Datatype old_type,
                        MPI_Datatype* new_type);
 int smpi_datatype_vector(int count, int blocklen, int stride,
@@ -252,16 +264,24 @@ void mpi_comm_rank__(int* comm, int* rank, int* ierr);
 void mpi_comm_size__(int* comm, int* size, int* ierr);
 double mpi_wtime__(void);
 double mpi_wtick__(void);
+void mpi_initialized__(int* flag, int* ierr);
 
 void mpi_comm_dup__(int* comm, int* newcomm, int* ierr);
+void mpi_comm_create__(int* comm, int* group, int* newcomm, int* ierr);
+void mpi_comm_free__(int* comm, int* ierr);
 void mpi_comm_split__(int* comm, int* color, int* key, int* comm_out, int* ierr);
-
+void mpi_group_incl__(int* group, int* n, int* key, int* group_out, int* ierr) ;
+void mpi_comm_group__(int* comm, int* group_out,  int* ierr);
 void mpi_send_init__(void *buf, int* count, int* datatype, int* dst, int* tag,
                      int* comm, int* request, int* ierr);
 void mpi_isend__(void *buf, int* count, int* datatype, int* dst,
                  int* tag, int* comm, int* request, int* ierr);
+void mpi_irsend__(void *buf, int* count, int* datatype, int* dst,
+                 int* tag, int* comm, int* request, int* ierr);
 void mpi_send__(void* buf, int* count, int* datatype, int* dst,
                 int* tag, int* comm, int* ierr);
+void mpi_rsend__(void* buf, int* count, int* datatype, int* dst,
+                int* tag, int* comm, int* ierr);
 void mpi_recv_init__(void *buf, int* count, int* datatype, int* src, int* tag,
                      int* comm, int* request, int* ierr);
 void mpi_irecv__(void *buf, int* count, int* datatype, int* src, int* tag,
@@ -280,12 +300,20 @@ void mpi_reduce__(void* sendbuf, void* recvbuf, int* count,
                   int* datatype, int* op, int* root, int* comm, int* ierr);
 void mpi_allreduce__(void* sendbuf, void* recvbuf, int* count, int* datatype,
                      int* op, int* comm, int* ierr);
+void mpi_reduce_scatter__(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype,
+                     int* op, int* comm, int* ierr) ;
 void mpi_scatter__(void* sendbuf, int* sendcount, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype,
                    int* root, int* comm, int* ierr);
+void mpi_scatterv__(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
+                   void* recvbuf, int* recvcount, int* recvtype,
+                   int* root, int* comm, int* ierr);
 void mpi_gather__(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcount, int* recvtype,
                   int* root, int* comm, int* ierr);
+void mpi_gatherv__(void* sendbuf, int* sendcount, int* sendtype,
+                  void* recvbuf, int* recvcounts, int* displs, int* recvtype,
+                  int* root, int* comm, int* ierr);
 void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr);
@@ -298,11 +326,29 @@ void mpi_scan__(void* sendbuf, void* recvbuf, int* count, int* datatype,
                 int* op, int* comm, int* ierr);
 void mpi_alltoall__(void* sendbuf, int* sendcount, int* sendtype,
                     void* recvbuf, int* recvcount, int* recvtype, int* comm, int* ierr);
+void mpi_alltoallv__(void* sendbuf, int* sendcounts, int* senddisps, int* sendtype,
+                    void* recvbuf, int* recvcounts, int* recvdisps, int* recvtype, int* comm, int* ierr);
 void mpi_get_processor_name__(char *name, int *resultlen, int* ierr);
 void mpi_test__ (int * request, int *flag, MPI_Status * status, int* ierr);
 void mpi_get_count__(MPI_Status * status, int* datatype, int *count, int* ierr);
 void mpi_type_extent__(int* datatype, MPI_Aint * extent, int* ierr);
+void mpi_attr_get__(int* comm, int* keyval, void* attr_value, int* flag, int* ierr );
 void mpi_type_lb__(int* datatype, MPI_Aint * extent, int* ierr);
 void mpi_type_ub__(int* datatype, MPI_Aint * extent, int* ierr);
+void mpi_error_string__(int* errorcode, char* string, int* resultlen, int* ierr);
+void mpi_sendrecv__(void* sendbuf, int* sendcount, int* sendtype, int* dst,
+                int* sendtag, void *recvbuf, int* recvcount,
+                int* recvtype, int* src, int* recvtag,
+                int* comm, MPI_Status* status, int* ierr);
+
+/********** Tracing **********/
+/* from smpi_instr.c */
+void TRACE_internal_smpi_set_category (const char *category);
+const char *TRACE_internal_smpi_get_category (void);
+void TRACE_smpi_collective_in(int rank, int root, const char *operation);
+void TRACE_smpi_collective_out(int rank, int root, const char *operation);
+void TRACE_smpi_computing_init(int rank);
+void TRACE_smpi_computing_out(int rank);
+void TRACE_smpi_computing_in(int rank);
 
 #endif
index a534910..614067d 100644 (file)
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include "simix/smx_private.h"
 #include "surf/surf.h"
+#include "simgrid/sg_config.h"
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_base, smpi, "Logging specific to SMPI (base)");
@@ -23,8 +24,18 @@ static int match_recv(void* a, void* b, smx_action_t ignored) {
 
   xbt_assert(ref, "Cannot match recv against null reference");
   xbt_assert(req, "Cannot match recv against null request");
-  return (ref->src == MPI_ANY_SOURCE || req->src == ref->src)
-    && (ref->tag == MPI_ANY_TAG || req->tag == ref->tag);
+  if((ref->src == MPI_ANY_SOURCE || req->src == ref->src)
+    && (ref->tag == MPI_ANY_TAG || req->tag == ref->tag)){
+    //we match, we can transfer some values
+    // FIXME : move this to the copy function ?
+    if(ref->src == MPI_ANY_SOURCE)ref->real_src = req->src;
+    if(ref->tag == MPI_ANY_TAG)ref->real_tag = req->tag;
+    if(ref->real_size < req->real_size) ref->truncated = 1;
+    if(req->detached==1){
+        ref->detached_sender=req; //tie the sender to the receiver, as it is detached and has to be freed in the receiver
+    }
+    return 1;
+  }else return 0;
 }
 
 static int match_send(void* a, void* b,smx_action_t ignored) {
@@ -33,8 +44,120 @@ static int match_send(void* a, void* b,smx_action_t ignored) {
    XBT_DEBUG("Trying to match a send of src %d against %d, tag %d against %d",ref->src,req->src, ref->tag, req->tag);
    xbt_assert(ref, "Cannot match send against null reference");
    xbt_assert(req, "Cannot match send against null request");
-   return (req->src == MPI_ANY_SOURCE || req->src == ref->src)
-          && (req->tag == MPI_ANY_TAG || req->tag == ref->tag);
+
+   if((req->src == MPI_ANY_SOURCE || req->src == ref->src)
+             && (req->tag == MPI_ANY_TAG || req->tag == ref->tag))
+   {
+     if(req->src == MPI_ANY_SOURCE)req->real_src = ref->src;
+     if(req->tag == MPI_ANY_TAG)req->real_tag = ref->tag;
+     if(req->real_size < ref->real_size) req->truncated = 1;
+     if(ref->detached==1){
+         req->detached_sender=ref; //tie the sender to the receiver, as it is detached and has to be freed in the receiver
+     }
+
+     return 1;
+   } else return 0;
+}
+
+
+typedef struct s_smpi_factor *smpi_factor_t;
+typedef struct s_smpi_factor {
+  long factor;
+  int nb_values;
+  double values[4];//arbitrary set to 4
+} s_smpi_factor_t;
+xbt_dynar_t smpi_os_values = NULL;
+xbt_dynar_t smpi_or_values = NULL;
+
+
+// Methods used to parse and store the values for timing injections in smpi
+// These are taken from surf/network.c and generalized to have more factors
+// These methods should be merged with those in surf/network.c (moved somewhere in xbt ?)
+
+static int factor_cmp(const void *pa, const void *pb)
+{
+  return (((s_smpi_factor_t*)pa)->factor > ((s_smpi_factor_t*)pb)->factor);
+}
+
+
+static xbt_dynar_t parse_factor(const char *smpi_coef_string)
+{
+  char *value = NULL;
+  unsigned int iter = 0;
+  s_smpi_factor_t fact;
+  int i=0;
+  xbt_dynar_t smpi_factor, radical_elements, radical_elements2 = NULL;
+
+  smpi_factor = xbt_dynar_new(sizeof(s_smpi_factor_t), NULL);
+  radical_elements = xbt_str_split(smpi_coef_string, ";");
+  xbt_dynar_foreach(radical_elements, iter, value) {
+    fact.nb_values=0;
+    radical_elements2 = xbt_str_split(value, ":");
+    if (xbt_dynar_length(radical_elements2) <2 || xbt_dynar_length(radical_elements2) > 5)
+      xbt_die("Malformed radical for smpi factor!");
+    for(i =0; i<xbt_dynar_length(radical_elements2);i++ ){
+        if (i==0){
+           fact.factor = atol(xbt_dynar_get_as(radical_elements2, i, char *));
+        }else{
+           fact.values[fact.nb_values] = atof(xbt_dynar_get_as(radical_elements2, i, char *));
+           fact.nb_values++;
+        }
+    }
+
+    xbt_dynar_push_as(smpi_factor, s_smpi_factor_t, fact);
+    XBT_DEBUG("smpi_factor:\t%ld : %d values, first: %f", fact.factor, fact.nb_values ,fact.values[0]);
+    xbt_dynar_free(&radical_elements2);
+  }
+  xbt_dynar_free(&radical_elements);
+  iter=0;
+  xbt_dynar_sort(smpi_factor, &factor_cmp);
+  xbt_dynar_foreach(smpi_factor, iter, fact) {
+    XBT_DEBUG("smpi_factor:\t%ld : %d values, first: %f", fact.factor, fact.nb_values ,fact.values[0]);
+  }
+  return smpi_factor;
+}
+
+static double smpi_os(double size)
+{
+  if (!smpi_os_values)
+    smpi_os_values =
+        parse_factor(sg_cfg_get_string("smpi/os"));
+
+  unsigned int iter = 0;
+  s_smpi_factor_t fact;
+  double current=0.0;
+  xbt_dynar_foreach(smpi_os_values, iter, fact) {
+    if (size <= fact.factor) {
+        XBT_DEBUG("os : %lf <= %ld return %f", size, fact.factor, current);
+      return current;
+    }else{
+      current=fact.values[0]+fact.values[1]*size;
+    }
+  }
+  XBT_DEBUG("os : %lf > %ld return %f", size, fact.factor, current);
+
+  return current;
+}
+
+static double smpi_or(double size)
+{
+  if (!smpi_or_values)
+    smpi_or_values =
+        parse_factor(sg_cfg_get_string("smpi/or"));
+
+  unsigned int iter = 0;
+  s_smpi_factor_t fact;
+  double current=0.0;
+  xbt_dynar_foreach(smpi_or_values, iter, fact) {
+    if (size <= fact.factor) {
+        XBT_DEBUG("or : %lf <= %ld return %f", size, fact.factor, current);
+      return current;
+    }else
+      current=fact.values[0]+fact.values[1]*size;
+  }
+  XBT_DEBUG("or : %lf > %ld return %f", size, fact.factor, current);
+
+  return current;
 }
 
 static MPI_Request build_request(void *buf, int count,
@@ -50,16 +173,16 @@ static MPI_Request build_request(void *buf, int count,
   s_smpi_subtype_t *subtype = datatype->substruct;
 
   if(datatype->has_subtype == 1){
-    // This part handles the problem of non-contignous memory
+    // This part handles the problem of non-contiguous memory
     old_buf = buf;
-    buf = malloc(count*smpi_datatype_size(datatype));
+    buf = xbt_malloc(count*smpi_datatype_size(datatype));
     if (flags & SEND) {
       subtype->serialize(old_buf, buf, count, datatype->substruct);
     }
   }
 
   request->buf = buf;
-  // This part handles the problem of non-contignous memory (for the
+  // This part handles the problem of non-contiguous memory (for the
   // unserialisation at the reception)
   request->old_buf = old_buf;
   request->old_type = datatype;
@@ -72,10 +195,19 @@ static MPI_Request build_request(void *buf, int count,
   request->action = NULL;
   request->flags = flags;
   request->detached = 0;
+  request->detached_sender = NULL;
+
+  request->truncated = 0;
+  request->real_size = 0;
+  request->real_tag = 0;
+
+  request->refcount=1;
 #ifdef HAVE_TRACING
   request->send = 0;
   request->recv = 0;
 #endif
+  if (flags & SEND) smpi_datatype_unuse(datatype);
+
   return request;
 }
 
@@ -130,7 +262,7 @@ MPI_Request smpi_mpi_send_init(void *buf, int count, MPI_Datatype datatype,
   MPI_Request request =
     build_request(buf, count, datatype, smpi_comm_rank(comm), dst, tag,
                   comm, PERSISTENT | SEND);
-
+  request->refcount++;
   return request;
 }
 
@@ -140,7 +272,7 @@ MPI_Request smpi_mpi_recv_init(void *buf, int count, MPI_Datatype datatype,
   MPI_Request request =
     build_request(buf, count, datatype, src, smpi_comm_rank(comm), tag,
                   comm, PERSISTENT | RECV);
-
+  request->refcount++;
   return request;
 }
 
@@ -152,13 +284,21 @@ void smpi_mpi_start(MPI_Request request)
              "Cannot (re)start a non-finished communication");
   if(request->flags & RECV) {
     print_request("New recv", request);
-    if (request->size < surf_cfg_get_int("smpi/async_small_thres"))
+    if (request->size < sg_cfg_get_int("smpi/async_small_thres"))
       mailbox = smpi_process_mailbox_small();
     else
       mailbox = smpi_process_mailbox();
+    // we make a copy here, as the size is modified by simix, and we may reuse the request in another receive later
+    request->real_size=request->size;
+    smpi_datatype_use(request->old_type);
+    request->action = simcall_comm_irecv(mailbox, request->buf, &request->real_size, &match_recv, request);
+
+    double sleeptime = smpi_or(request->size);
+    if(sleeptime!=0.0){
+        simcall_process_sleep(sleeptime);
+        XBT_DEBUG("receiving size of %ld : sleep %lf ", request->size, smpi_or(request->size));
+    }
 
-    // FIXME: SIMIX does not yet support non-contiguous datatypes
-    request->action = simcall_comm_irecv(mailbox, request->buf, &request->size, &match_recv, request);
   } else {
 
     int receiver = smpi_group_index(smpi_comm_group(request->comm), request->dst);
@@ -167,7 +307,7 @@ void smpi_mpi_start(MPI_Request request)
 /*      return;*/
 /*    }*/
     print_request("New send", request);
-    if (request->size < surf_cfg_get_int("smpi/async_small_thres")) { // eager mode
+    if (request->size < sg_cfg_get_int("smpi/async_small_thres")) { // eager mode
       mailbox = smpi_process_remote_mailbox_small(receiver);
     }else{
       XBT_DEBUG("Send request %p is not in the permanent receive mailbox (buf: %p)",request,request->buf);
@@ -175,19 +315,28 @@ void smpi_mpi_start(MPI_Request request)
     }
     if (request->size < 64*1024 ) { //(FIXME: this limit should be configurable)
       void *oldbuf = NULL;
+      request->detached = 1;
+      request->refcount++;
       if(request->old_type->has_subtype == 0){
         oldbuf = request->buf;
-        request->detached = 1;
-        request->buf = malloc(request->size);
-        if (oldbuf)
+        if (oldbuf){
+          request->buf = xbt_malloc(request->size);
           memcpy(request->buf,oldbuf,request->size);
+        }
       }
       XBT_DEBUG("Send request %p is detached; buf %p copied into %p",request,oldbuf,request->buf);
     }
-
+    // we make a copy here, as the size is modified by simix, and we may reuse the request in another receive later
+    request->real_size=request->size;
+    smpi_datatype_use(request->old_type);
+    double sleeptime = smpi_os(request->size);
+    if(sleeptime!=0.0){
+        simcall_process_sleep(sleeptime);
+        XBT_DEBUG("sending size of %ld : sleep %lf ", request->size, smpi_os(request->size));
+    }
     request->action =
       simcall_comm_isend(mailbox, request->size, -1.0,
-                         request->buf, request->size,
+                         request->buf, request->real_size,
                          &match_send,
                          &smpi_mpi_request_free_voidp, // how to free the userdata if a detached send fails
                          request,
@@ -215,8 +364,18 @@ void smpi_mpi_startall(int count, MPI_Request * requests)
 
 void smpi_mpi_request_free(MPI_Request * request)
 {
-  xbt_free(*request);
-  *request = MPI_REQUEST_NULL;
+
+  if((*request) != MPI_REQUEST_NULL){
+    (*request)->refcount--;
+    if((*request)->refcount<0) xbt_die("wrong refcount");
+
+    if((*request)->refcount==0){
+        xbt_free(*request);
+        *request = MPI_REQUEST_NULL;
+    }
+  }else{
+      xbt_die("freeing an already free request");
+  }
 }
 
 MPI_Request smpi_isend_init(void *buf, int count, MPI_Datatype datatype,
@@ -233,7 +392,8 @@ MPI_Request smpi_mpi_isend(void *buf, int count, MPI_Datatype datatype,
                            int dst, int tag, MPI_Comm comm)
 {
   MPI_Request request =
-    smpi_isend_init(buf, count, datatype, dst, tag, comm);
+      build_request(buf, count, datatype, smpi_comm_rank(comm), dst, tag,
+                    comm, NON_PERSISTENT | SEND);
 
   smpi_mpi_start(request);
   return request;
@@ -252,7 +412,8 @@ MPI_Request smpi_mpi_irecv(void *buf, int count, MPI_Datatype datatype,
                            int src, int tag, MPI_Comm comm)
 {
   MPI_Request request =
-    smpi_irecv_init(buf, count, datatype, src, tag, comm);
+      build_request(buf, count, datatype, src, smpi_comm_rank(comm), tag,
+                    comm, NON_PERSISTENT | RECV);
 
   smpi_mpi_start(request);
   return request;
@@ -272,9 +433,9 @@ void smpi_mpi_send(void *buf, int count, MPI_Datatype datatype, int dst,
                    int tag, MPI_Comm comm)
 {
   MPI_Request request;
-
   request = smpi_mpi_isend(buf, count, datatype, dst, tag, comm);
   smpi_mpi_wait(&request, MPI_STATUS_IGNORE);
+
 }
 
 void smpi_mpi_sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
@@ -305,35 +466,36 @@ int smpi_mpi_get_count(MPI_Status * status, MPI_Datatype datatype)
 static void finish_wait(MPI_Request * request, MPI_Status * status)
 {
   MPI_Request req = *request;
-  // if we have a sender, we should use its data, and not the data from the receive
-  //FIXME : mail fail if req->action has already been freed, the pointer being invalid
-  if((req->action)&&
-     (req->src==MPI_ANY_SOURCE || req->tag== MPI_ANY_TAG))
-    req = (MPI_Request)SIMIX_comm_get_src_data((*request)->action);
+  if(!(req->detached && req->flags & SEND)){
+    if(status != MPI_STATUS_IGNORE) {
+      status->MPI_SOURCE = req->src == MPI_ANY_SOURCE ? req->real_src : req->src;
+      status->MPI_TAG = req->tag == MPI_ANY_TAG ? req->real_tag : req->tag;
+      if(req->truncated)
+      status->MPI_ERROR = MPI_ERR_TRUNCATE;
+      else status->MPI_ERROR = MPI_SUCCESS ;
+      // this handles the case were size in receive differs from size in send
+      // FIXME: really this should just contain the count of receive-type blocks,
+      // right?
+      status->count = req->real_size;
+    }
 
-  if(status != MPI_STATUS_IGNORE) {
-    status->MPI_SOURCE = req->src;
-    status->MPI_TAG = req->tag;
-    //if((*request)->action && ((MPI_Request)SIMIX_comm_get_src_data((*request)->action))->size == (*request)->size)
-    status->MPI_ERROR = MPI_SUCCESS;
-    //else status->MPI_ERROR = MPI_ERR_TRUNCATE;
-    // this handles the case were size in receive differs from size in send
-    // FIXME: really this should just contain the count of receive-type blocks,
-    // right?
-    status->count = req->size;
-  }
-  req = *request;
-
-  print_request("Finishing", req);
-  MPI_Datatype datatype = req->old_type;
-  if(datatype->has_subtype == 1){
-      // This part handles the problem of non-contignous memory
-      // the unserialization at the reception
-    s_smpi_subtype_t *subtype = datatype->substruct;
-    if(req->flags & RECV) {
-      subtype->unserialize(req->buf, req->old_buf, req->size/smpi_datatype_size(datatype) , datatype->substruct);
+    print_request("Finishing", req);
+    MPI_Datatype datatype = req->old_type;
+
+    if(datatype->has_subtype == 1){
+        // This part handles the problem of non-contignous memory
+        // the unserialization at the reception
+      s_smpi_subtype_t *subtype = datatype->substruct;
+      if(req->flags & RECV) {
+        subtype->unserialize(req->buf, req->old_buf, req->real_size/smpi_datatype_size(datatype) , datatype->substruct);
+      }
+      if(req->detached == 0) free(req->buf);
     }
-    if(req->detached == 0) free(req->buf);
+    smpi_datatype_unuse(datatype);
+  }
+
+  if(req->detached_sender!=NULL){
+    smpi_mpi_request_free(&(req->detached_sender));
   }
 
   if(req->flags & NON_PERSISTENT) {
@@ -352,6 +514,7 @@ int smpi_mpi_test(MPI_Request * request, MPI_Status * status) {
   else
     flag = simcall_comm_test((*request)->action);
   if(flag) {
+    (*request)->refcount++;
     finish_wait(request, status);
   }else{
     smpi_empty_status(status);
@@ -444,7 +607,7 @@ void smpi_mpi_iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
 
   print_request("New iprobe", request);
   // We have to test both mailboxes as we don't know if we will receive one one or another
-    if (surf_cfg_get_int("smpi/async_small_thres")>0){
+    if (sg_cfg_get_int("smpi/async_small_thres")>0){
         mailbox = smpi_process_mailbox_small();
         XBT_DEBUG("trying to probe the perm recv mailbox");
         request->action = simcall_comm_iprobe(mailbox, request->src, request->tag, &match_recv, (void*)request);
@@ -462,7 +625,7 @@ void smpi_mpi_iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status*
       status->MPI_SOURCE = req->src;
       status->MPI_TAG = req->tag;
       status->MPI_ERROR = MPI_SUCCESS;
-      status->count = req->size;
+      status->count = req->real_size;
     }
   }
   else *flag = 0;
@@ -476,8 +639,9 @@ void smpi_mpi_wait(MPI_Request * request, MPI_Status * status)
   print_request("Waiting", *request);
   if ((*request)->action != NULL) { // this is not a detached send
     simcall_comm_wait((*request)->action, -1.0);
-    finish_wait(request, status);
   }
+  finish_wait(request, status);
+
   // FIXME for a detached send, finish_wait is not called:
 }
 
@@ -494,13 +658,22 @@ int smpi_mpi_waitany(int count, MPI_Request requests[],
     comms = xbt_dynar_new(sizeof(smx_action_t), NULL);
     map = xbt_new(int, count);
     size = 0;
-    XBT_DEBUG("Wait for one of");
+    XBT_DEBUG("Wait for one of %d", count);
     for(i = 0; i < count; i++) {
-      if((requests[i] != MPI_REQUEST_NULL) && (requests[i]->action != NULL)) {
-        print_request("Waiting any ", requests[i]);
-        xbt_dynar_push(comms, &requests[i]->action);
-        map[size] = i;
-        size++;
+      if(requests[i] != MPI_REQUEST_NULL) {
+        if (requests[i]->action != NULL) {
+          XBT_DEBUG("Waiting any %p ", requests[i]);
+          xbt_dynar_push(comms, &requests[i]->action);
+          map[size] = i;
+          size++;
+        }else{
+         //This is a finished detached request, let's return this one
+         size=0;//so we free the dynar but don't do the waitany call
+         index=i;
+         finish_wait(&requests[i], status);//cleanup if refcount = 0
+         requests[i]=MPI_REQUEST_NULL;//set to null
+         break;
+         }
       }
     }
     if(size > 0) {
@@ -541,7 +714,6 @@ int smpi_mpi_waitall(int count, MPI_Request requests[],
       }
     }
   }
-
   for(c = 0; c < count; c++) {
       if(MC_is_active()) {
         smpi_mpi_wait(&requests[c], pstat);
@@ -558,6 +730,7 @@ int smpi_mpi_waitall(int count, MPI_Request requests[],
       }
     }
   }
+
   return retvalue;
 }
 
index 2732ec9..ca628b9 100644 (file)
@@ -9,6 +9,7 @@
 #include "xbt/sysdep.h"
 #include "xbt/ex.h"
 #include "surf/surf.h"
+#include "simgrid/sg_config.h"
 
 #ifndef WIN32
 #include <sys/mman.h>
@@ -136,13 +137,13 @@ 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 >= surf_cfg_get_double("smpi/cpu_threshold")) {
+  if (duration >= sg_cfg_get_double("smpi/cpu_threshold")) {
     XBT_DEBUG("Sleep for %f to handle real computation time", duration);
     smpi_execute_flops(duration *
-               surf_cfg_get_double("smpi/running_power"));
+               sg_cfg_get_double("smpi/running_power"));
   } else {
     XBT_DEBUG("Real computation took %f while option smpi/cpu_threshold is set to %f => ignore it",
-        duration, surf_cfg_get_double("smpi/cpu_threshold"));
+        duration, sg_cfg_get_double("smpi/cpu_threshold"));
   }
 }
 
index ffe8916..41e837d 100644 (file)
@@ -14,6 +14,7 @@ extern int xargc;
 extern char** xargv;
 
 static xbt_dynar_t comm_lookup = NULL;
+static xbt_dynar_t group_lookup = NULL;
 static xbt_dict_t request_lookup = NULL;
 static xbt_dynar_t datatype_lookup = NULL;
 static xbt_dynar_t op_lookup = NULL;
@@ -25,6 +26,10 @@ static int new_comm(MPI_Comm comm) {
   return (int)xbt_dynar_length(comm_lookup) - 1;
 }
 
+static void free_comm(int comm) {
+  xbt_dynar_remove_at(comm_lookup, comm, NULL);
+}
+
 static MPI_Comm get_comm(int comm) {
   if(comm == -2) {
     return MPI_COMM_SELF;
@@ -34,6 +39,20 @@ static MPI_Comm get_comm(int comm) {
   return MPI_COMM_NULL;
 }
 
+static int new_group(MPI_Group group) {
+  xbt_dynar_push(group_lookup, &group);
+  return (int)xbt_dynar_length(group_lookup) - 1;
+}
+
+static MPI_Group get_group(int group) {
+  if(group == -2) {
+    return MPI_GROUP_EMPTY;
+  } else if(group_lookup && group >= 0 && group < (int)xbt_dynar_length(group_lookup)) {
+    return *(MPI_Group*)xbt_dynar_get_ptr(group_lookup, group);
+  }
+  return MPI_COMM_NULL;
+}
+
 static char* get_key(char* key, int id) {
   snprintf(key, KEY_SIZE, "%x", id);
   return key;
@@ -78,6 +97,7 @@ static MPI_Op get_op(int op) {
 void mpi_init__(int* ierr) {
    comm_lookup = xbt_dynar_new(sizeof(MPI_Comm), NULL);
    new_comm(MPI_COMM_WORLD);
+   group_lookup = xbt_dynar_new(sizeof(MPI_Group), NULL);
 
    request_lookup = xbt_dict_new_homogeneous(NULL);
 
@@ -164,6 +184,26 @@ void mpi_comm_dup__(int* comm, int* newcomm, int* ierr) {
   }
 }
 
+void mpi_comm_create__(int* comm, int* group, int* newcomm, int* ierr) {
+  MPI_Comm tmp;
+
+  *ierr = MPI_Comm_create(get_comm(*comm),get_group(*group), &tmp);
+  if(*ierr == MPI_SUCCESS) {
+    *newcomm = new_comm(tmp);
+  }
+}
+
+
+void mpi_comm_free__(int* comm, int* ierr) {
+  MPI_Comm tmp = get_comm(*comm);
+
+  *ierr = MPI_Comm_free(&tmp);
+
+  if(*ierr == MPI_SUCCESS) {
+    free_comm(*comm);
+  }
+}
+
 void mpi_comm_split__(int* comm, int* color, int* key, int* comm_out, int* ierr) {
   MPI_Comm tmp;
 
@@ -173,6 +213,29 @@ void mpi_comm_split__(int* comm, int* color, int* key, int* comm_out, int* ierr)
   }
 }
 
+void mpi_group_incl__(int* group, int* n, int* ranks, int* group_out, int* ierr) {
+  MPI_Group tmp;
+
+  *ierr = MPI_Group_incl(get_group(*group), *n, ranks, &tmp);
+  if(*ierr == MPI_SUCCESS) {
+    *group_out = new_group(tmp);
+  }
+}
+
+void mpi_comm_group__(int* comm, int* group_out,  int* ierr) {
+  MPI_Group tmp;
+
+  *ierr = MPI_Comm_group(get_comm(*comm), &tmp);
+  if(*ierr == MPI_SUCCESS) {
+    *group_out = new_group(tmp);
+  }
+}
+
+
+void mpi_initialized__(int* flag, int* ierr){
+  *ierr = MPI_Initialized(flag);
+}
+
 void mpi_send_init__(void *buf, int* count, int* datatype, int* dst, int* tag,
                      int* comm, int* request, int* ierr) {
   MPI_Request req;
@@ -195,12 +258,38 @@ void mpi_isend__(void *buf, int* count, int* datatype, int* dst,
   }
 }
 
+void mpi_irsend__(void *buf, int* count, int* datatype, int* dst,
+                 int* tag, int* comm, int* request, int* ierr) {
+  MPI_Request req;
+
+  *ierr = MPI_Irsend(buf, *count, get_datatype(*datatype), *dst, *tag,
+                    get_comm(*comm), &req);
+  if(*ierr == MPI_SUCCESS) {
+    *request = new_request(req);
+  }
+}
+
 void mpi_send__(void* buf, int* count, int* datatype, int* dst,
                 int* tag, int* comm, int* ierr) {
    *ierr = MPI_Send(buf, *count, get_datatype(*datatype), *dst, *tag,
                     get_comm(*comm));
 }
 
+void mpi_rsend__(void* buf, int* count, int* datatype, int* dst,
+                int* tag, int* comm, int* ierr) {
+   *ierr = MPI_Rsend(buf, *count, get_datatype(*datatype), *dst, *tag,
+                    get_comm(*comm));
+}
+
+void mpi_sendrecv__(void* sendbuf, int* sendcount, int* sendtype, int* dst,
+                int* sendtag, void *recvbuf, int* recvcount,
+                int* recvtype, int* src, int* recvtag,
+                int* comm, MPI_Status* status, int* ierr) {
+   *ierr = MPI_Sendrecv(sendbuf, *sendcount, get_datatype(*sendtype), *dst,
+       *sendtag, recvbuf, *recvcount,get_datatype(*recvtype), *src, *recvtag,
+       get_comm(*comm), status);
+}
+
 void mpi_recv_init__(void *buf, int* count, int* datatype, int* src, int* tag,
                      int* comm, int* request, int* ierr) {
   MPI_Request req;
@@ -297,6 +386,12 @@ void mpi_allreduce__(void* sendbuf, void* recvbuf, int* count, int* datatype,
                         get_op(*op), get_comm(*comm));
 }
 
+void mpi_reduce_scatter__(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype,
+                     int* op, int* comm, int* ierr) {
+  *ierr = MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, get_datatype(*datatype),
+                        get_op(*op), get_comm(*comm));
+}
+
 void mpi_scatter__(void* sendbuf, int* sendcount, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype, 
                    int* root, int* comm, int* ierr) {
@@ -304,6 +399,14 @@ void mpi_scatter__(void* sendbuf, int* sendcount, int* sendtype,
                       recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
 
+
+void mpi_scatterv__(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
+                   void* recvbuf, int* recvcount, int* recvtype,
+                   int* root, int* comm, int* ierr) {
+  *ierr = MPI_Scatterv(sendbuf, sendcounts, displs, get_datatype(*sendtype),
+                      recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
+}
+
 void mpi_gather__(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcount, int* recvtype,
                   int* root, int* comm, int* ierr) {
@@ -311,6 +414,13 @@ void mpi_gather__(void* sendbuf, int* sendcount, int* sendtype,
                      recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
 
+void mpi_gatherv__(void* sendbuf, int* sendcount, int* sendtype,
+                  void* recvbuf, int* recvcounts, int* displs, int* recvtype,
+                  int* root, int* comm, int* ierr) {
+  *ierr = MPI_Gatherv(sendbuf, *sendcount, get_datatype(*sendtype),
+                     recvbuf, recvcounts, displs, get_datatype(*recvtype), *root, get_comm(*comm));
+}
+
 void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr) {
@@ -319,10 +429,10 @@ void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
 }
 
 void mpi_allgatherv__(void* sendbuf, int* sendcount, int* sendtype,
-                     void* recvbuf, int* recvcount,int* displs, int* recvtype,
+                     void* recvbuf, int* recvcounts,int* displs, int* recvtype,
                      int* comm, int* ierr) {
   *ierr = MPI_Allgatherv(sendbuf, *sendcount, get_datatype(*sendtype),
-                        recvbuf, recvcount, displs, get_datatype(*recvtype), get_comm(*comm));
+                        recvbuf, recvcounts, displs, get_datatype(*recvtype), get_comm(*comm));
 }
 
 void mpi_scan__(void* sendbuf, void* recvbuf, int* count, int* datatype,
@@ -337,6 +447,12 @@ void mpi_alltoall__(void* sendbuf, int* sendcount, int* sendtype,
                        recvbuf, *recvcount, get_datatype(*recvtype), get_comm(*comm));
 }
 
+void mpi_alltoallv__(void* sendbuf, int* sendcounts, int* senddisps, int* sendtype,
+                    void* recvbuf, int* recvcounts, int* recvdisps, int* recvtype, int* comm, int* ierr) {
+  *ierr = MPI_Alltoallv(sendbuf, sendcounts, senddisps, get_datatype(*sendtype),
+                       recvbuf, recvcounts, recvdisps, get_datatype(*recvtype), get_comm(*comm));
+}
+
 void mpi_test__ (int * request, int *flag, MPI_Status * status, int* ierr){
   MPI_Request req = find_request(*request);
   *ierr= MPI_Test(&req, flag, status);
@@ -349,6 +465,10 @@ void mpi_get_count__(MPI_Status * status, int* datatype, int *count, int* ierr){
   *ierr = MPI_Get_count(status, get_datatype(*datatype), count);
 }
 
+void mpi_attr_get__(int* comm, int* keyval, void* attr_value, int* flag, int* ierr ){
+  *ierr = MPI_Attr_get(get_comm(*comm), *keyval, attr_value, flag);
+}
+
 void mpi_type_extent__(int* datatype, MPI_Aint * extent, int* ierr){
   *ierr= MPI_Type_extent(get_datatype(*datatype),  extent);
 }
@@ -365,3 +485,7 @@ void mpi_type_size__(int* datatype, int *size, int* ierr)
 {
   *ierr = MPI_Type_size(get_datatype(*datatype), size);
 }
+
+void mpi_error_string__(int* errorcode, char* string, int* resultlen, int* ierr){
+  *ierr = MPI_Error_string(*errorcode, string, resultlen);
+}
index 4ee0b81..acbd4ce 100644 (file)
@@ -13,6 +13,7 @@
 #include "mc/mc.h"
 #include "surf/surf.h"
 #include "simix/smx_private.h"
+#include "simgrid/sg_config.h"
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_kernel, smpi,
@@ -286,21 +287,26 @@ void smpi_global_destroy(void)
 /* Fortran specific stuff */
 /* With smpicc, the following weak symbols are used */
 /* With smpiff, the following weak symbols are replaced by those in libf2c */
-
 int __attribute__((weak)) xargc;
 char** __attribute__((weak)) xargv;
-
-int __attribute__((weak)) smpi_simulated_main(int argc, char** argv) {
+void __attribute__((weak)) user_main__(){
   xbt_die("Should not be in this smpi_simulated_main");
-  return 1;
+  return;
+}
+
+int __attribute__((weak)) smpi_simulated_main__(int argc, char** argv) {
+  smpi_process_init(&argc, &argv);
+  user_main__();
+  //xbt_die("Should not be in this smpi_simulated_main");
+  return 0;
 }
 
 int __attribute__((weak)) main(int argc, char** argv) {
-   return smpi_main(smpi_simulated_main,argc,argv);
+   return smpi_main(smpi_simulated_main__,argc,argv);
 }
 
 int __attribute__((weak)) MAIN__(){
-  return smpi_main(smpi_simulated_main,xargc, xargv);
+  return smpi_main(smpi_simulated_main__,xargc, xargv);
 };
 
 int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[])
@@ -313,8 +319,13 @@ int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[])
   }
 
   /* Connect log categories.  See xbt/log.c */
-  XBT_LOG_CONNECT(smpi);  /* Keep this line as soon as possible in this function: xbt_log_appender_file.c depends on it
-                             DO NOT connect this in XBT or so, or it will be useless to xbt_log_appender_file.c */
+  XBT_LOG_CONNECT(smpi);  /* Keep this line as soon as possible in this
+                             function: xbt_log_appender_file.c depends on it
+                             DO NOT connect this in XBT or so, or it will be
+                             useless to xbt_log_appender_file.c */
+#ifdef HAVE_TRACING
+  XBT_LOG_CONNECT(instr_smpi);
+#endif
   XBT_LOG_CONNECT(smpi_base);
   XBT_LOG_CONNECT(smpi_bench);
   XBT_LOG_CONNECT(smpi_coll);
@@ -328,6 +339,9 @@ int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[])
 
 #ifdef HAVE_TRACING
   TRACE_global_init(&argc, argv);
+
+  TRACE_add_start_function(TRACE_smpi_alloc);
+  TRACE_add_end_function(TRACE_smpi_release);
 #endif
 
   SIMIX_global_init(&argc, argv);
@@ -353,7 +367,7 @@ int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[])
   else
     SIMIX_run();
 
-  if (surf_cfg_get_int("smpi/display_timing"))
+  if (sg_cfg_get_int("smpi/display_timing"))
     XBT_INFO("Simulation time: %g seconds.", SIMIX_get_clock());
 
   smpi_global_destroy();
index 17e7614..19f0228 100644 (file)
@@ -181,7 +181,7 @@ int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
       s_smpi_mpi_vector_t* type_c = (s_smpi_mpi_vector_t*)sendtype;
 
-      void * buf_tmp = malloc(count * type_c->size_oldtype);
+      void * buf_tmp = xbt_malloc(count * type_c->size_oldtype);
 
       subtype->serialize( sendbuf, buf_tmp,1, subtype);
       subtype =  recvtype->substruct;
@@ -295,14 +295,35 @@ void smpi_datatype_create(MPI_Datatype* new_type, int size,int lb, int ub, int h
   new_t->ub = ub;
   new_t->flags = flags;
   new_t->substruct = struct_type;
+  new_t->in_use=0;
   *new_type = new_t;
 }
 
 void smpi_datatype_free(MPI_Datatype* type){
+
+  if((*type)->flags & DT_FLAG_PREDEFINED)return;
+
+  //if still used, mark for deletion
+  if((*type)->in_use!=0){
+      (*type)->flags |=DT_FLAG_DESTROYED;
+      return;
+  }
+
   if ((*type)->has_subtype == 1){
     ((s_smpi_subtype_t *)(*type)->substruct)->subtype_free(type);  
   }
   xbt_free(*type);
+
+}
+
+void smpi_datatype_use(MPI_Datatype type){
+  if(type)type->in_use++;
+}
+
+
+void smpi_datatype_unuse(MPI_Datatype type){
+  if(type && type->in_use-- == 0 && (type->flags & DT_FLAG_DESTROYED))
+    smpi_datatype_free(&type);
 }
 
 int smpi_datatype_contiguous(int count, MPI_Datatype old_type, MPI_Datatype* new_type)
index 5d85a89..1e4dc07 100644 (file)
@@ -897,9 +897,10 @@ int PMPI_Request_free(MPI_Request * request)
   int retval;
 
   smpi_bench_end();
-  if (request == MPI_REQUEST_NULL) {
+  if (*request == MPI_REQUEST_NULL) {
     retval = MPI_ERR_ARG;
   } else {
+    if((*request)->flags & PERSISTENT)(*request)->refcount--;
     smpi_mpi_request_free(request);
     retval = MPI_SUCCESS;
   }
@@ -1008,7 +1009,6 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
   int retval;
 
   smpi_bench_end();
-
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   } else if (src == MPI_PROC_NULL) {
@@ -1373,8 +1373,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
     xbt_dynar_free(&recvs);
   }
   TRACE_smpi_computing_in(rank_traced);
-
-
 #endif
   smpi_bench_begin();
   return retval;
@@ -2073,6 +2071,12 @@ int PMPI_Error_class(int errorcode, int* errorclass) {
   return MPI_SUCCESS;
 }
 
+
+int PMPI_Initialized(int* flag) {
+   *flag=(smpi_process_data()!=NULL);
+   return MPI_SUCCESS;
+}
+
 /* The following calls are not yet implemented and will fail at runtime. */
 /* Once implemented, please move them above this notice. */
 
@@ -2285,6 +2289,4 @@ int PMPI_Dims_create(int nnodes, int ndims, int* dims) {
    return not_yet_implemented();
 }
 
-int PMPI_Initialized(int* flag) {
-   return not_yet_implemented();
-}
+
index 7214b99..8431291 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay,smpi,"Trace Replay with SMPI");
 
 int communicator_size = 0;
+static int active_processes = 0;
+
+static void log_timed_action (const char *const *action, double clock){
+  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
+    char *name = xbt_str_join_array(action, " ");
+    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
+    free(name);
+  }
+}
 
 typedef struct {
   xbt_dynar_t isends; /* of MPI_Request */
@@ -41,11 +50,12 @@ static void action_init(const char *const *action)
 
   /* start a simulated timer */
   smpi_process_simulated_start();
+  /*initialize the number of active processes */
+  active_processes = smpi_process_count();
 }
 
 static void action_finalize(const char *const *action)
 {
-  double sim_time= 1.;
   smpi_replay_globals_t globals =
       (smpi_replay_globals_t) smpi_process_get_user_data();
 
@@ -56,12 +66,6 @@ static void action_finalize(const char *const *action)
     xbt_dynar_free_container(&(globals->irecvs));
   }
   free(globals);
-  /* end the simulated timer */
-  sim_time = smpi_process_simulated_elapsed();
-  if (!smpi_process_index())
-    XBT_INFO("Simulation time %g", sim_time);
-  smpi_process_finalize();
-  smpi_process_destroy();
 }
 
 static void action_comm_size(const char *const *action)
@@ -69,25 +73,29 @@ static void action_comm_size(const char *const *action)
   double clock = smpi_process_simulated_elapsed();
 
   communicator_size = parse_double(action[2]);
+  log_timed_action (action, clock);
+}
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+static void action_comm_split(const char *const *action)
+{
+  double clock = smpi_process_simulated_elapsed();
+
+  log_timed_action (action, clock);
 }
 
+static void action_comm_dup(const char *const *action)
+{
+  double clock = smpi_process_simulated_elapsed();
+
+  log_timed_action (action, clock);
+}
 
 static void action_compute(const char *const *action)
 {
   double clock = smpi_process_simulated_elapsed();
   smpi_execute_flops(parse_double(action[2]));
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_send(const char *const *action)
@@ -105,11 +113,7 @@ static void action_send(const char *const *action)
 
   smpi_mpi_send(NULL, size, MPI_BYTE, to , 0, MPI_COMM_WORLD);
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 
   #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
@@ -143,12 +147,7 @@ static void action_Isend(const char *const *action)
 
   xbt_dynar_push(globals->isends,&request);
 
-  //TODO do the asynchronous cleanup
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_recv(const char *const *action) {
@@ -172,11 +171,7 @@ static void action_recv(const char *const *action) {
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_Irecv(const char *const *action)
@@ -201,12 +196,7 @@ static void action_Irecv(const char *const *action)
 #endif
   xbt_dynar_push(globals->irecvs,&request);
 
-  //TODO do the asynchronous cleanup
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_wait(const char *const *action){
@@ -241,11 +231,13 @@ static void action_wait(const char *const *action){
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
+}
+
+static void action_waitall(const char *const *action){
+  double clock = smpi_process_simulated_elapsed();
+//  smpi_mpi_waitall(count, requests, status);
+  log_timed_action (action, clock);
 }
 
 static void action_barrier(const char *const *action){
@@ -261,11 +253,7 @@ static void action_barrier(const char *const *action){
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_bcast(const char *const *action)
@@ -285,11 +273,7 @@ static void action_bcast(const char *const *action)
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_reduce(const char *const *action)
@@ -308,11 +292,7 @@ static void action_reduce(const char *const *action)
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
-  }
+  log_timed_action (action, clock);
 }
 
 static void action_allReduce(const char *const *action) {
@@ -332,37 +312,87 @@ static void action_allReduce(const char *const *action) {
   TRACE_smpi_computing_in(rank);
 #endif
 
-  if (XBT_LOG_ISENABLED(smpi_replay, xbt_log_priority_verbose)){
-    char *name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, smpi_process_simulated_elapsed()-clock);
-    free(name);
+  log_timed_action (action, clock);
+}
+
+static void action_allToAll(const char *const *action) {
+  double clock = smpi_process_simulated_elapsed();
+  double comm_size = smpi_comm_size(MPI_COMM_WORLD);
+  double send_size = parse_double(action[2]);
+  double recv_size = parse_double(action[3]);
+
+#ifdef HAVE_TRACING
+  int rank = smpi_process_index();
+  TRACE_smpi_computing_out(rank);
+  TRACE_smpi_collective_in(rank, -1, __FUNCTION__);
+#endif
+
+  if (send_size < 200 && comm_size > 12) {
+    smpi_coll_tuned_alltoall_bruck(NULL, send_size, MPI_BYTE,
+                                   NULL, recv_size, MPI_BYTE,
+                                   MPI_COMM_WORLD);
+  } else if (send_size < 3000) {
+    smpi_coll_tuned_alltoall_basic_linear(NULL, send_size, MPI_BYTE,
+                                          NULL, recv_size, MPI_BYTE,
+                                          MPI_COMM_WORLD);
+  } else {
+    smpi_coll_tuned_alltoall_pairwise(NULL, send_size, MPI_BYTE,
+                                      NULL, recv_size, MPI_BYTE,
+                                      MPI_COMM_WORLD);
   }
+
+#ifdef HAVE_TRACING
+  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+  TRACE_smpi_computing_in(rank);
+#endif
+
+  log_timed_action (action, clock);
+}
+
+static void action_allToAllv(const char *const *action) {
+  double clock = smpi_process_simulated_elapsed();
+
+  log_timed_action (action, clock);
 }
 
 void smpi_replay_init(int *argc, char***argv){
   PMPI_Init(argc, argv);
   if (!smpi_process_index()){
     _xbt_replay_action_init();
-    xbt_replay_action_register("init",     action_init);
-    xbt_replay_action_register("finalize", action_finalize);
-    xbt_replay_action_register("comm_size",action_comm_size);
-    xbt_replay_action_register("send",     action_send);
-    xbt_replay_action_register("Isend",    action_Isend);
-    xbt_replay_action_register("recv",     action_recv);
-    xbt_replay_action_register("Irecv",    action_Irecv);
-    xbt_replay_action_register("wait",     action_wait);
-    xbt_replay_action_register("barrier",  action_barrier);
-    xbt_replay_action_register("bcast",    action_bcast);
-    xbt_replay_action_register("reduce",   action_reduce);
-    xbt_replay_action_register("allReduce",action_allReduce);
-    xbt_replay_action_register("compute",  action_compute);
+    xbt_replay_action_register("init",       action_init);
+    xbt_replay_action_register("finalize",   action_finalize);
+    xbt_replay_action_register("comm_size",  action_comm_size);
+    xbt_replay_action_register("comm_split", action_comm_split);
+    xbt_replay_action_register("comm_dup",   action_comm_dup);
+    xbt_replay_action_register("send",       action_send);
+    xbt_replay_action_register("Isend",      action_Isend);
+    xbt_replay_action_register("recv",       action_recv);
+    xbt_replay_action_register("Irecv",      action_Irecv);
+    xbt_replay_action_register("wait",       action_wait);
+    xbt_replay_action_register("waitAll",    action_waitall);
+    xbt_replay_action_register("barrier",    action_barrier);
+    xbt_replay_action_register("bcast",      action_bcast);
+    xbt_replay_action_register("reduce",     action_reduce);
+    xbt_replay_action_register("allReduce",  action_allReduce);
+    xbt_replay_action_register("allToAll",   action_allToAll);
+    xbt_replay_action_register("allToAllV",  action_allToAllv);
+    xbt_replay_action_register("compute",    action_compute);
   }
 
   xbt_replay_action_runner(*argc, *argv);
 }
 
 int smpi_replay_finalize(){
-  if(!smpi_process_index())
-     _xbt_replay_action_exit();
+  double sim_time= 1.;
+  /* One active process will stop. Decrease the counter*/
+  active_processes--;
+
+  if(!active_processes){
+    /* Last process alive speaking */
+    /* end the simulated timer */
+    sim_time = smpi_process_simulated_elapsed();
+    XBT_INFO("Simulation time %g", sim_time);
+    _xbt_replay_action_exit();
+  }
   return PMPI_Finalize();
 }
index 29fa702..1d1d843 100755 (executable)
@@ -6,7 +6,7 @@ INCLUDEARGS="@includeflag@"
 CMAKE_LINKARGS="-L@libdir@"
 
 if [ "@WIN32@" != "1" ]; then
-  CFLAGS="-O2 -Dmain=smpi_simulated_main"
+  CFLAGS="-O2 -Dmain=smpi_simulated_main__"
   LINKARGS="-lsimgrid -lsmpi -lm"
 else
   CFLAGS="-O2 -include @includedir@/smpi/smpi_main.h"
index c620b38..2b77445 100755 (executable)
@@ -62,7 +62,7 @@ foreach my $fortran (@ARGV) {
          next;
       }
       if(/\/* Main program alias \*\/\s*int\s+.*\s*\(\s*\)\s*{(.*)}/) {
-         $_ = "int smpi_simulated_main(int argc, char** argv) { smpi_process_init(&argc, &argv); $1 }\n";
+         $_ = "int smpi_simulated_main__(int argc, char** argv) { smpi_process_init(&argc, &argv); $1 }\n";
       }
       print $tmp "$_\n";
    }
diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in
new file mode 100644 (file)
index 0000000..5487477
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/bash
+
+CC=@CMAKE_Fortran_Compiler@
+
+INCLUDEARGS="@includeflag@"
+CMAKE_LINKARGS="-L@libdir@"
+
+FFLAGS="-O2 -ff2c "
+LINKARGS="-lsimgrid -lsmpi -lm -lgfortran"
+main_name=main
+TMPFILE=$(mktemp).f90
+CMDLINE=""
+while [ -n "$1" ]; do
+  ARG="$1"
+  shift
+  case "${ARG}" in
+   -c)
+      CMAKE_LINKARGS=""
+      LINKARGS=""
+      CMDLINE="${CMDLINE} -c "
+      ;;
+   *.f90|*.F90)
+      SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
+      if [ -z $SRCFILE ] ; then
+         SRCFILE="$ARG"
+      fi
+      #replace "program main_name by subroutine user\_main (and the end clause as well)"
+      sed 's/[[:space:]]*program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/subroutine user\_main /g'  ${ARG} > ${TMPFILE}
+      SRCFILE="${TMPFILE}"
+      CMDLINE="${CMDLINE} ${SRCFILE} "
+      ;;
+   *)
+      CMDLINE="${CMDLINE} ${ARG} "
+      ;;
+  esac
+done
+
+CMDLINE="${CC} ${FFLAGS} ${CMDLINE} ${INCLUDEARGS} ${CMAKE_LINKARGS} ${LINKARGS}"
+
+echo "${CMDLINE}"
+${CMDLINE}
+
+if [ -f ${TMPFILE} ];then
+  rm ${TMPFILE}
+fi
index 800415c..b86184b 100644 (file)
@@ -1,7 +1,8 @@
 #! /bin/bash
 prefix="@exec_prefix@"
 
-ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg -lf2c"
+ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg"
+LINKARGS="-lf2c"
 SRCFILES=""
 
 while [ -n "$1" ]; do
@@ -16,10 +17,14 @@ while [ -n "$1" ]; do
        SRCFILES="${SRCFILES} ${SRCFILE}"
        ;;
     *)
+      if [ "${ARG}" = "-c" ]; then
+          LINKARGS=""
+      fi
       ARGS="${ARGS} ${ARG}"
       ;;
   esac
 done
+ARGS="${ARGS} ${LINKARGS}"
 
 if [ -n "${SRCFILES}" ]
 then
index cb94bd6..bdede7a 100755 (executable)
@@ -236,9 +236,12 @@ fi
 
 if [ "${EXTOPT}" = "smpi_replay" ]; then
   APP_TRACES=$1;
-  if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then
+  if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then
      hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`)
      NUMTRACES=`cat ${APP_TRACES} | wc -l`
+  else
+     printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES}}" >&2
+     exit 1
   fi
 fi
 
index b427a5c..79bbc86 100644 (file)
@@ -7,6 +7,7 @@
 #include "surf_private.h"
 #include "surf/surf_resource.h"
 #include "maxmin_private.h"
+#include "simgrid/sg_config.h"
 
 surf_model_t surf_cpu_model = NULL;
 
@@ -42,6 +43,7 @@ static xbt_swag_t
     cpu_running_action_set_that_does_not_need_being_checked = NULL;
 
 
+/* This function is registered as a callback to sg_platf_new_host() and never called directly */
 static void *cpu_create_resource(const char *name, double power_peak,
                                  double power_scale,
                                  tmgr_trace_t power_trace,
@@ -325,9 +327,9 @@ static void surf_cpu_model_init_internal()
   s_surf_action_t action;
   s_surf_action_cpu_Cas01_t comp;
 
-  char *optim = xbt_cfg_get_string(_surf_cfg_set, "cpu/optim");
+  char *optim = xbt_cfg_get_string(_sg_cfg_set, "cpu/optim");
   int select =
-      xbt_cfg_get_int(_surf_cfg_set, "cpu/maxmin_selective_update");
+      xbt_cfg_get_int(_sg_cfg_set, "cpu/maxmin_selective_update");
 
   surf_cpu_model = surf_model_init();
 
@@ -340,7 +342,7 @@ static void surf_cpu_model_init_internal()
     xbt_assert((select == 1)
                ||
                (xbt_cfg_is_default_value
-                (_surf_cfg_set, "cpu/maxmin_selective_update")),
+                (_sg_cfg_set, "cpu/maxmin_selective_update")),
                "Disabling selective update while using the lazy update mechanism is dumb!");
   } else {
     xbt_die("Unsupported optimization (%s) for this model", optim);
@@ -391,7 +393,6 @@ static void surf_cpu_model_init_internal()
   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 = cpu_add_traces_cpu;
 
   if (!surf_cpu_model->model_private->maxmin_system) {
@@ -425,7 +426,7 @@ static void surf_cpu_model_init_internal()
 
 void surf_cpu_model_init_Cas01()
 {
-  char *optim = xbt_cfg_get_string(_surf_cfg_set, "cpu/optim");
+  char *optim = xbt_cfg_get_string(_sg_cfg_set, "cpu/optim");
 
   if (surf_cpu_model)
     return;
index a4e40b9..30d23f8 100644 (file)
@@ -795,7 +795,6 @@ static void surf_cpu_ti_model_init_internal(void)
   surf_cpu_model->extension.cpu.get_speed = cpu_ti_get_speed;
   surf_cpu_model->extension.cpu.get_available_speed =
       cpu_ti_get_available_speed;
-  surf_cpu_model->extension.cpu.create_resource = cpu_ti_create_resource;
   surf_cpu_model->extension.cpu.add_traces = add_traces_cpu_ti;
 
   cpu_ti_action_heap = xbt_heap_new(8, NULL);
similarity index 99%
rename from src/instr/instr_routing.c
rename to src/surf/instr_routing.c
index 36ef196..c5fc212 100644 (file)
@@ -515,7 +515,7 @@ static xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_
   const char *sn = instr_node_name (s);
   const char *dn = instr_node_name (d);
   int len = strlen(sn)+strlen(dn)+1;
-  char *name = (char*)malloc(len * sizeof(char));
+  char *name = (char*)xbt_malloc(len * sizeof(char));
 
 
   snprintf (name, len, "%s%s", sn, dn);
similarity index 100%
rename from src/instr/instr_surf.c
rename to src/surf/instr_surf.c
index ea964d5..3d49f84 100644 (file)
@@ -389,7 +389,7 @@ static XBT_INLINE void saturated_constraint_set_update(double usage,
   } else if (*min_usage == usage) {
     if(saturated_constraint_set->pos == saturated_constraint_set->size) { // realloc the size
       saturated_constraint_set->size *= 2;
-      saturated_constraint_set->data = realloc(saturated_constraint_set->data, (saturated_constraint_set->size) * sizeof(int));
+      saturated_constraint_set->data = xbt_realloc(saturated_constraint_set->data, (saturated_constraint_set->size) * sizeof(int));
     }
     saturated_constraint_set->data[saturated_constraint_set->pos] = cnst_light_num;
     saturated_constraint_set->pos++;
index b6f836b..b83aeee 100644 (file)
@@ -22,6 +22,7 @@
 #include "surf/surfxml_parse_values.h"
 #include "surf/surf_resource.h"
 #include "surf/surf_resource_lmm.h"
+#include "simgrid/sg_config.h"
 
 #undef GENERIC_LMM_ACTION
 #undef GENERIC_ACTION
@@ -118,7 +119,7 @@ static double smpi_bandwidth_factor(double size)
 {
   if (!smpi_bw_factor)
     smpi_bw_factor =
-        parse_factor(surf_cfg_get_string("smpi/bw_factor"));
+        parse_factor(sg_cfg_get_string("smpi/bw_factor"));
 
   unsigned int iter = 0;
   s_smpi_factor_t fact;
@@ -139,7 +140,7 @@ static double smpi_latency_factor(double size)
 {
   if (!smpi_lat_factor)
     smpi_lat_factor =
-        parse_factor(surf_cfg_get_string("smpi/lat_factor"));
+        parse_factor(sg_cfg_get_string("smpi/lat_factor"));
 
   unsigned int iter = 0;
   s_smpi_factor_t fact;
@@ -675,8 +676,8 @@ static void smpi_gap_append(double size, const link_CM02_t link,
 {
   const char *src = link->lmm_resource.generic_resource.name;
   xbt_fifo_t fifo;
-  surf_action_network_CM02_t last_action;
-  double bw;
+  //surf_action_network_CM02_t last_action;
+  //double bw;
 
   if (sg_sender_gap > 0.0) {
     if (!gap_lookup) {
@@ -686,16 +687,16 @@ static void smpi_gap_append(double size, const link_CM02_t link,
     action->sender.gap = 0.0;
     if (fifo && xbt_fifo_size(fifo) > 0) {
       /* Compute gap from last send */
-      last_action =
+      /*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 =
-          max(sg_sender_gap,last_action->sender.size / bw);
+          xbt_fifo_get_item_content(xbt_fifo_get_last_item(fifo));*/
+     // bw = net_get_link_bandwidth(link);
+      action->sender.gap = sg_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;
+    /*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);
@@ -703,7 +704,7 @@ static void smpi_gap_append(double size, const link_CM02_t link,
       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.fifo_item = xbt_fifo_push(fifo, action);*/
     action->sender.size = size;
   }
 }
@@ -734,9 +735,9 @@ static void smpi_gap_remove(surf_action_lmm_t lmm_action)
 
 static void set_update_mechanism(void)
 {
-  char *optim = xbt_cfg_get_string(_surf_cfg_set, "network/optim");
+  char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim");
   int select =
-      xbt_cfg_get_int(_surf_cfg_set, "network/maxmin_selective_update");
+      xbt_cfg_get_int(_sg_cfg_set, "network/maxmin_selective_update");
 
   if (!strcmp(optim, "Full")) {
     surf_network_model->model_private->update_mechanism = UM_FULL;
@@ -747,7 +748,7 @@ static void set_update_mechanism(void)
     xbt_assert((select == 1)
                ||
                (xbt_cfg_is_default_value
-                (_surf_cfg_set, "network/maxmin_selective_update")),
+                (_sg_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);
@@ -805,8 +806,6 @@ static void surf_network_model_init_internal(void)
       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 (!surf_network_model->model_private->maxmin_system)
     surf_network_model->model_private->maxmin_system = lmm_system_new(surf_network_model->model_private->selective_update);
@@ -855,8 +854,8 @@ void surf_network_model_init_SMPI(void)
   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);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/sender_gap", 10e-6);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
 }
 
 /************************************************************************/
@@ -883,11 +882,11 @@ void surf_network_model_init_LegrandVelho(void)
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor",
                             13.01);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/bandwidth_factor",
                             0.97);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 20537);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 20537);
 }
 
 /***************************************************************************/
@@ -912,10 +911,10 @@ void surf_network_model_init_CM02(void)
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 1.0);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor", 1.0);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/bandwidth_factor",
                             1.0);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 0.0);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 0.0);
 }
 
 /***************************************************************************/
@@ -941,10 +940,10 @@ void surf_network_model_init_Reno(void)
                                     func_reno_fpi);
   network_solve = lagrange_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor", 10.4);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/bandwidth_factor",
                             0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
 }
 
 
@@ -961,10 +960,10 @@ void surf_network_model_init_Reno2(void)
                                     func_reno2_fpi);
   network_solve = lagrange_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor", 10.4);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/bandwidth_factor",
                             0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S_parameter",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S_parameter",
                             8775);
 }
 
@@ -981,8 +980,8 @@ void surf_network_model_init_Vegas(void)
                                     func_vegas_fpi);
   network_solve = lagrange_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor", 10.4);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/bandwidth_factor",
                             0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
 }
index b959f55..8207982 100644 (file)
@@ -62,7 +62,7 @@ static void route_new(int src_id, int dst_id, xbt_dynar_t links,
           src_id, dst_id, links, nb_link);
 
   /* Build the list of gtnets link IDs */
-  gtnets_links = (int *) calloc(nb_link, sizeof(int));
+  gtnets_links = xbt_new0(int, nb_link);
   i = 0;
   xbt_dynar_foreach(links, cursor, link) {
     gtnets_links[i++] = link->id;
index 0af5c72..3558089 100644 (file)
@@ -249,7 +249,7 @@ void sg_platf_new_trace(sg_platf_trace_cbarg_t trace) {
     fun(trace);
   }
 }
-void sg_platf_new_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect) {
+void sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect) {
   unsigned int iterator;
   sg_platf_trace_connect_cb_t fun;
   xbt_dynar_foreach(sg_platf_trace_connect_cb_list, iterator, fun) {
index 606179d..931756b 100644 (file)
@@ -4356,8 +4356,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.69 2012/12/20 00:13:40 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -4366,7 +4366,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:
@@ -4402,7 +4402,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.69 2012/12/20 00:13:40 mquinson Exp $";
 
 /* ANSI headers. */
 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
@@ -4439,222 +4439,331 @@ extern char *surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
 AT_surfxml_mount_name AX_surfxml_mount_name;
 #define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name)
+short int surfxml_mount_name_isset;
 AT_surfxml_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)
+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)
-AT_surfxml_host_link_up AX_surfxml_host_link_up;
-#define A_surfxml_host_link_up (surfxml_bufferstack + AX_surfxml_host_link_up)
+short int surfxml_prop_id_isset;
+AT_surfxml_host___link_up AX_surfxml_host___link_up;
+#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
+short int surfxml_host___link_up_isset;
 AT_surfxml_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)
-AT_surfxml_process_on_failure AX_surfxml_process_on_failure;
-#define A_surfxml_process_on_failure AX_surfxml_process_on_failure
-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
+short int surfxml_peer_lat_isset;
+AT_surfxml_process_on___failure AX_surfxml_process_on___failure;
+#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
+short int surfxml_process_on___failure_isset;
+AT_surfxml_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_cabinet_suffix AX_surfxml_cabinet_suffix;
 #define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
+short int surfxml_cabinet_suffix_isset;
 AT_surfxml_gpu_name AX_surfxml_gpu_name;
 #define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
+short int surfxml_gpu_name_isset;
 AT_surfxml_router_id AX_surfxml_router_id;
 #define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
-AT_surfxml_storage_type_id AX_surfxml_storage_type_id;
-#define A_surfxml_storage_type_id (surfxml_bufferstack + AX_surfxml_storage_type_id)
-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_router_id_isset;
+AT_surfxml_storage___type_id AX_surfxml_storage___type_id;
+#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
+short int surfxml_storage___type_id_isset;
+AT_surfxml_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_cabinet_bw AX_surfxml_cabinet_bw;
 #define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
+short int surfxml_cabinet_bw_isset;
 AT_surfxml_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_bypassASroute_dst AX_surfxml_bypassASroute_dst;
 #define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
-AT_surfxml_host_link_id AX_surfxml_host_link_id;
-#define A_surfxml_host_link_id (surfxml_bufferstack + AX_surfxml_host_link_id)
+short int surfxml_bypassASroute_dst_isset;
+AT_surfxml_host___link_id AX_surfxml_host___link_id;
+#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
+short int surfxml_host___link_id_isset;
 AT_surfxml_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_cabinet_prefix AX_surfxml_cabinet_prefix;
 #define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
+short int surfxml_cabinet_prefix_isset;
 AT_surfxml_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
+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_storage_typeId AX_surfxml_storage_typeId;
 #define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
+short int surfxml_storage_typeId_isset;
 AT_surfxml_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)
+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_storage_content AX_surfxml_storage_content;
 #define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
-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)
+short int surfxml_storage_content_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
-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_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 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)
-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_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)
-AT_surfxml_storage_type_size AX_surfxml_storage_type_size;
-#define A_surfxml_storage_type_size (surfxml_bufferstack + AX_surfxml_storage_type_size)
-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_random_mean_isset;
+AT_surfxml_storage___type_size AX_surfxml_storage___type_size;
+#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
+short int surfxml_storage___type_size_isset;
+AT_surfxml_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_backbone_bandwidth AX_surfxml_backbone_bandwidth;
 #define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
+short int surfxml_backbone_bandwidth_isset;
 AT_surfxml_backbone_id AX_surfxml_backbone_id;
 #define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
-AT_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind;
-#define A_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind
+short int surfxml_backbone_id_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_cabinet_lat AX_surfxml_cabinet_lat;
 #define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
+short int surfxml_cabinet_lat_isset;
 AT_surfxml_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_storage_type_content AX_surfxml_storage_type_content;
-#define A_surfxml_storage_type_content (surfxml_bufferstack + AX_surfxml_storage_type_content)
+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_storage___type_content AX_surfxml_storage___type_content;
+#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
+short int surfxml_storage___type_content_isset;
 AT_surfxml_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_mstorage_name AX_surfxml_mstorage_name;
 #define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
+short int surfxml_mstorage_name_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_cabinet_id AX_surfxml_cabinet_id;
 #define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
-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_cabinet_id_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_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_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_peer_state_file AX_surfxml_peer_state_file;
-#define A_surfxml_peer_state_file (surfxml_bufferstack + AX_surfxml_peer_state_file)
+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_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_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_bypassASroute_src AX_surfxml_bypassASroute_src;
 #define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
+short int surfxml_bypassASroute_src_isset;
 AT_surfxml_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_mstorage_typeId AX_surfxml_mstorage_typeId;
 #define A_surfxml_mstorage_typeId (surfxml_bufferstack + AX_surfxml_mstorage_typeId)
+short int surfxml_mstorage_typeId_isset;
 AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
 #define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
-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_ASroute_dst_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_random_radical AX_surfxml_random_radical;
 #define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-AT_surfxml_bypassASroute_gw_src AX_surfxml_bypassASroute_gw_src;
-#define A_surfxml_bypassASroute_gw_src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw_src)
-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_random_radical_isset;
+AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src;
+#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
+short int surfxml_bypassASroute_gw___src_isset;
+AT_surfxml_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_mount_id AX_surfxml_mount_id;
 #define A_surfxml_mount_id (surfxml_bufferstack + AX_surfxml_mount_id)
+short int surfxml_mount_id_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)
-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_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_cabinet_radical AX_surfxml_cabinet_radical;
 #define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
-AT_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy;
-#define A_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy
+short int surfxml_cabinet_radical_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_cabinet_power AX_surfxml_cabinet_power;
 #define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
+short int surfxml_cabinet_power_isset;
 AT_surfxml_host_core AX_surfxml_host_core;
 #define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
-AT_surfxml_storage_type_model AX_surfxml_storage_type_model;
-#define A_surfxml_storage_type_model (surfxml_bufferstack + AX_surfxml_storage_type_model)
+short int surfxml_host_core_isset;
+AT_surfxml_storage___type_model AX_surfxml_storage___type_model;
+#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
+short int surfxml_storage___type_model_isset;
 AT_surfxml_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_backbone_latency AX_surfxml_backbone_latency;
 #define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
+short int surfxml_backbone_latency_isset;
 AT_surfxml_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_storage_id AX_surfxml_storage_id;
 #define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
+short int surfxml_storage_id_isset;
 AT_surfxml_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)
-AT_surfxml_bypassASroute_gw_dst AX_surfxml_bypassASroute_gw_dst;
-#define A_surfxml_bypassASroute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw_dst)
-AT_surfxml_host_link_down AX_surfxml_host_link_down;
-#define A_surfxml_host_link_down (surfxml_bufferstack + AX_surfxml_host_link_down)
+short int surfxml_config_id_isset;
+AT_surfxml_bypassASroute_gw___dst AX_surfxml_bypassASroute_gw___dst;
+#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
+short int surfxml_bypassASroute_gw___dst_isset;
+AT_surfxml_host___link_down AX_surfxml_host___link_down;
+#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
+short int surfxml_host___link_down_isset;
 AT_surfxml_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)
+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_cluster_core AX_surfxml_cluster_core;
 #define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-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_cluster_core_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
@@ -4738,13 +4847,24 @@ static int ck_ilimit()
 #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;
+   BUFFERSET(*pp);
+   if (c) {
+      const char *s = strchr(text, c), *e = strrchr(text, c);
+      assert(s && e && s <= e);
+      ++s;
+      while (s < e) {
+        if (isspace(*s)) {
+           BUFFERPUTC(' ');
+           do ++s; while (s < e && isspace(*s));
+        } else
+          BUFFERPUTC(*s++);
+      }
+   } else {
+      const char *s = text;
+      while (*s)
+       BUFFERPUTC(*s++);
+   }
+   BUFFERDONE;
 }
 #endif
 
@@ -4823,8 +4943,8 @@ const char* *surfxml_statenames=NULL;
 #define IN_trace 27
 #define AL_surfxml_random 28
 #define E_surfxml_random 29
-#define AL_surfxml_trace_connect 30
-#define E_surfxml_trace_connect 31
+#define AL_surfxml_trace___connect 30
+#define E_surfxml_trace___connect 31
 #define AL_surfxml_AS 32
 #define S_surfxml_AS 33
 #define S_surfxml_AS_1 34
@@ -4844,11 +4964,11 @@ const char* *surfxml_statenames=NULL;
 #define S_surfxml_AS_15 48
 #define S_surfxml_AS_16 49
 #define E_surfxml_AS 50
-#define AL_surfxml_storage_type 51
-#define S_surfxml_storage_type 52
-#define S_surfxml_storage_type_1 53
-#define S_surfxml_storage_type_2 54
-#define E_surfxml_storage_type 55
+#define AL_surfxml_storage___type 51
+#define S_surfxml_storage___type 52
+#define S_surfxml_storage___type_1 53
+#define S_surfxml_storage___type_2 54
+#define E_surfxml_storage___type 55
 #define AL_surfxml_storage 56
 #define S_surfxml_storage 57
 #define S_surfxml_storage_1 58
@@ -4865,8 +4985,8 @@ const char* *surfxml_statenames=NULL;
 #define E_surfxml_host 69
 #define AL_surfxml_gpu 70
 #define E_surfxml_gpu 71
-#define AL_surfxml_host_link 72
-#define E_surfxml_host_link 73
+#define AL_surfxml_host___link 72
+#define E_surfxml_host___link 73
 #define AL_surfxml_cluster 74
 #define E_surfxml_cluster 75
 #define AL_surfxml_cabinet 76
@@ -4892,8 +5012,8 @@ const char* *surfxml_statenames=NULL;
 #define S_surfxml_ASroute_1 96
 #define S_surfxml_ASroute_2 97
 #define E_surfxml_ASroute 98
-#define AL_surfxml_link_ctn 99
-#define E_surfxml_link_ctn 100
+#define AL_surfxml_link___ctn 99
+#define E_surfxml_link___ctn 100
 #define AL_surfxml_bypassRoute 101
 #define S_surfxml_bypassRoute 102
 #define S_surfxml_bypassRoute_1 103
@@ -5174,8 +5294,8 @@ YY_DECL
   surfxml_statenames[IN_trace] = "trace";
   surfxml_statenames[AL_surfxml_random] = NULL;
   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_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";
@@ -5195,11 +5315,11 @@ YY_DECL
   surfxml_statenames[S_surfxml_AS_15] = "AS";
   surfxml_statenames[S_surfxml_AS_16] = "AS";
   surfxml_statenames[E_surfxml_AS] = "AS";
-  surfxml_statenames[AL_surfxml_storage_type] = NULL;
-  surfxml_statenames[S_surfxml_storage_type] = "storage_type";
-  surfxml_statenames[S_surfxml_storage_type_1] = "storage_type";
-  surfxml_statenames[S_surfxml_storage_type_2] = "storage_type";
-  surfxml_statenames[E_surfxml_storage_type] = "storage_type";
+  surfxml_statenames[AL_surfxml_storage___type] = NULL;
+  surfxml_statenames[S_surfxml_storage___type] = "storage_type";
+  surfxml_statenames[S_surfxml_storage___type_1] = "storage_type";
+  surfxml_statenames[S_surfxml_storage___type_2] = "storage_type";
+  surfxml_statenames[E_surfxml_storage___type] = "storage_type";
   surfxml_statenames[AL_surfxml_storage] = NULL;
   surfxml_statenames[S_surfxml_storage] = "storage";
   surfxml_statenames[S_surfxml_storage_1] = "storage";
@@ -5216,8 +5336,8 @@ YY_DECL
   surfxml_statenames[E_surfxml_host] = "host";
   surfxml_statenames[AL_surfxml_gpu] = NULL;
   surfxml_statenames[E_surfxml_gpu] = "gpu";
-  surfxml_statenames[AL_surfxml_host_link] = NULL;
-  surfxml_statenames[E_surfxml_host_link] = "host_link";
+  surfxml_statenames[AL_surfxml_host___link] = NULL;
+  surfxml_statenames[E_surfxml_host___link] = "host_link";
   surfxml_statenames[AL_surfxml_cluster] = NULL;
   surfxml_statenames[E_surfxml_cluster] = "cluster";
   surfxml_statenames[AL_surfxml_cabinet] = NULL;
@@ -5243,8 +5363,8 @@ YY_DECL
   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_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";
@@ -5452,6 +5572,7 @@ case 17:
 YY_RULE_SETUP
 {
   AX_surfxml_platform_version = 1;
+  surfxml_platform_version_isset = 0;
   ENTER(AL_surfxml_platform); pushbuffer(0);
   }
        YY_BREAK
@@ -5459,12 +5580,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
@@ -5534,6 +5655,7 @@ case 28:
 YY_RULE_SETUP
 {
   AX_surfxml_include_file = 0;
+  surfxml_include_file_isset = 0;
   ENTER(AL_surfxml_include); pushbuffer(0);
   }
        YY_BREAK
@@ -5541,12 +5663,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
@@ -5620,8 +5742,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
@@ -5629,32 +5754,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
@@ -5732,13 +5857,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;
-  AX_surfxml_random_std_deviation = 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
@@ -5746,72 +5879,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 */
@@ -5848,7 +5981,7 @@ YY_RULE_SETUP
   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.");
+  if (!AX_surfxml_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
   LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(E_surfxml_random);
  }
        YY_BREAK
@@ -5859,7 +5992,7 @@ YY_RULE_SETUP
   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.");
+  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;
@@ -5912,10 +6045,13 @@ case 84:
 /* rule 84 can match eol */
 YY_RULE_SETUP
 {
-  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);
+  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
 
@@ -5924,70 +6060,70 @@ case 85:
 case 86:
 /* rule 86 can match eol */
 YY_RULE_SETUP
-A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
+A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_HOST___AVAIL;
        YY_BREAK
 case 87:
 /* rule 87 can match eol */
 case 88:
 /* rule 88 can match eol */
 YY_RULE_SETUP
-A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_POWER;
+A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_POWER;
        YY_BREAK
 case 89:
 /* rule 89 can match eol */
 case 90:
 /* rule 90 can match eol */
 YY_RULE_SETUP
-A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LINK_AVAIL;
+A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_LINK___AVAIL;
        YY_BREAK
 case 91:
 /* rule 91 can match eol */
 case 92:
 /* rule 92 can match eol */
 YY_RULE_SETUP
-A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_BANDWIDTH;
+A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_BANDWIDTH;
        YY_BREAK
 case 93:
 /* rule 93 can match eol */
 case 94:
 /* rule 94 can match eol */
 YY_RULE_SETUP
-A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
+A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_LATENCY;
        YY_BREAK
 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
 {
-  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; ENTER(E_surfxml_trace___connect);
  }
        YY_BREAK
 case 100:
 YY_RULE_SETUP
 {
-  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 */
+  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_11: case S_surfxml_AS_10: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
    case S_surfxml_AS_12: case S_surfxml_AS_15: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
@@ -6007,7 +6143,7 @@ case 102:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `trace_connect' element start tag.",surf_parse_text);
        YY_BREAK
-case YY_STATE_EOF(AL_surfxml_trace_connect):
+case YY_STATE_EOF(AL_surfxml_trace___connect):
 FAIL("EOF in attribute list of `trace_connect' element.");
        YY_BREAK
 
@@ -6016,7 +6152,7 @@ case 103:
 YY_RULE_SETUP
 {
   LEAVE;
-  ETag_surfxml_trace_connect();
+  ETag_surfxml_trace___connect();
   popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
@@ -6038,7 +6174,7 @@ case 105:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</trace_connect>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_trace_connect):
+case YY_STATE_EOF(E_surfxml_trace___connect):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</trace_connect>' expected.");
        YY_BREAK
 
@@ -6052,7 +6188,9 @@ case 107:
 YY_RULE_SETUP
 {
   AX_surfxml_AS_id = 0;
+  surfxml_AS_id_isset = 0;
   AX_surfxml_AS_routing = A_surfxml_AS_routing_None;
+  surfxml_AS_routing_isset = 0;
   ENTER(AL_surfxml_AS); pushbuffer(0);
   }
        YY_BREAK
@@ -6060,12 +6198,12 @@ 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 */
@@ -6201,70 +6339,74 @@ case 134:
 /* rule 134 can match eol */
 YY_RULE_SETUP
 {
-  AX_surfxml_storage_type_id = 0;
-  AX_surfxml_storage_type_model = 0;
-  AX_surfxml_storage_type_size = 0;
-  AX_surfxml_storage_type_content = 0;
-  ENTER(AL_surfxml_storage_type); pushbuffer(0);
+  AX_surfxml_storage___type_id = 0;
+  surfxml_storage___type_id_isset = 0;
+  AX_surfxml_storage___type_model = 0;
+  surfxml_storage___type_model_isset = 0;
+  AX_surfxml_storage___type_size = 0;
+  surfxml_storage___type_size_isset = 0;
+  AX_surfxml_storage___type_content = 0;
+  surfxml_storage___type_content_isset = 0;
+  ENTER(AL_surfxml_storage___type); pushbuffer(0);
   }
        YY_BREAK
 
 case 135:
 /* rule 135 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_type_id);
+if (surfxml_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_storage___type>");} surfxml_storage___type_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_id);
        YY_BREAK
 case 136:
 /* rule 136 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_type_id);
+if (surfxml_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_storage___type>");}  surfxml_storage___type_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_id);
        YY_BREAK
 case 137:
 /* rule 137 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_type_model);
+if (surfxml_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in <surfxml_storage___type>");} surfxml_storage___type_model_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_model);
        YY_BREAK
 case 138:
 /* rule 138 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_type_model);
+if (surfxml_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in <surfxml_storage___type>");}  surfxml_storage___type_model_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_model);
        YY_BREAK
 case 139:
 /* rule 139 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_type_size);
+if (surfxml_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in <surfxml_storage___type>");} surfxml_storage___type_size_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_size);
        YY_BREAK
 case 140:
 /* rule 140 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_type_size);
+if (surfxml_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in <surfxml_storage___type>");}  surfxml_storage___type_size_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_size);
        YY_BREAK
 case 141:
 /* rule 141 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_type_content);
+if (surfxml_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in <surfxml_storage___type>");} surfxml_storage___type_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_content);
        YY_BREAK
 case 142:
 /* rule 142 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_type_content);
+if (surfxml_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in <surfxml_storage___type>");}  surfxml_storage___type_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_content);
        YY_BREAK
 case 143:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_storage_type_id) FAIL("Required attribute `id' not set for `storage_type' element.");
-  if (!AX_surfxml_storage_type_model) FAIL("Required attribute `model' not set for `storage_type' element.");
-  if (!AX_surfxml_storage_type_size) FAIL("Required attribute `size' not set for `storage_type' element.");
-  LEAVE; STag_surfxml_storage_type();surfxml_pcdata_ix = 0; ENTER(S_surfxml_storage_type);
+  if (!AX_surfxml_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element.");
+  if (!AX_surfxml_storage___type_model) FAIL("Required attribute `model' not set for `storage_type' element.");
+  if (!AX_surfxml_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element.");
+  LEAVE; STag_surfxml_storage___type();surfxml_pcdata_ix = 0; ENTER(S_surfxml_storage___type);
  }
        YY_BREAK
 case 144:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_storage_type_id) FAIL("Required attribute `id' not set for `storage_type' element.");
-  if (!AX_surfxml_storage_type_model) FAIL("Required attribute `model' not set for `storage_type' element.");
-  if (!AX_surfxml_storage_type_size) FAIL("Required attribute `size' not set for `storage_type' element.");
-  LEAVE; STag_surfxml_storage_type(); surfxml_pcdata_ix = 0; ETag_surfxml_storage_type(); popbuffer(); /* attribute */
+  if (!AX_surfxml_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element.");
+  if (!AX_surfxml_storage___type_model) FAIL("Required attribute `model' not set for `storage_type' element.");
+  if (!AX_surfxml_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element.");
+  LEAVE; STag_surfxml_storage___type(); surfxml_pcdata_ix = 0; ETag_surfxml_storage___type(); popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
    case S_surfxml_AS_1: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
@@ -6279,7 +6421,7 @@ case 146:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `storage_type' element start tag.",surf_parse_text);
        YY_BREAK
-case YY_STATE_EOF(AL_surfxml_storage_type):
+case YY_STATE_EOF(AL_surfxml_storage___type):
 FAIL("EOF in attribute list of `storage_type' element.");
        YY_BREAK
 
@@ -6288,7 +6430,7 @@ case 147:
 YY_RULE_SETUP
 {
   LEAVE;
-  ETag_surfxml_storage_type();
+  ETag_surfxml_storage___type();
   popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
@@ -6305,9 +6447,9 @@ case 149:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</storage_type>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_storage_type):
-case YY_STATE_EOF(S_surfxml_storage_type_2):
-case YY_STATE_EOF(S_surfxml_storage_type):
+case YY_STATE_EOF(E_surfxml_storage___type):
+case YY_STATE_EOF(S_surfxml_storage___type):
+case YY_STATE_EOF(S_surfxml_storage___type_2):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</storage_type>' expected.");
        YY_BREAK
 
@@ -6321,8 +6463,11 @@ case 151:
 YY_RULE_SETUP
 {
   AX_surfxml_storage_id = 0;
+  surfxml_storage_id_isset = 0;
   AX_surfxml_storage_typeId = 0;
+  surfxml_storage_typeId_isset = 0;
   AX_surfxml_storage_content = 0;
+  surfxml_storage_content_isset = 0;
   ENTER(AL_surfxml_storage); pushbuffer(0);
   }
        YY_BREAK
@@ -6330,32 +6475,32 @@ YY_RULE_SETUP
 case 152:
 /* rule 152 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_id);
+if (surfxml_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_storage>");} surfxml_storage_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_id);
        YY_BREAK
 case 153:
 /* rule 153 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_id);
+if (surfxml_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_storage>");}  surfxml_storage_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_id);
        YY_BREAK
 case 154:
 /* rule 154 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_typeId);
+if (surfxml_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in <surfxml_storage>");} surfxml_storage_typeId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_typeId);
        YY_BREAK
 case 155:
 /* rule 155 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_typeId);
+if (surfxml_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in <surfxml_storage>");}  surfxml_storage_typeId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_typeId);
        YY_BREAK
 case 156:
 /* rule 156 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_content);
+if (surfxml_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in <surfxml_storage>");} surfxml_storage_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_content);
        YY_BREAK
 case 157:
 /* rule 157 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_content);
+if (surfxml_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in <surfxml_storage>");}  surfxml_storage_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_content);
        YY_BREAK
 case 158:
 YY_RULE_SETUP
@@ -6427,7 +6572,9 @@ case 166:
 YY_RULE_SETUP
 {
   AX_surfxml_mount_id = 0;
+  surfxml_mount_id_isset = 0;
   AX_surfxml_mount_name = 0;
+  surfxml_mount_name_isset = 0;
   ENTER(AL_surfxml_mount); pushbuffer(0);
   }
        YY_BREAK
@@ -6435,22 +6582,22 @@ YY_RULE_SETUP
 case 167:
 /* rule 167 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_id);
+if (surfxml_mount_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_mount>");} surfxml_mount_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_id);
        YY_BREAK
 case 168:
 /* rule 168 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_id);
+if (surfxml_mount_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_mount>");}  surfxml_mount_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_id);
        YY_BREAK
 case 169:
 /* rule 169 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_name);
+if (surfxml_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_mount>");} surfxml_mount_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_name);
        YY_BREAK
 case 170:
 /* rule 170 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_name);
+if (surfxml_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_mount>");}  surfxml_mount_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_name);
        YY_BREAK
 case 171:
 YY_RULE_SETUP
@@ -6518,7 +6665,9 @@ case 179:
 YY_RULE_SETUP
 {
   AX_surfxml_mstorage_typeId = 0;
+  surfxml_mstorage_typeId_isset = 0;
   AX_surfxml_mstorage_name = 0;
+  surfxml_mstorage_name_isset = 0;
   ENTER(AL_surfxml_mstorage); pushbuffer(0);
   }
        YY_BREAK
@@ -6526,22 +6675,22 @@ YY_RULE_SETUP
 case 180:
 /* rule 180 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_mstorage_typeId);
+if (surfxml_mstorage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in <surfxml_mstorage>");} surfxml_mstorage_typeId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mstorage_typeId);
        YY_BREAK
 case 181:
 /* rule 181 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_mstorage_typeId);
+if (surfxml_mstorage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in <surfxml_mstorage>");}  surfxml_mstorage_typeId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mstorage_typeId);
        YY_BREAK
 case 182:
 /* rule 182 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_mstorage_name);
+if (surfxml_mstorage_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_mstorage>");} surfxml_mstorage_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mstorage_name);
        YY_BREAK
 case 183:
 /* rule 183 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_mstorage_name);
+if (surfxml_mstorage_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_mstorage>");}  surfxml_mstorage_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mstorage_name);
        YY_BREAK
 case 184:
 YY_RULE_SETUP
@@ -6609,13 +6758,21 @@ case 192:
 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;
-  AX_surfxml_host_availability_file = 0;
+  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;
-  AX_surfxml_host_state_file = 0;
+  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
@@ -6623,52 +6780,52 @@ YY_RULE_SETUP
 case 193:
 /* rule 193 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 194:
 /* rule 194 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 195:
 /* rule 195 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 196:
 /* rule 196 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 197:
 /* rule 197 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 198:
 /* rule 198 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 199:
 /* rule 199 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 200:
 /* rule 200 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 201:
 /* rule 201 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 202:
 /* rule 202 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 203:
 /* rule 203 can match eol */
@@ -6687,22 +6844,22 @@ A_surfxml_host_state = A_surfxml_host_state_OFF;
 case 207:
 /* rule 207 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 208:
 /* rule 208 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 209:
 /* rule 209 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 210:
 /* rule 210 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 211:
 YY_RULE_SETUP
@@ -6772,6 +6929,7 @@ case 219:
 YY_RULE_SETUP
 {
   AX_surfxml_gpu_name = 0;
+  surfxml_gpu_name_isset = 0;
   ENTER(AL_surfxml_gpu); pushbuffer(0);
   }
        YY_BREAK
@@ -6779,12 +6937,12 @@ YY_RULE_SETUP
 case 220:
 /* rule 220 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_gpu_name);
+if (surfxml_gpu_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_gpu>");} surfxml_gpu_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_gpu_name);
        YY_BREAK
 case 221:
 /* rule 221 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_gpu_name);
+if (surfxml_gpu_name_isset != 0) {FAIL("Multiple definition of attribute name in <surfxml_gpu>");}  surfxml_gpu_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_gpu_name);
        YY_BREAK
 case 222:
 YY_RULE_SETUP
@@ -6849,59 +7007,62 @@ case 230:
 /* rule 230 can match eol */
 YY_RULE_SETUP
 {
-  AX_surfxml_host_link_id = 0;
-  AX_surfxml_host_link_up = 0;
-  AX_surfxml_host_link_down = 0;
-  ENTER(AL_surfxml_host_link); pushbuffer(0);
+  AX_surfxml_host___link_id = 0;
+  surfxml_host___link_id_isset = 0;
+  AX_surfxml_host___link_up = 0;
+  surfxml_host___link_up_isset = 0;
+  AX_surfxml_host___link_down = 0;
+  surfxml_host___link_down_isset = 0;
+  ENTER(AL_surfxml_host___link); pushbuffer(0);
   }
        YY_BREAK
 
 case 231:
 /* rule 231 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_link_id);
+if (surfxml_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_host___link>");} surfxml_host___link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_id);
        YY_BREAK
 case 232:
 /* rule 232 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_link_id);
+if (surfxml_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_host___link>");}  surfxml_host___link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_id);
        YY_BREAK
 case 233:
 /* rule 233 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_link_up);
+if (surfxml_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in <surfxml_host___link>");} surfxml_host___link_up_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_up);
        YY_BREAK
 case 234:
 /* rule 234 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_link_up);
+if (surfxml_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in <surfxml_host___link>");}  surfxml_host___link_up_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_up);
        YY_BREAK
 case 235:
 /* rule 235 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_link_down);
+if (surfxml_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in <surfxml_host___link>");} surfxml_host___link_down_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_down);
        YY_BREAK
 case 236:
 /* rule 236 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_link_down);
+if (surfxml_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in <surfxml_host___link>");}  surfxml_host___link_down_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_down);
        YY_BREAK
 case 237:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_host_link_id) FAIL("Required attribute `id' not set for `host_link' element.");
-  if (!AX_surfxml_host_link_up) FAIL("Required attribute `up' not set for `host_link' element.");
-  if (!AX_surfxml_host_link_down) FAIL("Required attribute `down' not set for `host_link' element.");
-  LEAVE; STag_surfxml_host_link();surfxml_pcdata_ix = 0; ENTER(E_surfxml_host_link);
+  if (!AX_surfxml_host___link_id) FAIL("Required attribute `id' not set for `host_link' element.");
+  if (!AX_surfxml_host___link_up) FAIL("Required attribute `up' not set for `host_link' element.");
+  if (!AX_surfxml_host___link_down) FAIL("Required attribute `down' not set for `host_link' element.");
+  LEAVE; STag_surfxml_host___link();surfxml_pcdata_ix = 0; ENTER(E_surfxml_host___link);
  }
        YY_BREAK
 case 238:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_host_link_id) FAIL("Required attribute `id' not set for `host_link' element.");
-  if (!AX_surfxml_host_link_up) FAIL("Required attribute `up' not set for `host_link' element.");
-  if (!AX_surfxml_host_link_down) FAIL("Required attribute `down' not set for `host_link' element.");
-  LEAVE; STag_surfxml_host_link(); surfxml_pcdata_ix = 0; ETag_surfxml_host_link(); popbuffer(); /* attribute */
+  if (!AX_surfxml_host___link_id) FAIL("Required attribute `id' not set for `host_link' element.");
+  if (!AX_surfxml_host___link_up) FAIL("Required attribute `up' not set for `host_link' element.");
+  if (!AX_surfxml_host___link_down) FAIL("Required attribute `down' not set for `host_link' element.");
+  LEAVE; STag_surfxml_host___link(); surfxml_pcdata_ix = 0; ETag_surfxml_host___link(); popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_1: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
   }
@@ -6915,7 +7076,7 @@ case 240:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `host_link' element start tag.",surf_parse_text);
        YY_BREAK
-case YY_STATE_EOF(AL_surfxml_host_link):
+case YY_STATE_EOF(AL_surfxml_host___link):
 FAIL("EOF in attribute list of `host_link' element.");
        YY_BREAK
 
@@ -6924,7 +7085,7 @@ case 241:
 YY_RULE_SETUP
 {
   LEAVE;
-  ETag_surfxml_host_link();
+  ETag_surfxml_host___link();
   popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_1: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
@@ -6940,7 +7101,7 @@ case 243:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</host_link>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_host_link):
+case YY_STATE_EOF(E_surfxml_host___link):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</host_link>' expected.");
        YY_BREAK
 
@@ -6954,20 +7115,35 @@ case 245:
 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;
-  AX_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FULLDUPLEX;
-  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;
-  AX_surfxml_cluster_router_id = 0;
+  surfxml_cluster_lat_isset = 0;
+  AX_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_FULLDUPLEX;
+  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
@@ -6975,167 +7151,167 @@ YY_RULE_SETUP
 case 246:
 /* rule 246 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 247:
 /* rule 247 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 248:
 /* rule 248 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 249:
 /* rule 249 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 250:
 /* rule 250 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 251:
 /* rule 251 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 252:
 /* rule 252 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 253:
 /* rule 253 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 254:
 /* rule 254 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 255:
 /* rule 255 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 256:
 /* rule 256 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 257:
 /* rule 257 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 258:
 /* rule 258 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 259:
 /* rule 259 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 260:
 /* rule 260 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 261:
 /* rule 261 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 262:
 /* rule 262 can match eol */
 case 263:
 /* rule 263 can match eol */
 YY_RULE_SETUP
-A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
+A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_SHARED;
        YY_BREAK
 case 264:
 /* rule 264 can match eol */
 case 265:
 /* rule 265 can match eol */
 YY_RULE_SETUP
-A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FULLDUPLEX;
+A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_FULLDUPLEX;
        YY_BREAK
 case 266:
 /* rule 266 can match eol */
 case 267:
 /* rule 267 can match eol */
 YY_RULE_SETUP
-A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FATPIPE;
+A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_FATPIPE;
        YY_BREAK
 case 268:
 /* rule 268 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 269:
 /* rule 269 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 270:
 /* rule 270 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 271:
 /* rule 271 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 272:
 /* rule 272 can match eol */
 case 273:
 /* rule 273 can match eol */
 YY_RULE_SETUP
-A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
+A_surfxml_cluster_bb___sharing___policy = A_surfxml_cluster_bb___sharing___policy_SHARED;
        YY_BREAK
 case 274:
 /* rule 274 can match eol */
 case 275:
 /* rule 275 can match eol */
 YY_RULE_SETUP
-A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_FATPIPE;
+A_surfxml_cluster_bb___sharing___policy = A_surfxml_cluster_bb___sharing___policy_FATPIPE;
        YY_BREAK
 case 276:
 /* rule 276 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 277:
 /* rule 277 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 278:
 /* rule 278 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 279:
 /* rule 279 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 280:
 /* rule 280 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_router_id);
+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 281:
 /* rule 281 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_router_id);
+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 282:
 YY_RULE_SETUP
@@ -7217,12 +7393,19 @@ case 290:
 YY_RULE_SETUP
 {
   AX_surfxml_cabinet_id = 0;
+  surfxml_cabinet_id_isset = 0;
   AX_surfxml_cabinet_prefix = 0;
+  surfxml_cabinet_prefix_isset = 0;
   AX_surfxml_cabinet_suffix = 0;
+  surfxml_cabinet_suffix_isset = 0;
   AX_surfxml_cabinet_radical = 0;
+  surfxml_cabinet_radical_isset = 0;
   AX_surfxml_cabinet_power = 0;
+  surfxml_cabinet_power_isset = 0;
   AX_surfxml_cabinet_bw = 0;
+  surfxml_cabinet_bw_isset = 0;
   AX_surfxml_cabinet_lat = 0;
+  surfxml_cabinet_lat_isset = 0;
   ENTER(AL_surfxml_cabinet); pushbuffer(0);
   }
        YY_BREAK
@@ -7230,72 +7413,72 @@ YY_RULE_SETUP
 case 291:
 /* rule 291 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_id);
+if (surfxml_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_cabinet>");} surfxml_cabinet_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_id);
        YY_BREAK
 case 292:
 /* rule 292 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_id);
+if (surfxml_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_cabinet>");}  surfxml_cabinet_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_id);
        YY_BREAK
 case 293:
 /* rule 293 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_prefix);
+if (surfxml_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in <surfxml_cabinet>");} surfxml_cabinet_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_prefix);
        YY_BREAK
 case 294:
 /* rule 294 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_prefix);
+if (surfxml_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in <surfxml_cabinet>");}  surfxml_cabinet_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_prefix);
        YY_BREAK
 case 295:
 /* rule 295 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_suffix);
+if (surfxml_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in <surfxml_cabinet>");} surfxml_cabinet_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_suffix);
        YY_BREAK
 case 296:
 /* rule 296 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_suffix);
+if (surfxml_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in <surfxml_cabinet>");}  surfxml_cabinet_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_suffix);
        YY_BREAK
 case 297:
 /* rule 297 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_radical);
+if (surfxml_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_cabinet>");} surfxml_cabinet_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_radical);
        YY_BREAK
 case 298:
 /* rule 298 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_radical);
+if (surfxml_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_cabinet>");}  surfxml_cabinet_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_radical);
        YY_BREAK
 case 299:
 /* rule 299 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_power);
+if (surfxml_cabinet_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_cabinet>");} surfxml_cabinet_power_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_power);
        YY_BREAK
 case 300:
 /* rule 300 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_power);
+if (surfxml_cabinet_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_cabinet>");}  surfxml_cabinet_power_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_power);
        YY_BREAK
 case 301:
 /* rule 301 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_bw);
+if (surfxml_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in <surfxml_cabinet>");} surfxml_cabinet_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_bw);
        YY_BREAK
 case 302:
 /* rule 302 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_bw);
+if (surfxml_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in <surfxml_cabinet>");}  surfxml_cabinet_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_bw);
        YY_BREAK
 case 303:
 /* rule 303 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_lat);
+if (surfxml_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_cabinet>");} surfxml_cabinet_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_lat);
        YY_BREAK
 case 304:
 /* rule 304 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_lat);
+if (surfxml_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_cabinet>");}  surfxml_cabinet_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_lat);
        YY_BREAK
 case 305:
 YY_RULE_SETUP
@@ -7379,13 +7562,21 @@ case 313:
 YY_RULE_SETUP
 {
   AX_surfxml_peer_id = 0;
+  surfxml_peer_id_isset = 0;
   AX_surfxml_peer_power = 0;
-  AX_surfxml_peer_bw_in = 0;
-  AX_surfxml_peer_bw_out = 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;
-  AX_surfxml_peer_availability_file = 0;
-  AX_surfxml_peer_state_file = 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
@@ -7393,90 +7584,90 @@ YY_RULE_SETUP
 case 314:
 /* rule 314 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
+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 315:
 /* rule 315 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
+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 316:
 /* rule 316 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
+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 317:
 /* rule 317 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
+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 318:
 /* rule 318 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
+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 319:
 /* rule 319 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
+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 320:
 /* rule 320 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
+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 321:
 /* rule 321 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
+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 322:
 /* rule 322 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
+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 323:
 /* rule 323 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
+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 324:
 /* rule 324 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
+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 325:
 /* rule 325 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
+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 326:
 /* rule 326 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability_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 327:
 /* rule 327 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability_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 328:
 /* rule 328 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state_file);
+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 329:
 /* rule 329 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state_file);
+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 330:
 YY_RULE_SETUP
 {
   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_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);
  }
@@ -7486,8 +7677,8 @@ YY_RULE_SETUP
 {
   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_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) {
@@ -7546,7 +7737,9 @@ case 338:
 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
@@ -7554,22 +7747,22 @@ YY_RULE_SETUP
 case 339:
 /* rule 339 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
+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 340:
 /* rule 340 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
+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 341:
 /* rule 341 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
+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 342:
 /* rule 342 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
+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 343:
 YY_RULE_SETUP
@@ -7635,8 +7828,11 @@ case 351:
 YY_RULE_SETUP
 {
   AX_surfxml_backbone_id = 0;
+  surfxml_backbone_id_isset = 0;
   AX_surfxml_backbone_bandwidth = 0;
+  surfxml_backbone_bandwidth_isset = 0;
   AX_surfxml_backbone_latency = 0;
+  surfxml_backbone_latency_isset = 0;
   ENTER(AL_surfxml_backbone); pushbuffer(0);
   }
        YY_BREAK
@@ -7644,32 +7840,32 @@ YY_RULE_SETUP
 case 352:
 /* rule 352 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_id);
+if (surfxml_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_backbone>");} surfxml_backbone_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_id);
        YY_BREAK
 case 353:
 /* rule 353 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_id);
+if (surfxml_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_backbone>");}  surfxml_backbone_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_id);
        YY_BREAK
 case 354:
 /* rule 354 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_bandwidth);
+if (surfxml_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in <surfxml_backbone>");} surfxml_backbone_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_bandwidth);
        YY_BREAK
 case 355:
 /* rule 355 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_bandwidth);
+if (surfxml_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in <surfxml_backbone>");}  surfxml_backbone_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_bandwidth);
        YY_BREAK
 case 356:
 /* rule 356 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_latency);
+if (surfxml_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in <surfxml_backbone>");} surfxml_backbone_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_latency);
        YY_BREAK
 case 357:
 /* rule 357 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_latency);
+if (surfxml_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in <surfxml_backbone>");}  surfxml_backbone_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_latency);
        YY_BREAK
 case 358:
 YY_RULE_SETUP
@@ -7741,13 +7937,21 @@ case 366:
 YY_RULE_SETUP
 {
   AX_surfxml_link_id = 0;
+  surfxml_link_id_isset = 0;
   AX_surfxml_link_bandwidth = 0;
-  AX_surfxml_link_bandwidth_file = 0;
+  surfxml_link_bandwidth_isset = 0;
+  AX_surfxml_link_bandwidth___file = 0;
+  surfxml_link_bandwidth___file_isset = 0;
   AX_surfxml_link_latency = 24;
-  AX_surfxml_link_latency_file = 0;
+  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;
-  AX_surfxml_link_state_file = 0;
-  AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+  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
@@ -7755,52 +7959,52 @@ YY_RULE_SETUP
 case 367:
 /* rule 367 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
+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 368:
 /* rule 368 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
+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 369:
 /* rule 369 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
+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 370:
 /* rule 370 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
+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 371:
 /* rule 371 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
+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 372:
 /* rule 372 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
+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 373:
 /* rule 373 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
+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 374:
 /* rule 374 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
+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 375:
 /* rule 375 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
+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 376:
 /* rule 376 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
+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 377:
 /* rule 377 can match eol */
@@ -7819,33 +8023,33 @@ A_surfxml_link_state = A_surfxml_link_state_OFF;
 case 381:
 /* rule 381 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
+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 382:
 /* rule 382 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
+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 383:
 /* rule 383 can match eol */
 case 384:
 /* rule 384 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_SHARED;
        YY_BREAK
 case 385:
 /* rule 385 can match eol */
 case 386:
 /* rule 386 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_FATPIPE;
        YY_BREAK
 case 387:
 /* rule 387 can match eol */
 case 388:
 /* rule 388 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_FULLDUPLEX;
        YY_BREAK
 case 389:
 YY_RULE_SETUP
@@ -7917,8 +8121,11 @@ case 397:
 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
@@ -7926,22 +8133,22 @@ YY_RULE_SETUP
 case 398:
 /* rule 398 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
+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 399:
 /* rule 399 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
+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 400:
 /* rule 400 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
+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 401:
 /* rule 401 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
+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 402:
 /* rule 402 can match eol */
@@ -8025,10 +8232,15 @@ case 414:
 YY_RULE_SETUP
 {
   AX_surfxml_ASroute_src = 0;
+  surfxml_ASroute_src_isset = 0;
   AX_surfxml_ASroute_dst = 0;
-  AX_surfxml_ASroute_gw_src = 0;
-  AX_surfxml_ASroute_gw_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
@@ -8036,42 +8248,42 @@ YY_RULE_SETUP
 case 415:
 /* rule 415 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
+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 416:
 /* rule 416 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
+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 417:
 /* rule 417 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
+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 418:
 /* rule 418 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
+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 419:
 /* rule 419 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
+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 420:
 /* rule 420 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
+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 421:
 /* rule 421 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
+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 422:
 /* rule 422 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
+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 423:
 /* rule 423 can match eol */
@@ -8092,8 +8304,8 @@ YY_RULE_SETUP
 {
   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.");
+  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);
  }
        YY_BREAK
@@ -8102,8 +8314,8 @@ YY_RULE_SETUP
 {
   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.");
+  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_9: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
@@ -8158,55 +8370,57 @@ case 435:
 /* rule 435 can match eol */
 YY_RULE_SETUP
 {
-  AX_surfxml_link_ctn_id = 0;
-  AX_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  ENTER(AL_surfxml_link_ctn); pushbuffer(0);
+  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 436:
 /* rule 436 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
+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 437:
 /* rule 437 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
+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 438:
 /* rule 438 can match eol */
 case 439:
 /* rule 439 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
+A_surfxml_link___ctn_direction = A_surfxml_link___ctn_direction_UP;
        YY_BREAK
 case 440:
 /* rule 440 can match eol */
 case 441:
 /* rule 441 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_DOWN;
        YY_BREAK
 case 442:
 /* rule 442 can match eol */
 case 443:
 /* rule 443 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_NONE;
        YY_BREAK
 case 444:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
-  LEAVE; STag_surfxml_link_ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link_ctn);
+  if (!AX_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 445:
 YY_RULE_SETUP
 {
-  if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
-  LEAVE; STag_surfxml_link_ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link_ctn(); popbuffer(); /* attribute */
+  if (!AX_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;
@@ -8223,7 +8437,7 @@ case 447:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `link_ctn' element start tag.",surf_parse_text);
        YY_BREAK
-case YY_STATE_EOF(AL_surfxml_link_ctn):
+case YY_STATE_EOF(AL_surfxml_link___ctn):
 FAIL("EOF in attribute list of `link_ctn' element.");
        YY_BREAK
 
@@ -8232,7 +8446,7 @@ case 448:
 YY_RULE_SETUP
 {
   LEAVE;
-  ETag_surfxml_link_ctn();
+  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;
@@ -8251,7 +8465,7 @@ case 450:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</link_ctn>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_link_ctn):
+case YY_STATE_EOF(E_surfxml_link___ctn):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</link_ctn>' expected.");
        YY_BREAK
 
@@ -8265,7 +8479,9 @@ case 452:
 YY_RULE_SETUP
 {
   AX_surfxml_bypassRoute_src = 0;
+  surfxml_bypassRoute_src_isset = 0;
   AX_surfxml_bypassRoute_dst = 0;
+  surfxml_bypassRoute_dst_isset = 0;
   ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
   }
        YY_BREAK
@@ -8273,22 +8489,22 @@ YY_RULE_SETUP
 case 453:
 /* rule 453 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
+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 454:
 /* rule 454 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
+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 455:
 /* rule 455 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
+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 456:
 /* rule 456 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
+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 457:
 YY_RULE_SETUP
@@ -8358,9 +8574,13 @@ case 465:
 YY_RULE_SETUP
 {
   AX_surfxml_bypassASroute_src = 0;
+  surfxml_bypassASroute_src_isset = 0;
   AX_surfxml_bypassASroute_dst = 0;
-  AX_surfxml_bypassASroute_gw_src = 0;
-  AX_surfxml_bypassASroute_gw_dst = 0;
+  surfxml_bypassASroute_dst_isset = 0;
+  AX_surfxml_bypassASroute_gw___src = 0;
+  surfxml_bypassASroute_gw___src_isset = 0;
+  AX_surfxml_bypassASroute_gw___dst = 0;
+  surfxml_bypassASroute_gw___dst_isset = 0;
   ENTER(AL_surfxml_bypassASroute); pushbuffer(0);
   }
        YY_BREAK
@@ -8368,50 +8588,50 @@ YY_RULE_SETUP
 case 466:
 /* rule 466 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_src);
+if (surfxml_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_bypassASroute>");} surfxml_bypassASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_src);
        YY_BREAK
 case 467:
 /* rule 467 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_src);
+if (surfxml_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_bypassASroute>");}  surfxml_bypassASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_src);
        YY_BREAK
 case 468:
 /* rule 468 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_dst);
+if (surfxml_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_bypassASroute>");} surfxml_bypassASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_dst);
        YY_BREAK
 case 469:
 /* rule 469 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_dst);
+if (surfxml_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_bypassASroute>");}  surfxml_bypassASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_dst);
        YY_BREAK
 case 470:
 /* rule 470 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw_src);
+if (surfxml_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_bypassASroute>");} surfxml_bypassASroute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw___src);
        YY_BREAK
 case 471:
 /* rule 471 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw_src);
+if (surfxml_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_bypassASroute>");}  surfxml_bypassASroute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw___src);
        YY_BREAK
 case 472:
 /* rule 472 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw_dst);
+if (surfxml_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_bypassASroute>");} surfxml_bypassASroute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw___dst);
        YY_BREAK
 case 473:
 /* rule 473 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw_dst);
+if (surfxml_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_bypassASroute>");}  surfxml_bypassASroute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw___dst);
        YY_BREAK
 case 474:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element.");
   if (!AX_surfxml_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element.");
-  if (!AX_surfxml_bypassASroute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element.");
-  if (!AX_surfxml_bypassASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element.");
+  if (!AX_surfxml_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element.");
+  if (!AX_surfxml_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element.");
   LEAVE; STag_surfxml_bypassASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassASroute);
  }
        YY_BREAK
@@ -8420,8 +8640,8 @@ YY_RULE_SETUP
 {
   if (!AX_surfxml_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element.");
   if (!AX_surfxml_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element.");
-  if (!AX_surfxml_bypassASroute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element.");
-  if (!AX_surfxml_bypassASroute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element.");
+  if (!AX_surfxml_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element.");
+  if (!AX_surfxml_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element.");
   LEAVE; STag_surfxml_bypassASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassASroute(); popbuffer(); /* attribute */
   switch (YY_START) {
    case S_surfxml_AS_9: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
@@ -8477,10 +8697,15 @@ case 482:
 YY_RULE_SETUP
 {
   AX_surfxml_process_host = 0;
+  surfxml_process_host_isset = 0;
   AX_surfxml_process_function = 0;
-  AX_surfxml_process_start_time = 28;
-  AX_surfxml_process_kill_time = 33;
-  AX_surfxml_process_on_failure = A_surfxml_process_on_failure_DIE;
+  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;
+  AX_surfxml_process_on___failure = A_surfxml_process_on___failure_DIE;
+  surfxml_process_on___failure_isset = 0;
   ENTER(AL_surfxml_process); pushbuffer(0);
   }
        YY_BREAK
@@ -8488,56 +8713,56 @@ YY_RULE_SETUP
 case 483:
 /* rule 483 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
+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 484:
 /* rule 484 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
+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 485:
 /* rule 485 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
+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 486:
 /* rule 486 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
+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 487:
 /* rule 487 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_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 488:
 /* rule 488 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_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 489:
 /* rule 489 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
+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 490:
 /* rule 490 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
+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 491:
 /* rule 491 can match eol */
 case 492:
 /* rule 492 can match eol */
 YY_RULE_SETUP
-A_surfxml_process_on_failure = A_surfxml_process_on_failure_DIE;
+A_surfxml_process_on___failure = A_surfxml_process_on___failure_DIE;
        YY_BREAK
 case 493:
 /* rule 493 can match eol */
 case 494:
 /* rule 494 can match eol */
 YY_RULE_SETUP
-A_surfxml_process_on_failure = A_surfxml_process_on_failure_RESTART;
+A_surfxml_process_on___failure = A_surfxml_process_on___failure_RESTART;
        YY_BREAK
 case 495:
 YY_RULE_SETUP
@@ -8607,6 +8832,7 @@ case 503:
 YY_RULE_SETUP
 {
   AX_surfxml_argument_value = 0;
+  surfxml_argument_value_isset = 0;
   ENTER(AL_surfxml_argument); pushbuffer(0);
   }
        YY_BREAK
@@ -8614,12 +8840,12 @@ YY_RULE_SETUP
 case 504:
 /* rule 504 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 505:
 /* rule 505 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 506:
 YY_RULE_SETUP
@@ -8685,6 +8911,7 @@ case 514:
 YY_RULE_SETUP
 {
   AX_surfxml_config_id = 0;
+  surfxml_config_id_isset = 0;
   ENTER(AL_surfxml_config); pushbuffer(0);
   }
        YY_BREAK
@@ -8692,12 +8919,12 @@ YY_RULE_SETUP
 case 515:
 /* rule 515 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 516:
 /* rule 516 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 517:
 YY_RULE_SETUP
@@ -8765,7 +8992,9 @@ case 525:
 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
@@ -8773,22 +9002,22 @@ YY_RULE_SETUP
 case 526:
 /* rule 526 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
+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 527:
 /* rule 527 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
+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 528:
 /* rule 528 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
+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 529:
 /* rule 529 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
+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 530:
 YY_RULE_SETUP
@@ -8810,8 +9039,8 @@ YY_RULE_SETUP
    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_storage_type_2: case S_surfxml_storage_type: case S_surfxml_storage_type_1: SET(S_surfxml_storage_type_2); break;
    case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
+   case S_surfxml_storage___type_1: case S_surfxml_storage___type: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break;
   }
  }
        YY_BREAK
@@ -8840,8 +9069,8 @@ YY_RULE_SETUP
    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_storage_type_2: case S_surfxml_storage_type: case S_surfxml_storage_type_1: SET(S_surfxml_storage_type_2); break;
    case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
+   case S_surfxml_storage___type_1: case S_surfxml_storage___type: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break;
   }
  }
        YY_BREAK
@@ -8987,7 +9216,7 @@ case YY_STATE_EOF(S_surfxml_AS_8):
 case YY_STATE_EOF(S_surfxml_AS_10):
 case YY_STATE_EOF(S_surfxml_AS_13):
 case YY_STATE_EOF(S_surfxml_AS_15):
-case YY_STATE_EOF(S_surfxml_storage_type_1):
+case YY_STATE_EOF(S_surfxml_storage___type_1):
 case YY_STATE_EOF(S_surfxml_storage_1):
 case YY_STATE_EOF(S_surfxml_host_1):
 case YY_STATE_EOF(S_surfxml_link_1):
index 5dd92c0..4d82cd3 100644 (file)
@@ -518,7 +518,6 @@ static void surf_storage_model_init_internal(void)
   surf_storage_model->extension.storage.stat = storage_action_stat;
   surf_storage_model->extension.storage.unlink = storage_action_unlink;
   surf_storage_model->extension.storage.ls = storage_action_ls;
-  surf_storage_model->extension.storage.create_resource = storage_create_resource;
 
   if (!storage_maxmin_system) {
     storage_maxmin_system = lmm_system_new(storage_selective_update);
index 5309c43..335351e 100644 (file)
@@ -10,6 +10,7 @@
 #include "simix/smx_host_private.h"
 #include "surf/surf_resource.h"
 #include "xbt/xbt_os_thread.h"
+#include "simgrid/sg_config.h"
 
 #include <ctype.h>
 
@@ -55,26 +56,6 @@ static const char *disk_drives_letter_table[MAX_DRIVE] = {
 };
 #endif                          /* #ifdef _XBT_WIN32 */
 
-int surf_cfg_get_int(const char* name)
-{
-       return xbt_cfg_get_int(_surf_cfg_set,name);
-}
-double surf_cfg_get_double(const char* name)
-{
-       return xbt_cfg_get_double(_surf_cfg_set,name);
-}
-char* surf_cfg_get_string(const char* name)
-{
-       return xbt_cfg_get_string(_surf_cfg_set,name);
-}
-void surf_cfg_get_peer(const char *name, char **peer, int *port)
-{
-       xbt_cfg_get_peer(_surf_cfg_set,name, peer, port);
-}
-xbt_dynar_t surf_cfg_get_dynar(const char* name)
-{
-       return xbt_cfg_get_dynar(_surf_cfg_set,name);
-}
 /*
  * Returns the initial path. On Windows the initial path is
  * the current directory for the current process in the other
@@ -437,7 +418,12 @@ void surf_init(int *argc, char **argv)
   if (!history)
     history = tmgr_history_new();
 
-  surf_config_init(argc, argv);
+#ifdef HAVE_TRACING
+  TRACE_add_start_function(TRACE_surf_alloc);
+  TRACE_add_end_function(TRACE_surf_release);
+#endif
+
+  sg_config_init(argc, argv);
 
   surf_action_init();
   if (MC_is_active())
@@ -479,7 +465,7 @@ void surf_exit(void)
   unsigned int iter;
   surf_model_t model = NULL;
 
-  surf_config_finalize();
+  sg_config_finalize();
 
   xbt_dynar_foreach(model_list, iter, model)
       model->model_private->finalize();
@@ -537,9 +523,11 @@ void surf_presolve(void)
             tmgr_history_get_next_event_leq(history, next_event_date,
                                             &value,
                                             (void **) &resource))) {
-      resource->model->model_private->update_resource_state(resource,
-                                                            event, value,
-                                                            NOW);
+      if (value >= 0){
+        resource->model->model_private->update_resource_state(resource,
+                                                              event, value,
+                                                              NOW);
+      }
     }
   }
   xbt_dynar_foreach(model_list, iter, model)
@@ -608,21 +596,21 @@ double surf_solve(double max_date)
         min = MAX(next_event_date - NOW, min);
       }
 
-      XBT_DEBUG("Run for NS3 at most %f", min);
+      XBT_DEBUG("Run for network 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);
+      XBT_DEBUG("Min for network : %f", model_next_action_end);
       if(model_next_action_end>=0.0)
         min = model_next_action_end;
     }
 
-    if (next_event_date == -1.0) {
+    if (next_event_date < 0.0) {
       XBT_DEBUG("no next TRACE event. Stop searching for it");
       break;
     }
 
-    if ((min != -1.0) && (next_event_date > NOW + min)) break;
+    if ((min == -1.0) || (next_event_date > NOW + min)) break;
 
     XBT_DEBUG("Updating models");
     while ((event =
@@ -738,6 +726,33 @@ void surf_set_nthreads(int nthreads) {
   surf_nthreads = nthreads;
 }
 
+/* This function is a pimple that we ought to fix. But it won't be easy.
+ *
+ * The surf_solve() function does properly return the set of actions that changed.
+ * Instead, each model change a global data, and then the caller of surf_solve must
+ * pick into these sets of action_failed and action_done.
+ *
+ * This was not clean but ok as long as we didn't had to restart the processes when the resource comes back up.
+ * We worked by putting sentinel actions on every resources we are interested in,
+ * so that surf informs us if/when the corresponding resource fails.
+ *
+ * But this does not work to get Simix informed of when a resource comes back up, and this is where this pimple comes.
+ * We have a set of resources that are currently down and for which simix needs to know when it comes back up.
+ * And the current function is called *at every simulation step* to sweep over that set, searching for a resource
+ * that was turned back up in the meanwhile. This is UGLY and slow.
+ *
+ * The proper solution would be to not rely on globals for the action_failed and action_done swags.
+ * They must be passed as parameter by the caller (the handling of these actions in simix may let you
+ * think that these two sets can be merged, but their handling in SimDag induce the contrary unless this
+ * simdag code can check by itself whether the action is done of failed -- seems very doable, but yet more
+ * cleanup to do).
+ *
+ * Once surf_solve() is passed the set of actions that changed, you want to add a new set of resources back up
+ * as parameter to this function. You also want to add a boolean field "restart_watched" to each resource, and
+ * make sure that whenever a resource with this field enabled comes back up, it's added to that set so that Simix
+ * sees it and react accordingly. This would kill that need for surf to call simix.
+ *
+ */
 void surf_watched_hosts(void)
 {
   char *key;
index 19b2b58..4732aa3 100644 (file)
 
 #define NO_MAX_DURATION -1.0
 
-/* user-visible parameters */
-extern double sg_tcp_gamma;
-extern double sg_sender_gap;
-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_crosstraffic;
-#ifdef HAVE_GTNETS
-extern double sg_gtnets_jitter;
-extern int sg_gtnets_jitter_seed;
-#endif
-
 extern xbt_dict_t watched_hosts_lib;
 
 extern const char *surf_action_state_names[6];
@@ -100,11 +87,10 @@ void generic_update_actions_state_full(double now, double delta, surf_model_t mo
 FILE *surf_fopen(const char *name, const char *mode);
 
 extern tmgr_history_t history;
-extern xbt_dynar_t surf_path;
 
-void surf_config_init(int *argc, char **argv);
-void surf_config_finalize(void);
-void surf_config(const char *name, va_list pa);
+//void surf_config_init(int *argc, char **argv);
+//void surf_config_finalize(void);
+//void surf_config(const char *name, va_list pa);
 
 void net_action_recycle(surf_action_t action);
 double net_action_get_remains(surf_action_t action);
@@ -112,14 +98,6 @@ double net_action_get_remains(surf_action_t action);
 int net_get_link_latency_limited(surf_action_t action);
 #endif
 
-/*
- * Returns the initial path. On Windows the initial path is
- * the current directory for the current process in the other
- * case the function returns "./" that represents the current
- * directory on Unix/Linux platforms.
- */
-const char *__surf_get_initial_path(void);
-
 /* The __surf_is_absolute_file_path() returns 1 if
  * file_path is a absolute file path, in the other
  * case the function returns 0.
@@ -222,4 +200,11 @@ XBT_PUBLIC(void) surfxml_bufferstack_pop(int new);
 
 XBT_PUBLIC_DATA(int) surfxml_bufferstack_size;
 
+/********** Tracing **********/
+/* from surf_instr.c */
+void TRACE_surf_host_set_power(double date, const char *resource, double power);
+void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
+void TRACE_surf_link_set_latency(double date, const char *resource, double latency);
+
+
 #endif                          /* _SURF_SURF_PRIVATE_H */
index b6bb950..e4ce24d 100644 (file)
@@ -10,8 +10,6 @@
 #include "surf/surf_routing.h"
 #include "surf/surfxml_parse_values.h"
 
-#include <pcre.h>               /* regular expression library */
-
 /**
  * @ingroup SURF_build_api
  * @brief A library containing all known workstations
@@ -321,7 +319,7 @@ static void routing_parse_trace_connect(sg_platf_trace_connect_cbarg_t trace_con
   }
 }
 
-extern int _surf_init_status; /* yay, this is an horrible hack */
+extern int _sg_init_status; /* yay, this is an horrible hack */
 
 /**
  * \brief Make a new routing component to the platform
@@ -346,7 +344,7 @@ void routing_AS_begin(sg_platf_AS_cbarg_t AS)
              (as_router_lib, AS->id, ROUTING_ASR_LEVEL),
              "The AS \"%s\" already exists", AS->id);
 
-  _surf_init_status = 2; /* horrible hack: direct access to the global controlling the level of configuration to prevent any further config */
+  _sg_init_status = 2; /* horrible hack: direct access to the global controlling the level of configuration to prevent any further config */
 
   /* search the routing model */
   switch(AS->routing){
@@ -1021,7 +1019,7 @@ static void routing_parse_Srandom(void)
   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);
+  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);
index 6f6d587..177c092 100644 (file)
@@ -10,8 +10,6 @@
 #include "surf/surf_routing.h"
 #include "surf/surfxml_parse_values.h"
 
-#include <pcre.h>               /* regular expression library */
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing");
 
 static int no_bypassroute_declared = 1;
index 72e89ba..2c03573 100644 (file)
@@ -12,6 +12,7 @@
 #include "xbt/dict.h"
 #include "surf/surfxml_parse.h"
 #include "surf/surf_private.h"
+#include "simgrid/sg_config.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
                                 "Logging specific to the SURF parsing module");
@@ -106,22 +107,22 @@ void ETag_surfxml_storage(void)
   sg_platf_new_storage(&storage);
   current_property_set = NULL;
 }
-void STag_surfxml_storage_type(void)
+void STag_surfxml_storage___type(void)
 {
   AS_TAG = 0;
-  XBT_DEBUG("STag_surfxml_storage_type");
+  XBT_DEBUG("STag_surfxml_storage___type");
   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_storage_type(void)
+void ETag_surfxml_storage___type(void)
 {
   s_sg_platf_storage_type_cbarg_t storage_type;
   memset(&storage_type,0,sizeof(storage_type));
 
-  storage_type.content = A_surfxml_storage_type_content;
-  storage_type.id = A_surfxml_storage_type_id;
-  storage_type.model = A_surfxml_storage_type_model;
+  storage_type.content = A_surfxml_storage___type_content;
+  storage_type.id = A_surfxml_storage___type_id;
+  storage_type.model = A_surfxml_storage___type_model;
   storage_type.properties = current_property_set;
-  storage_type.size = surf_parse_get_int(A_surfxml_storage_type_size);
+  storage_type.size = surf_parse_get_int(A_surfxml_storage___type_size);
   sg_platf_new_storage_type(&storage_type);
   current_property_set = NULL;
 }
@@ -297,8 +298,8 @@ void ETag_surfxml_host(void)    {
   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_from_file(A_surfxml_host_availability_file);
-  host.state_trace = tmgr_trace_new_from_file(A_surfxml_host_state_file);
+  host.power_trace = tmgr_trace_new_from_file(A_surfxml_host_availability___file);
+  host.state_trace = tmgr_trace_new_from_file(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)
@@ -311,14 +312,14 @@ void ETag_surfxml_host(void)    {
   current_property_set = NULL;
 }
 
-void STag_surfxml_host_link(void){
-  XBT_DEBUG("Create a Host_link for %s",A_surfxml_host_link_id);
+void STag_surfxml_host___link(void){
+  XBT_DEBUG("Create a Host_link for %s",A_surfxml_host___link_id);
   s_sg_platf_host_link_cbarg_t host_link;
   memset(&host_link,0,sizeof(host_link));
 
-  host_link.id = A_surfxml_host_link_id;
-  host_link.link_up = A_surfxml_host_link_up;
-  host_link.link_down = A_surfxml_host_link_down;
+  host_link.id = A_surfxml_host___link_id;
+  host_link.link_up = A_surfxml_host___link_up;
+  host_link.link_down = A_surfxml_host___link_down;
   sg_platf_new_host_link(&host_link);
 }
 
@@ -343,20 +344,20 @@ void STag_surfxml_cluster(void){
   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:
+  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:
+  case A_surfxml_cluster_sharing___policy_FULLDUPLEX:
     cluster.sharing_policy = SURF_LINK_FULLDUPLEX;
     break;
-  case A_surfxml_cluster_sharing_policy_FATPIPE:
+  case A_surfxml_cluster_sharing___policy_FATPIPE:
     cluster.sharing_policy = SURF_LINK_FATPIPE;
     break;
   default:
@@ -364,11 +365,11 @@ void STag_surfxml_cluster(void){
                      cluster.id);
     break;
   }
-  switch (AX_surfxml_cluster_bb_sharing_policy) {
-  case A_surfxml_cluster_bb_sharing_policy_FATPIPE:
+  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:
+  case A_surfxml_cluster_bb___sharing___policy_SHARED:
     cluster.bb_sharing_policy = SURF_LINK_SHARED;
     break;
   default:
@@ -377,8 +378,8 @@ void STag_surfxml_cluster(void){
     break;
   }
 
-  cluster.availability_trace = A_surfxml_cluster_availability_file;
-  cluster.state_trace = A_surfxml_cluster_state_file;
+  cluster.availability_trace = A_surfxml_cluster_availability___file;
+  cluster.state_trace = A_surfxml_cluster_state___file;
   sg_platf_new_cluster(&cluster);
 }
 
@@ -401,12 +402,12 @@ void STag_surfxml_peer(void){
   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.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_from_file(A_surfxml_peer_availability_file);
-  peer.state_trace = tmgr_trace_new_from_file(A_surfxml_peer_state_file);
+  peer.availability_trace = tmgr_trace_new_from_file(A_surfxml_peer_availability___file);
+  peer.state_trace = tmgr_trace_new_from_file(A_surfxml_peer_state___file);
 
   sg_platf_new_peer(&peer);
 }
@@ -424,9 +425,9 @@ void ETag_surfxml_link(void){
 
   link.id = A_surfxml_link_id;
   link.bandwidth = surf_parse_get_double(A_surfxml_link_bandwidth);
-  link.bandwidth_trace = tmgr_trace_new_from_file(A_surfxml_link_bandwidth_file);
+  link.bandwidth_trace = tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file);
   link.latency = surf_parse_get_double(A_surfxml_link_latency);
-  link.latency_trace = tmgr_trace_new_from_file(A_surfxml_link_latency_file);
+  link.latency_trace = tmgr_trace_new_from_file(A_surfxml_link_latency___file);
 
   switch (A_surfxml_link_state) {
   case A_surfxml_link_state_ON:
@@ -439,16 +440,16 @@ void ETag_surfxml_link(void){
     surf_parse_error("invalid state for link %s", link.id);
     break;
   }
-  link.state_trace = tmgr_trace_new_from_file(A_surfxml_link_state_file);
+  link.state_trace = tmgr_trace_new_from_file(A_surfxml_link_state___file);
 
-  switch (A_surfxml_link_sharing_policy) {
-  case A_surfxml_link_sharing_policy_SHARED:
+  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:
+  case A_surfxml_link_sharing___policy_FATPIPE:
      link.policy = SURF_LINK_FATPIPE;
      break;
-  case A_surfxml_link_sharing_policy_FULLDUPLEX:
+  case A_surfxml_link_sharing___policy_FULLDUPLEX:
      link.policy = SURF_LINK_FULLDUPLEX;
      break;
   default:
@@ -461,19 +462,19 @@ void ETag_surfxml_link(void){
   current_property_set = NULL;
 }
 
-void STag_surfxml_link_ctn(void){
+void STag_surfxml_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);
+  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);
+  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);
+  case A_surfxml_link___ctn_direction_DOWN:
+    link_id = bprintf("%s_DOWN", A_surfxml_link___ctn_id);
     break;
   }
 
@@ -506,27 +507,32 @@ void STag_surfxml_route(void){
 }
 
 void STag_surfxml_ASroute(void){
-  xbt_assert(strlen(A_surfxml_ASroute_src) > 0 || strlen(A_surfxml_ASroute_dst) > 0
-      || strlen(A_surfxml_ASroute_gw_src) > 0 || strlen(A_surfxml_ASroute_gw_dst) > 0,
-      "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
-      A_surfxml_ASroute_src, A_surfxml_ASroute_dst,
-      A_surfxml_ASroute_gw_src,A_surfxml_ASroute_gw_dst);
+  xbt_assert(strlen(A_surfxml_ASroute_src) > 0
+             || strlen(A_surfxml_ASroute_dst) > 0
+             || strlen(A_surfxml_ASroute_gw___src) > 0
+             || strlen(A_surfxml_ASroute_gw___dst) > 0,
+             "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
+             A_surfxml_ASroute_src, A_surfxml_ASroute_dst,
+             A_surfxml_ASroute_gw___src, A_surfxml_ASroute_gw___dst);
   parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
 void STag_surfxml_bypassRoute(void){
-  xbt_assert(strlen(A_surfxml_bypassRoute_src) > 0 || strlen(A_surfxml_bypassRoute_dst) > 0,
-      "Missing end-points while defining bupass route \"%s\"->\"%s\"",
-      A_surfxml_bypassRoute_src, A_surfxml_bypassRoute_dst);
+  xbt_assert(strlen(A_surfxml_bypassRoute_src) > 0
+             || strlen(A_surfxml_bypassRoute_dst) > 0,
+             "Missing end-points while defining bupass route \"%s\"->\"%s\"",
+             A_surfxml_bypassRoute_src, A_surfxml_bypassRoute_dst);
   parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
 void STag_surfxml_bypassASroute(void){
-  xbt_assert(strlen(A_surfxml_bypassASroute_src) > 0 || strlen(A_surfxml_bypassASroute_dst) > 0
-      || strlen(A_surfxml_bypassASroute_gw_src) > 0 || strlen(A_surfxml_bypassASroute_gw_dst) > 0,
-      "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
-      A_surfxml_bypassASroute_src, A_surfxml_bypassASroute_dst,
-      A_surfxml_bypassASroute_gw_src,A_surfxml_bypassASroute_gw_dst);
+  xbt_assert(strlen(A_surfxml_bypassASroute_src) > 0
+             || strlen(A_surfxml_bypassASroute_dst) > 0
+             || strlen(A_surfxml_bypassASroute_gw___src) > 0
+             || strlen(A_surfxml_bypassASroute_gw___dst) > 0,
+             "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
+             A_surfxml_bypassASroute_src, A_surfxml_bypassASroute_dst,
+             A_surfxml_bypassASroute_gw___src,A_surfxml_bypassASroute_gw___dst);
   parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
@@ -566,11 +572,11 @@ void ETag_surfxml_ASroute(void){
     // store the provided name instead of the entity directly (model_rulebased_parse_ASroute knows)
     //
     // This is because the user will provide something like "^AS_(.*)$" instead of the proper name of a given entity
-    ASroute.gw_src = (sg_routing_edge_t) A_surfxml_ASroute_gw_src;
-    ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_ASroute_gw_dst;
+    ASroute.gw_src = (sg_routing_edge_t) A_surfxml_ASroute_gw___src;
+    ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_ASroute_gw___dst;
   } else {
-    ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw_src);
-    ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw_dst);
+    ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___src);
+    ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_ASroute_gw___dst);
   }
 
   ASroute.link_list = parsed_link_list;
@@ -618,11 +624,11 @@ void ETag_surfxml_bypassASroute(void){
     // store the provided name instead of the entity directly (model_rulebased_parse_ASroute knows)
     //
     // This is because the user will provide something like "^AS_(.*)$" instead of the proper name of a given entity
-    ASroute.gw_src = (sg_routing_edge_t) A_surfxml_bypassASroute_gw_src;
-    ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_bypassASroute_gw_dst;
+    ASroute.gw_src = (sg_routing_edge_t) A_surfxml_bypassASroute_gw___src;
+    ASroute.gw_dst = (sg_routing_edge_t) A_surfxml_bypassASroute_gw___dst;
   } else {
-    ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw_src);
-    ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw_dst);
+    ASroute.gw_src = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___src);
+    ASroute.gw_dst = sg_routing_edge_by_name_or_null(A_surfxml_bypassASroute_gw___dst);
   }
 
   sg_platf_new_bypassASroute(&ASroute);
@@ -641,32 +647,32 @@ void ETag_surfxml_trace(void){
   sg_platf_new_trace(&trace);
 }
 
-void STag_surfxml_trace_connect(void){
+void STag_surfxml_trace___connect(void){
   s_sg_platf_trace_connect_cbarg_t trace_connect;
   memset(&trace_connect,0,sizeof(trace_connect));
 
-  trace_connect.element = A_surfxml_trace_connect_element;
-  trace_connect.trace = A_surfxml_trace_connect_trace;
+  trace_connect.element = A_surfxml_trace___connect_element;
+  trace_connect.trace = A_surfxml_trace___connect_trace;
 
-  switch (A_surfxml_trace_connect_kind) {
-  case AU_surfxml_trace_connect_kind:
-  case A_surfxml_trace_connect_kind_POWER:
+  switch (A_surfxml_trace___connect_kind) {
+  case AU_surfxml_trace___connect_kind:
+  case A_surfxml_trace___connect_kind_POWER:
     trace_connect.kind =  SURF_TRACE_CONNECT_KIND_POWER;
     break;
-  case A_surfxml_trace_connect_kind_BANDWIDTH:
+  case A_surfxml_trace___connect_kind_BANDWIDTH:
     trace_connect.kind =  SURF_TRACE_CONNECT_KIND_BANDWIDTH;
     break;
-  case A_surfxml_trace_connect_kind_HOST_AVAIL:
+  case A_surfxml_trace___connect_kind_HOST___AVAIL:
     trace_connect.kind =  SURF_TRACE_CONNECT_KIND_HOST_AVAIL;
     break;
-  case A_surfxml_trace_connect_kind_LATENCY:
+  case A_surfxml_trace___connect_kind_LATENCY:
     trace_connect.kind =  SURF_TRACE_CONNECT_KIND_LATENCY;
     break;
-  case A_surfxml_trace_connect_kind_LINK_AVAIL:
+  case A_surfxml_trace___connect_kind_LINK___AVAIL:
     trace_connect.kind =  SURF_TRACE_CONNECT_KIND_LINK_AVAIL;
     break;
   }
-  sg_platf_new_trace_connect(&trace_connect);
+  sg_platf_trace_connect(&trace_connect);
 }
 
 void STag_surfxml_AS(void){
@@ -694,13 +700,13 @@ void ETag_surfxml_AS(void){
   sg_platf_new_AS_end();
 }
 
-extern int _surf_init_status; /* FIXME: find a proper way to export this at some point */
+extern int _sg_init_status; /* FIXME: find a proper way to export this at some point */
 
 void STag_surfxml_config(void){
   AS_TAG = 0;
   xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
   XBT_DEBUG("START configuration name = %s",A_surfxml_config_id);
-  if (_surf_init_status == 2) {
+  if (_sg_init_status == 2) {
     surf_parse_error("All <config> tags must be given before any platform elements (such as <AS>, <host>, <cluster>, <link>, etc).");
   }
 }
@@ -711,8 +717,8 @@ void ETag_surfxml_config(void){
   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);
+    if(xbt_cfg_is_default_value(_sg_cfg_set, key))
+      xbt_cfg_set_parse(_sg_cfg_set, cfg);
     else
       XBT_INFO("The custom configuration '%s' is already defined by user!",key);
     free(cfg);
@@ -742,15 +748,15 @@ void ETag_surfxml_process(void){
   process.properties = current_property_set;
   process.host = A_surfxml_process_host;
   process.function = A_surfxml_process_function;
-  process.start_time = surf_parse_get_double(A_surfxml_process_start_time);
-  process.kill_time = surf_parse_get_double(A_surfxml_process_kill_time);
+  process.start_time = surf_parse_get_double(A_surfxml_process_start___time);
+  process.kill_time = surf_parse_get_double(A_surfxml_process_kill___time);
 
-  switch (A_surfxml_process_on_failure) {
-  case AU_surfxml_process_on_failure:
-  case A_surfxml_process_on_failure_DIE:
+  switch (A_surfxml_process_on___failure) {
+  case AU_surfxml_process_on___failure:
+  case A_surfxml_process_on___failure_DIE:
     process.on_failure =  SURF_PROCESS_ON_FAILURE_DIE;
     break;
-  case A_surfxml_process_on_failure_RESTART:
+  case A_surfxml_process_on___failure_RESTART:
     process.on_failure =  SURF_PROCESS_ON_FAILURE_RESTART;
     break;
   }
@@ -786,15 +792,15 @@ void ETag_surfxml_gpu(void)
 void ETag_surfxml_prop(void){}
 void STag_surfxml_random(void){}
 void ETag_surfxml_random(void){}
-void ETag_surfxml_trace_connect(void){}
+void ETag_surfxml_trace___connect(void){}
 void STag_surfxml_trace(void){}
 void ETag_surfxml_router(void){}
-void ETag_surfxml_host_link(void){}
+void ETag_surfxml_host___link(void){}
 void ETag_surfxml_cluster(void){}
 void ETag_surfxml_cabinet(void){}
 void ETag_surfxml_peer(void){}
 void STag_surfxml_backbone(void){}
-void ETag_surfxml_link_ctn(void){}
+void ETag_surfxml_link___ctn(void){}
 void ETag_surfxml_argument(void){}
 
 /* Open and Close parse file */
@@ -892,7 +898,7 @@ static void init_randomness(void)
   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_std_deviation = surf_parse_get_double(A_surfxml_random_std___deviation);
   switch (A_surfxml_random_generator) {
   case AU_surfxml_random_generator:
   case A_surfxml_random_generator_NONE:
index e2a61fe..5b45dab 100644 (file)
@@ -296,6 +296,13 @@ tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
                 id, linecount, last_event->delta, event.delta, input);
       }
       last_event->delta = event.delta - last_event->delta;
+    } else {
+      if(event.delta > 0.0){
+        s_tmgr_event_t first_event;
+        first_event.delta=event.delta;
+        first_event.value=-1.0;
+        xbt_dynar_push(trace->s_list.event_list, &first_event);
+      }
     }
     xbt_dynar_push(trace->s_list.event_list, &event);
     last_event =
index 30d3365..fec50a4 100644 (file)
@@ -10,6 +10,7 @@
 #include "surf_private.h"
 #include "storage_private.h"
 #include "surf/surf_resource.h"
+#include "simgrid/sg_config.h"
 
 typedef struct workstation_CLM03 {
   s_surf_resource_t generic_resource;   /* Must remain first to add this to a trace */
@@ -241,6 +242,30 @@ static surf_action_t ws_execute_parallel_task(int workstation_nb,
                                               double *communication_amount,
                                               double rate)
 {
+#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
+  if ((workstation_nb == 1)
+      && (cost_or_zero(communication_amount, 0) == 0.0))
+    return ws_execute(workstation_list[0], computation_amount[0]);
+  else if ((workstation_nb == 1)
+           && (cost_or_zero(computation_amount, 0) == 0.0))
+    return ws_communicate(workstation_list[0], workstation_list[0],communication_amount[0], rate);
+  else if ((workstation_nb == 2)
+             && (cost_or_zero(computation_amount, 0) == 0.0)
+             && (cost_or_zero(computation_amount, 1) == 0.0)) {
+    int i,nb = 0;
+    double value = 0.0;
+
+    for (i = 0; i < workstation_nb * workstation_nb; i++) {
+      if (cost_or_zero(communication_amount, i) > 0.0) {
+        nb++;
+        value = cost_or_zero(communication_amount, i);
+      }
+    }
+    if (nb == 1)
+      return ws_communicate(workstation_list[0], workstation_list[1],value, rate);
+  }
+#undef cost_or_zero
+
   THROW_UNIMPLEMENTED;          /* This model does not implement parallel tasks */
   return NULL;
 }
@@ -423,7 +448,7 @@ static void surf_workstation_model_init_internal(void)
 void surf_workstation_model_init_current_default(void)
 {
   surf_workstation_model_init_internal();
-  xbt_cfg_setdefault_int(_surf_cfg_set, "network/crosstraffic", 1);
+  xbt_cfg_setdefault_int(_sg_cfg_set, "network/crosstraffic", 1);
   surf_cpu_model_init_Cas01();
   surf_network_model_init_LegrandVelho();
 
index a376717..662b384 100644 (file)
@@ -344,7 +344,8 @@ static void ptask_update_resource_state(void *id,
   link_L07_t nw_link = id;
 
   if (nw_link->type == SURF_WORKSTATION_RESOURCE_LINK) {
-    XBT_DEBUG("Updating link %s (%p)", surf_resource_name(nw_link), nw_link);
+    XBT_DEBUG("Updating link %s (%p) with value=%f",
+      surf_resource_name(nw_link), nw_link, value);
     if (event_type == nw_link->bw_event) {
       nw_link->bw_current = value;
       lmm_update_constraint_bound(ptask_maxmin_system, nw_link->constraint,
@@ -889,10 +890,6 @@ static void ptask_model_init_internal(void)
       ptask_link_shared;
   surf_workstation_model->extension.workstation.get_properties =
       surf_resource_properties;
-  surf_workstation_model->extension.workstation.link_create_resource =
-      ptask_link_create_resource;
-  surf_workstation_model->extension.workstation.cpu_create_resource =
-      ptask_cpu_create_resource;
   surf_workstation_model->extension.workstation.add_traces =
       ptask_add_traces;
 
@@ -913,7 +910,6 @@ static void ptask_model_init_internal(void)
   surf_network_model->extension.network.get_link_latency = ptask_get_link_latency;
   surf_network_model->extension.network.link_shared = ptask_link_shared;
   surf_network_model->extension.network.add_traces = NULL;
-  surf_network_model->extension.network.create_resource = NULL;
 }
 
 /**************************************/
index a5a3313..01aa668 100644 (file)
@@ -13,6 +13,7 @@
 
 
 #include "xbt/RngStream.h"
+#include "xbt/sysdep.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -311,14 +312,14 @@ RngStream RngStream_CreateStream (const char name[])
    RngStream g;
    size_t len;
 
-   g = (RngStream) malloc (sizeof (struct RngStream_InfoState));
+   g = (RngStream) xbt_malloc (sizeof (struct RngStream_InfoState));
    if (g == NULL) {
       printf ("RngStream_CreateStream: No more memory\n\n");
       exit (EXIT_FAILURE);
    }
    if (name) {
       len = strlen (name);
-      g->name = (char *) malloc ((len + 1) * sizeof (char));
+      g->name = (char *) xbt_malloc ((len + 1) * sizeof (char));
       strncpy (g->name, name, len + 1);
    } else
       g->name = 0;
@@ -355,7 +356,7 @@ RngStream RngStream_CopyStream (const RngStream src)
      exit (EXIT_FAILURE);
    }
 
-   g = (RngStream) malloc (sizeof (struct RngStream_InfoState));
+   g = (RngStream) xbt_malloc (sizeof (struct RngStream_InfoState));
    if (g == NULL) {
       printf ("RngStream_CopyStream: No more memory\n\n");
       exit (EXIT_FAILURE);
index 898069a..d7e6d49 100644 (file)
@@ -80,7 +80,8 @@ 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, "%s(%d) [%s:%d] %s",
+            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);
   }
@@ -116,7 +117,7 @@ void xbt_ex_setup_backtrace(xbt_ex_t * e) //FIXME: This code could be greatly im
 
   e->bt_strings = NULL;
 
-  if (xbt_binary_name != NULL) /* no binary name, nothing to do */
+  if (xbt_binary_name == NULL) /* no binary name, nothing to do */
     return;
 
   if (e->used <= 1)
index 87418cd..cbe31a1 100644 (file)
@@ -490,7 +490,7 @@ e_xbt_cfgelm_type_t xbt_cfg_get_type(xbt_cfg_t cfg, const char *name)
            "Can't get the type of '%s' since this variable does not exist",
            name);
 
-  XBT_INFO("type in variable = %d", (int)variable->type);
+  XBT_DEBUG("type in variable = %d", (int)variable->type);
 
   return variable->type;
 }
@@ -581,15 +581,8 @@ void xbt_cfg_set(xbt_cfg_t cfg, const char *name, ...)
  * @todo This is a crude manual parser, it should be a proper lexer.
  */
 
-void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options)
-{
-  xbt_ex_t e;
-
-  int i;
-  double d;
-  char *str;
+void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) {
 
-  volatile xbt_cfgelm_t variable = NULL;
   char *optionlist_cpy;
   char *option, *name, *val;
 
@@ -655,85 +648,93 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options)
       XBT_INFO("Configuration change: Set '%s' to '%s'", name, val);
 
     TRY {
-      variable = xbt_dict_get((xbt_dict_t) cfg, name);
-    }
-    CATCH(e) {
-      if (e.category == not_found_error) {
-        xbt_ex_free(e);
-        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;
-        }
-      }
+      xbt_cfg_set_as_string(cfg,name,val);
+    } CATCH_ANONYMOUS {
       free(optionlist_cpy);
       RETHROW;
     }
+  }
+  free(optionlist_cpy);
+}
 
-    TRY {
-      switch (variable->type) {
-      case xbt_cfgelm_string:
-        xbt_cfg_set_string(cfg, name, val);     /* throws */
-        break;
-
-      case xbt_cfgelm_int:
-        i = strtol(val, &val, 0);
-        if (val == NULL) {
-          free(optionlist_cpy);
-          xbt_die("Value of option %s not valid. Should be an integer", name);
-        }
-
-        xbt_cfg_set_int(cfg, name, i);  /* throws */
-        break;
-
-      case xbt_cfgelm_double:
-        d = strtod(val, &val);
-        if (val == NULL) {
-          free(optionlist_cpy);
-          xbt_die("Value of option %s not valid. Should be a double", name);
-        }
-
-        xbt_cfg_set_double(cfg, name, d);       /* throws */
-        break;
-
-      case xbt_cfgelm_peer:
-        str = val;
-        val = strchr(val, ':');
-        if (!val) {
-          free(optionlist_cpy);
-          xbt_die("Value of option %s not valid. Should be an peer (machine:port)",
-                  name);
-        }
-
-        *(val++) = '\0';
-        i = strtol(val, &val, 0);
-        if (val == NULL) {
-          free(optionlist_cpy);
-          xbt_die("Value of option %s not valid. Should be an peer (machine:port)",
-                  name);
-        }
-
-        xbt_cfg_set_peer(cfg, name, str, i);    /* throws */
-        break;
-
-      default:
-        THROWF(unknown_error, 0, "Type of config element %s is not valid.",
-               name);
-      }
+/** @brief Set the value of a variable, using the string representation of that value
+ *
+ * @arg cfg config set to modify
+ * @arg key name of the variable to modify
+ * @arg value string representation of the value to set
+ *
+ * @return the first char after the parsed value in val
+ */
+
+void *xbt_cfg_set_as_string(xbt_cfg_t cfg, const char *key, const char *value) {
+  xbt_ex_t e;
+
+  char *ret;
+  volatile xbt_cfgelm_t variable = NULL;
+  int i;
+  double d;
+  char *str, *val;
+
+
+  TRY {
+    variable = xbt_dict_get((xbt_dict_t) cfg, key);
+  }
+  CATCH(e) {
+    if (e.category == not_found_error) {
+      xbt_ex_free(e);
+      THROWF(not_found_error, 0,
+          "No registered variable corresponding to '%s'.", key);
     }
-    CATCH_ANONYMOUS {
-      free(optionlist_cpy);
-      RETHROW;
+    RETHROW;
+  }
+
+  switch (variable->type) {
+  case xbt_cfgelm_string:
+    xbt_cfg_set_string(cfg, key, value);     /* throws */
+    break;
+
+  case xbt_cfgelm_int:
+    i = strtol(value, &ret, 0);
+    if (value == NULL) {
+      xbt_die("Value of option %s not valid. Should be an integer", key);
+    }
+
+    xbt_cfg_set_int(cfg, key, i);  /* throws */
+    break;
+
+  case xbt_cfgelm_double:
+    d = strtod(value, &ret);
+    if (value == NULL) {
+      xbt_die("Value of option %s not valid. Should be a double", key);
     }
+
+    xbt_cfg_set_double(cfg, key, d);       /* throws */
+    break;
+
+  case xbt_cfgelm_peer:
+    val = xbt_strdup(value);
+    str = val;
+    val = strchr(val, ':');
+    if (!val) {
+      xbt_die("Value of option %s not valid. Should be an peer (machine:port)", key);
+    }
+
+    *(val++) = '\0';
+    i = strtol(val, &ret, 0);
+    if (val == NULL) {
+      xbt_die("Value of option %s not valid. Should be an peer (machine:port)", key);
+    }
+
+    xbt_cfg_set_peer(cfg, key, str, i);    /* throws */
+    free(val);
+    break;
+
+  default:
+    THROWF(unknown_error, 0, "Type of config element %s is not valid.", key);
+    break;
   }
-  free(optionlist_cpy);
 
+  return ret;
 }
 
 /** @brief Set an integer value to \a name within \a cfg if it wasn't changed yet
index 1017b5f..ac2fa9b 100644 (file)
@@ -103,7 +103,6 @@ void xbt_backtrace_display(xbt_ex_t * e)
 
   /* don't fool xbt_ex_free with uninitialized msg field */
   e->msg = NULL;
-  e->remote = 0;
   xbt_ex_free(*e);
 #else
 
@@ -132,9 +131,6 @@ void xbt_ex_display(xbt_ex_t * e)
 {
   char *thrower = NULL;
 
-  if (e->remote)
-    thrower = bprintf(" on host %s(%d)", e->host, e->pid);
-
   fprintf(stderr,
           "** SimGrid: UNCAUGHT EXCEPTION received on %s(%d): category: %s; value: %d\n"
           "** %s\n"
@@ -145,7 +141,7 @@ void xbt_ex_display(xbt_ex_t * e)
   XBT_CRITICAL("%s", e->msg);
   xbt_free(thrower);
 
-  if (!e->remote && !e->bt_strings)
+  if (!e->bt_strings)
     xbt_ex_setup_backtrace(e);
 
 #ifdef HAVE_BACKTRACE
@@ -187,12 +183,6 @@ void xbt_ex_free(xbt_ex_t e)
   int i;
 
   free(e.msg);
-  if (e.remote) {
-    free(e.procname);
-    free(e.file);
-    free(e.func);
-    free(e.host);
-  }
 
   if (e.bt_strings) {
     for (i = 0; i < e.used; i++)
@@ -419,7 +409,7 @@ typedef struct {
 
 static void good_example(void)
 {
-  global_context_t *global_context = malloc(sizeof(global_context_t));
+  global_context_t *global_context = xbt_malloc(sizeof(global_context_t));
 
   /* GOOD_EXAMPLE */
   {                             /*01 */
index 61b8364..50eee15 100644 (file)
@@ -579,8 +579,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);
-  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);
+  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);
 }
index 09e9232..70a9728 100644 (file)
@@ -7,44 +7,12 @@
 #ifndef _XBT_GRAPH_PRIVATE_H
 #define _XBT_GRAPH_PRIVATE_H
 #include "xbt/dynar.h"
+#include "xbt/graph.h"
 
 #define NOT_EXPLORED 0
 #define CURRENTLY_EXPLORING 1
 #define ALREADY_EXPLORED 2
 
-/* Node structure */
-/* typedef struct xbt_node *xbt_node_t; */
-typedef struct xbt_node {
-  xbt_dynar_t out;
-  xbt_dynar_t in;               /* not used when the graph is directed */
-  double position_x;            /* positive value: negative means undefined */
-  double position_y;            /* positive value: negative means undefined */
-  void *data;                   /* user data */
-  void *xbtdata;                /* private xbt data: should be reinitialized at the
-                                   beginning of your algorithm if you need to use it */
-} s_xbt_node_t;
-
-/* edge structure */
-/* typedef struct xbt_edge *xbt_edge_t; */
-typedef struct xbt_edge {
-  xbt_node_t src;
-  xbt_node_t dst;
-  void *data;                   /* user data */
-  void *xbtdata;                /* private xbt data: should be reinitialized at the
-                                   beginning of your algorithm if you need to use it */
-  double length;                /* positive value: negative means undefined */
-} s_xbt_edge_t;
-
-/* Graph structure */
-/* typedef struct xbt_graph *xbt_graph_t; */
-typedef struct xbt_graph {
-  xbt_dynar_t nodes;
-  xbt_dynar_t edges;
-  unsigned short int directed;
-  void *data;                   /* user data */
-  void *xbtdata;                /* private xbt data: should be reinitialized at the
-                                   beginning of your algorithm if you need to use it */
-} s_xbt_graph_t;
 void xbt_floyd_algorithm(xbt_graph_t g, double *adj, double *d,
                          xbt_node_t * p);
 void xbt_graph_depth_visit(xbt_graph_t g, xbt_node_t n,
index 59d9895..9581d79 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.69 2012/12/20 00:13:40 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.69 2012/12/20 00:13:40 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)
-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)
+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
@@ -1245,13 +1257,24 @@ static int ck_ilimit()
 #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;
+   BUFFERSET(*pp);
+   if (c) {
+      const char *s = strchr(text, c), *e = strrchr(text, c);
+      assert(s && e && s <= e);
+      ++s;
+      while (s < e) {
+        if (isspace(*s)) {
+           BUFFERPUTC(' ');
+           do ++s; while (s < e && isspace(*s));
+        } else
+          BUFFERPUTC(*s++);
+      }
+   } else {
+      const char *s = text;
+      while (*s)
+       BUFFERPUTC(*s++);
+   }
+   BUFFERDONE;
 }
 #endif
 
@@ -1764,6 +1787,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 +1878,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;
-  AX_graphxml_node_position_x = 1;
-  AX_graphxml_node_position_y = 6;
+  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 +1894,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 +2014,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 +2032,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
index f024b08..c795b76 100644 (file)
@@ -96,7 +96,7 @@ void xbt_heap_push(xbt_heap_t H, void *content, double key)
   if (count > size) {
     H->size = (size << 1) + 1;
     H->items =
-        (void *) realloc(H->items,
+        (void *) xbt_realloc(H->items,
                          (H->size) * sizeof(struct xbt_heap_item));
   }
 
@@ -136,7 +136,7 @@ void *xbt_heap_pop(xbt_heap_t H)
   if (H->count < size >> 2 && size > 16) {
     size = (size >> 1) + 1;
     H->items =
-        (void *) realloc(items,
+        (void *) xbt_realloc(items,
                          size * sizeof(struct xbt_heap_item));
     H->size = size;
   }
index 0736592..94f7c60 100644 (file)
@@ -588,7 +588,6 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(instr_paje_values);
   XBT_LOG_CONNECT(instr_resource);
   XBT_LOG_CONNECT(instr_routing);
-  XBT_LOG_CONNECT(instr_smpi);
   XBT_LOG_CONNECT(instr_surf);
 #endif
 
index e4abe0d..1088355 100644 (file)
@@ -38,8 +38,30 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_mallocator, xbt, "Mallocators");
  * some mallocators internally...
  */
 
-
+/* Value != 0 when the framework configuration is done.  Value > 1 if the
+ * mallocators should be protected from concurrent accesses.  */
 static int initialization_done = 0;
+
+static XBT_INLINE void lock_reset(xbt_mallocator_t m)
+{
+  m->lock = 0;
+}
+
+static XBT_INLINE void lock_acquire(xbt_mallocator_t m)
+{
+  if (initialization_done > 1) {
+    int *lock = &m->lock;
+    while (__sync_lock_test_and_set(lock, 1))
+      /* nop */;
+  }
+}
+
+static XBT_INLINE void lock_release(xbt_mallocator_t m)
+{
+  if (initialization_done > 1)
+    __sync_lock_release(&m->lock);
+}
+
 /**
  * This function must be called once the framework configuration is done. If not,
  * mallocators will never get used. Check the implementation notes in
@@ -48,16 +70,17 @@ static int initialization_done = 0;
  * For example, surf_config uses this function to tell to the mallocators that
  * the simgrid
  * configuration is now finished and that it can create them if not done yet */
-void xbt_mallocator_initialization_is_done(void) {
-  initialization_done = 1;
+void xbt_mallocator_initialization_is_done(int protect)
+{
+  initialization_done = protect ? 2 : 1;
 }
 
 /** used by the module to know if it's time to activate the mallocators yet */
 static XBT_INLINE int xbt_mallocator_is_active(void) {
-#ifndef MALLOCATOR_COMPILED_IN
-  return 0;
-#else
+#if MALLOCATOR_COMPILED_IN
   return initialization_done && !MC_is_active();
+#else
+  return 0;
 #endif
 }
 
@@ -120,7 +143,6 @@ void xbt_mallocator_free(xbt_mallocator_t m)
     m->free_f(m->objects[i]);
   }
   xbt_free(m->objects);
-  xbt_os_mutex_destroy(m->mutex);
   xbt_free(m);
 }
 
@@ -145,7 +167,7 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
   void *object;
 
   if (m->objects != NULL) { // this mallocator is active, stop thinking and go for it!
-    xbt_os_mutex_acquire(m->mutex);
+    lock_acquire(m);
     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) */
@@ -163,12 +185,12 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
     /* 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];
-    xbt_os_mutex_release(m->mutex);
+    lock_release(m);
   } else {
     if (xbt_mallocator_is_active()) {
       // We have to switch this mallocator from inactive to active (and then get an object)
       m->objects = xbt_new0(void *, m->max_size);
-      m->mutex = xbt_os_mutex_init();
+      lock_reset(m);
       return xbt_mallocator_get(m);
     } else {
       object = m->new_f();
@@ -196,16 +218,16 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
 void xbt_mallocator_release(xbt_mallocator_t m, void *object)
 {
   if (m->objects != NULL) { // Go for it
-    xbt_os_mutex_acquire(m->mutex);
+    lock_acquire(m);
     if (m->current_size < m->max_size) {
       /* there is enough place to push the object */
       /* XBT_DEBUG
          ("Store deleted object in mallocator %p for further use (size:%d/%d)",
          m, m->current_size, m->max_size); */
       m->objects[m->current_size++] = object;
-      xbt_os_mutex_release(m->mutex);
+      lock_release(m);
     } else {
-      xbt_os_mutex_release(m->mutex);
+      lock_release(m);
       /* 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); */
@@ -215,7 +237,7 @@ void xbt_mallocator_release(xbt_mallocator_t m, void *object)
     if (xbt_mallocator_is_active()) {
       // We have to switch this mallocator from inactive to active (and then store that object)
       m->objects = xbt_new0(void *, m->max_size);
-      m->mutex = xbt_os_mutex_init();
+      lock_reset(m);
       xbt_mallocator_release(m,object);
     } else {
       m->free_f(object);
index 12cccbf..e5e918c 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifndef _XBT_MALLOCATOR_PRIVATE_H__
 #define _XBT_MALLOCATOR_PRIVATE_H__
-#include "xbt/xbt_os_thread.h"
+
 typedef struct s_xbt_mallocator {
   void **objects;               /* objects stored by the mallocator and available for the user */
   int current_size;             /* number of objects currently stored */
@@ -16,7 +16,7 @@ typedef struct s_xbt_mallocator {
   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 */
   void_f_pvoid_t reset_f;       /* function to call when an object is released by the user */
-  xbt_os_mutex_t mutex;         /* mutex to ensure the mallocator is thread-safe */
+  int lock;                     /* lock to ensure the mallocator is thread-safe */
 } s_xbt_mallocator_t;
 
 #endif                          /* _XBT_MALLOCATOR_PRIVATE_H__ */
index af83720..e9031eb 100644 (file)
@@ -157,7 +157,8 @@ void mfree(struct mdesc *mdp, void *ptr)
 
     /* Set size used in the fragment to -1 */
     mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = -1;
-
+    mdp->heapinfo[block].busy_frag.ignore[frag_nb] = 0;
+    
 //    fprintf(stderr,"nfree:%zu capa:%d\n", mdp->heapinfo[block].busy_frag.nfree,(BLOCKSIZE >> type));
     if (mdp->heapinfo[block].busy_frag.nfree ==
         (BLOCKSIZE >> type) - 1) {
@@ -168,7 +169,8 @@ void mfree(struct mdesc *mdp, void *ptr)
       mdp->heapinfo[block].type = 0;
       mdp->heapinfo[block].busy_block.size = 1;
       mdp->heapinfo[block].busy_block.busy_size = 0;
-      
+      mdp->heapinfo[block].busy_block.ignore = 0;
+            
       /* Keep the statistics accurate.  */
       mdp -> heapstats.chunks_used++;
       mdp -> heapstats.bytes_used += BLOCKSIZE;
@@ -192,3 +194,4 @@ void mfree(struct mdesc *mdp, void *ptr)
     break;
   }
 }
+
index e435f7f..ade101a 100644 (file)
@@ -19,6 +19,6 @@
 #include "mmalloc.c"
 #include "mrealloc.c"
 #include "mmorecore.c"
-#include "mm_module.c"
 #include "mm_legacy.c"
+#include "mm_module.c"
 #include "mm_diff.c"
index 9ffeac1..7064146 100644 (file)
@@ -34,84 +34,82 @@ static char* is_stack(void *address);
 
 void mmalloc_backtrace_block_display(void* heapinfo, int block){
 
-  xbt_ex_t e;
-
-  if (((malloc_info *)heapinfo)[block].busy_block.bt_size == 0) {
-    fprintf(stderr, "No backtrace available for that block, sorry.\n");
-    return;
-  }
-
-  memcpy(&e.bt,&(((malloc_info *)heapinfo)[block].busy_block.bt),sizeof(void*)*XBT_BACKTRACE_SIZE);
-  e.used = ((malloc_info *)heapinfo)[block].busy_block.bt_size;
-
-  xbt_ex_setup_backtrace(&e);
-  if (e.used == 0) {
-    fprintf(stderr, "(backtrace not set)\n");
-  } else if (e.bt_strings == NULL) {
-    fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
-  } else {
-    int i;
-
-    fprintf(stderr, "Backtrace of where the block %d was malloced (%d frames):\n", block ,e.used);
-    for (i = 0; i < e.used; i++)       /* no need to display "xbt_backtrace_display" */{
-      fprintf(stderr, "%d ---> %s\n",i, e.bt_strings[i] + 4);
-    }
-  }
-
+  /* xbt_ex_t e; */
+
+  /* if (((malloc_info *)heapinfo)[block].busy_block.bt_size == 0) { */
+  /*   fprintf(stderr, "No backtrace available for that block, sorry.\n"); */
+  /*   return; */
+  /* } */
+
+  /* memcpy(&e.bt,&(((malloc_info *)heapinfo)[block].busy_block.bt),sizeof(void*)*XBT_BACKTRACE_SIZE); */
+  /* e.used = ((malloc_info *)heapinfo)[block].busy_block.bt_size; */
+
+  /* xbt_ex_setup_backtrace(&e); */
+  /* if (e.used == 0) { */
+  /*   fprintf(stderr, "(backtrace not set)\n"); */
+  /* } else if (e.bt_strings == NULL) { */
+  /*   fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet"); */
+  /* } else { */
+  /*   int i; */
+
+  /*   fprintf(stderr, "Backtrace of where the block %d was malloced (%d frames):\n", block ,e.used); */
+  /*   for (i = 0; i < e.used; i++)       /\* no need to display "xbt_backtrace_display" *\/{ */
+  /*     fprintf(stderr, "%d ---> %s\n",i, e.bt_strings[i] + 4); */
+  /*   } */
+  /* } */
 }
 
 void mmalloc_backtrace_fragment_display(void* heapinfo, int block, int frag){
 
-  xbt_ex_t e;
+  /* xbt_ex_t e; */
 
-  memcpy(&e.bt,&(((malloc_info *)heapinfo)[block].busy_frag.bt[frag]),sizeof(void*)*XBT_BACKTRACE_SIZE);
-  e.used = XBT_BACKTRACE_SIZE;
+  /* memcpy(&e.bt,&(((malloc_info *)heapinfo)[block].busy_frag.bt[frag]),sizeof(void*)*XBT_BACKTRACE_SIZE); */
+  /* e.used = XBT_BACKTRACE_SIZE; */
 
-  xbt_ex_setup_backtrace(&e);
-  if (e.used == 0) {
-    fprintf(stderr, "(backtrace not set)\n");
-  } else if (e.bt_strings == NULL) {
-    fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
-  } else {
-    int i;
+  /* xbt_ex_setup_backtrace(&e); */
+  /* if (e.used == 0) { */
+  /*   fprintf(stderr, "(backtrace not set)\n"); */
+  /* } else if (e.bt_strings == NULL) { */
+  /*   fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet"); */
+  /* } else { */
+  /*   int i; */
 
-    fprintf(stderr, "Backtrace of where the fragment %d in block %d was malloced (%d frames):\n", frag, block ,e.used);
-    for (i = 0; i < e.used; i++)       /* no need to display "xbt_backtrace_display" */{
-      fprintf(stderr, "%d ---> %s\n",i, e.bt_strings[i] + 4);
-    }
-  }
+  /*   fprintf(stderr, "Backtrace of where the fragment %d in block %d was malloced (%d frames):\n", frag, block ,e.used); */
+  /*   for (i = 0; i < e.used; i++)       /\* no need to display "xbt_backtrace_display" *\/{ */
+  /*     fprintf(stderr, "%d ---> %s\n",i, e.bt_strings[i] + 4); */
+  /*   } */
+  /* } */
 
 }
 
 void mmalloc_backtrace_display(void *addr){
 
-  size_t block, frag_nb;
-  int type;
+  /* size_t block, frag_nb; */
+  /* int type; */
   
-  xbt_mheap_t heap = __mmalloc_current_heap ?: (xbt_mheap_t) mmalloc_preinit();
-
-  block = (((char*) (addr) - (char*) heap -> heapbase) / BLOCKSIZE + 1);
-
-  type = heap->heapinfo[block].type;
-
-  switch(type){
-  case -1 : /* Free block */
-    fprintf(stderr, "Asked to display the backtrace of a block that is free. I'm puzzled\n");
-    xbt_abort();
-    break; 
-  case 0: /* Large block */
-    mmalloc_backtrace_block_display(heap->heapinfo, block);
-    break;
-  default: /* Fragmented block */
-    frag_nb = RESIDUAL(addr, BLOCKSIZE) >> type;
-    if(heap->heapinfo[block].busy_frag.frag_size[frag_nb] == -1){
-      fprintf(stderr , "Asked to display the backtrace of a fragment that is free. I'm puzzled\n");
-      xbt_abort();
-    }
-    mmalloc_backtrace_fragment_display(heap->heapinfo, block, frag_nb);
-    break;
-  }
-
+  /* xbt_mheap_t heap = __mmalloc_current_heap ?: (xbt_mheap_t) mmalloc_preinit(); */
+
+  /* block = (((char*) (addr) - (char*) heap -> heapbase) / BLOCKSIZE + 1); */
+
+  /* type = heap->heapinfo[block].type; */
+
+  /* switch(type){ */
+  /* case -1 : /\* Free block *\/ */
+  /*   fprintf(stderr, "Asked to display the backtrace of a block that is free. I'm puzzled\n"); */
+  /*   xbt_abort(); */
+  /*   break;  */
+  /* case 0: /\* Large block *\/ */
+  /*   mmalloc_backtrace_block_display(heap->heapinfo, block); */
+  /*   break; */
+  /* default: /\* Fragmented block *\/ */
+  /*   frag_nb = RESIDUAL(addr, BLOCKSIZE) >> type; */
+  /*   if(heap->heapinfo[block].busy_frag.frag_size[frag_nb] == -1){ */
+  /*     fprintf(stderr , "Asked to display the backtrace of a fragment that is free. I'm puzzled\n"); */
+  /*     xbt_abort(); */
+  /*   } */
+  /*   mmalloc_backtrace_fragment_display(heap->heapinfo, block, frag_nb); */
+  /*   break; */
+  /* } */
 }
 
 
@@ -157,35 +155,6 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
 
   int equal, res_compare = 0;
 
-  /* Init equal information */
-  i1 = 1;
-
-  while(i1<=heaplimit){
-    if(heapinfo1[i1].type == 0){
-      heapinfo1[i1].busy_block.equal_to = NULL;
-    }
-    if(heapinfo1[i1].type > 0){
-      for(j1=0; j1 < (size_t) (BLOCKSIZE >> heapinfo1[i1].type); j1++){
-        heapinfo1[i1].busy_frag.equal_to[j1] = NULL;
-      }
-    }
-    i1++; 
-  }
-
-  i2 = 1;
-
-  while(i2<=heaplimit){
-    if(heapinfo2[i2].type == 0){
-      heapinfo2[i2].busy_block.equal_to = NULL;
-    }
-    if(heapinfo2[i2].type > 0){
-      for(j2=0; j2 < (size_t) (BLOCKSIZE >> heapinfo2[i2].type); j2++){
-        heapinfo2[i2].busy_frag.equal_to[j2] = NULL;
-      }
-    }
-    i2++; 
-  }
-
   /* Check busy blocks*/
 
   i1 = 1;
@@ -204,7 +173,7 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
 
     if(heapinfo1[i1].type == 0){  /* Large block */
       
-      if((stack_name = is_stack(real_addr_block1)) != NULL){
+      if((xbt_dynar_length(*stack1) < xbt_dynar_length(stacks_areas)) && ((stack_name = is_stack(real_addr_block1)) != NULL)){
         stack_region_t stack = xbt_new0(s_stack_region_t, 1);
         stack->address = addr_block1;
         stack->process_name = strdup(stack_name);
@@ -237,7 +206,7 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
             addr_block2 = ((void*) (((ADDR2UINT(current_block)) - 1) * BLOCKSIZE + (char*)heapbase2));
             real_addr_block2 = (char*)((xbt_mheap_t)s_heap)->heapbase + (((char *)addr_block2) - (char *)heapbase2);
           
-            if((stack_name = is_stack(real_addr_block2)) != NULL){
+            if((xbt_dynar_length(*stack2) < xbt_dynar_length(stacks_areas)) && ((stack_name = is_stack(real_addr_block2)) != NULL)){
               stack_region_t stack = xbt_new0(s_stack_region_t, 1);
               stack->address = addr_block2;
               stack->process_name = strdup(stack_name);
@@ -249,11 +218,8 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
             add_heap_area_pair(previous, current_block, -1, current_block, -1);
         
             if(res_compare != -1){
-              if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-                if(in_mc_comparison_ignore((int)current_block, -1))
-                  res_compare = compare_area(addr_block1, addr_block2, heapinfo1[current_block].busy_block.busy_size, previous, 1);
-                else
-                  res_compare = compare_area(addr_block1, addr_block2, heapinfo1[current_block].busy_block.busy_size, previous, 0);
+              if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && heapinfo1[current_block].busy_block.ignore == 1){
+                res_compare = compare_area(addr_block1, addr_block2, heapinfo1[current_block].busy_block.busy_size, previous, 1);
               }else{
                 res_compare = compare_area(addr_block1, addr_block2, heapinfo1[current_block].busy_block.busy_size, previous, 0);
               }
@@ -282,7 +248,7 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
         addr_block2 = ((void*) (((ADDR2UINT(i2)) - 1) * BLOCKSIZE + (char*)heapbase2));        
         real_addr_block2 = (char*)((xbt_mheap_t)s_heap)->heapbase + (((char *)addr_block2) - (char *)heapbase2);
         
-        if((stack_name = is_stack(real_addr_block2)) != NULL){
+        if((xbt_dynar_length(*stack2) < xbt_dynar_length(stacks_areas)) && ((stack_name = is_stack(real_addr_block2)) != NULL)){
           stack_region_t stack = xbt_new0(s_stack_region_t, 1);
           stack->address = addr_block2;
           stack->process_name = strdup(stack_name);
@@ -320,11 +286,8 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
         add_heap_area_pair(previous, i1, -1, i2, -1);
         
         if(res_compare != -1){
-          if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-            if(in_mc_comparison_ignore((int)i1, -1))
-              res_compare = compare_area(addr_block1, addr_block2, heapinfo1[i1].busy_block.busy_size, previous, 1);
-            else
-              res_compare = compare_area(addr_block1, addr_block2, heapinfo1[i1].busy_block.busy_size, previous, 0);
+          if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && heapinfo1[i1].busy_block.ignore == 1){
+            res_compare = compare_area(addr_block1, addr_block2, heapinfo1[i1].busy_block.busy_size, previous, 1);
           }else{
             res_compare = compare_area(addr_block1, addr_block2, heapinfo1[i1].busy_block.busy_size, previous, 0);
           }
@@ -378,11 +341,8 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
                
                 add_heap_area_pair(previous, current_block, current_fragment, current_block, current_fragment);
             
-                if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-                  if(in_mc_comparison_ignore((int)current_block, (int)current_fragment))
-                    res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[current_block].busy_frag.frag_size[current_fragment], previous, 1);
-                  else
-                    res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[current_block].busy_frag.frag_size[current_fragment], previous, 0);
+                if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && (heapinfo1[current_block].busy_frag.ignore[current_fragment] == 1)){
+                  res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[current_block].busy_frag.frag_size[current_fragment], previous, 1);
                 }else{
                   res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[current_block].busy_frag.frag_size[current_fragment], previous, 0);
                 }
@@ -397,7 +357,6 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
               }
 
             }
-
         }
 
         while(i2 <= heaplimit && !equal){
@@ -425,18 +384,16 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
             /* Comparison */
             add_heap_area_pair(previous, i1, j1, i2, j2);
             
-            if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-              if(in_mc_comparison_ignore((int)i1, (int)j1))
-                res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[i1].busy_frag.frag_size[j1], previous, 1);
-              else
-                res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[i1].busy_frag.frag_size[j1], previous, 0);
+            if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && (heapinfo1[i1].busy_frag.ignore[j1] == 1)){
+              res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[i1].busy_frag.frag_size[j1], previous, 1);
             }else{
               res_compare = compare_area(addr_frag1, addr_frag2, heapinfo1[i1].busy_frag.frag_size[j1], previous, 0);
             }
-
+            
             if(res_compare == 0){
               equal = 1;
               match_equals(previous, equals);
+              xbt_dynar_reset(previous);
               break;
             }
 
@@ -460,20 +417,20 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
   size_t i = 1, j = 0;
   int nb_diff1 = 0, nb_diff2 = 0;
  
-  while(i<heaplimit){
+  while(i<=heaplimit){
     if(heapinfo1[i].type == 0){
       if(heapinfo1[i].busy_block.busy_size > 0){
         if(heapinfo1[i].busy_block.equal_to == NULL){
           if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
             addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase1));
             XBT_DEBUG("Block %zu (%p) not found (size used = %zu)", i, addr_block1, heapinfo1[i].busy_block.busy_size);
-            mmalloc_backtrace_block_display((void*)heapinfo1, i);
+            //mmalloc_backtrace_block_display((void*)heapinfo1, i);
           }
           nb_diff1++;
-        }else{
-          xbt_free(heapinfo1[i].busy_block.equal_to);
         }
       }
+      xbt_free(heapinfo1[i].busy_block.equal_to);
+      heapinfo1[i].busy_block.equal_to = NULL;
     }
     if(heapinfo1[i].type > 0){
       addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase1));
@@ -483,16 +440,15 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
             if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
               addr_frag1 = (void*) ((char *)addr_block1 + (j << heapinfo1[i].type));
               XBT_DEBUG("Block %zu, Fragment %zu (%p) not found (size used = %d)", i, j, addr_frag1, heapinfo1[i].busy_frag.frag_size[j]);
-              mmalloc_backtrace_fragment_display((void*)heapinfo1, i, j);
+              //mmalloc_backtrace_fragment_display((void*)heapinfo1, i, j);
             }
             nb_diff1++;
-          }else{
-            xbt_free(heapinfo1[i].busy_frag.equal_to[j]);
           }
         }
+        xbt_free(heapinfo1[i].busy_frag.equal_to[j]);
+        heapinfo1[i].busy_frag.equal_to[j] = NULL;
       }
     }
-    
     i++; 
   }
 
@@ -500,20 +456,20 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
 
   i = 1;
 
-  while(i<heaplimit){
+  while(i<=heaplimit){
     if(heapinfo2[i].type == 0){
       if(heapinfo2[i].busy_block.busy_size > 0){
         if(heapinfo2[i].busy_block.equal_to == NULL){
           if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
             addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase2));
             XBT_DEBUG("Block %zu (%p) not found (size used = %zu)", i, addr_block2, heapinfo2[i].busy_block.busy_size);
-            mmalloc_backtrace_block_display((void*)heapinfo2, i);
+            //mmalloc_backtrace_block_display((void*)heapinfo2, i);
           }
           nb_diff2++;
-        }else{
-          xbt_free(heapinfo2[i].busy_block.equal_to);
         }
       }
+      xbt_free(heapinfo2[i].busy_block.equal_to);
+      heapinfo2[i].busy_block.equal_to = NULL;
     }
     if(heapinfo2[i].type > 0){
       addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase2));
@@ -523,13 +479,13 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
             if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
               addr_frag2 = (void*) ((char *)addr_block2 + (j << heapinfo2[i].type));
               XBT_DEBUG( "Block %zu, Fragment %zu (%p) not found (size used = %d)", i, j, addr_frag2, heapinfo2[i].busy_frag.frag_size[j]);
-              mmalloc_backtrace_fragment_display((void*)heapinfo2, i, j);
+              //mmalloc_backtrace_fragment_display((void*)heapinfo2, i, j);
             }
             nb_diff2++;
-          }else{
-            xbt_free(heapinfo2[i].busy_frag.equal_to[j]);
           }
         }
+        xbt_free(heapinfo2[i].busy_frag.equal_to[j]);
+        heapinfo2[i].busy_frag.equal_to[j] = NULL;
       }
     }
     i++; 
@@ -544,7 +500,6 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
   heaplimit = 0, heapsize1 = 0, heapsize2 = 0;
 
   return ((nb_diff1 > 0) || (nb_diff2 > 0));
-
 }
 
 static heap_area_t new_heap_area(int block, int fragment){
@@ -659,11 +614,8 @@ static int compare_area(void *area1, void* area2, size_t size, xbt_dynar_t previ
 
           if(add_heap_area_pair(previous, block_pointed1, -1, block_pointed2, -1)){
 
-            if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-              if(in_mc_comparison_ignore(block_pointed1, -1))
-                res_compare = compare_area(addr_block_pointed1, addr_block_pointed2, heapinfo1[block_pointed1].busy_block.busy_size, previous, 1);
-              else
-                res_compare = compare_area(addr_block_pointed1, addr_block_pointed2, heapinfo1[block_pointed1].busy_block.busy_size, previous, 0);
+            if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && (heapinfo1[block_pointed1].busy_block.ignore == 1)){
+              res_compare = compare_area(addr_block_pointed1, addr_block_pointed2, heapinfo1[block_pointed1].busy_block.busy_size, previous, 1);
             }else{
               res_compare = compare_area(addr_block_pointed1, addr_block_pointed2, heapinfo1[block_pointed1].busy_block.busy_size, previous, 0);
             }
@@ -687,11 +639,8 @@ static int compare_area(void *area1, void* area2, size_t size, xbt_dynar_t previ
 
           if(add_heap_area_pair(previous, block_pointed1, frag_pointed1, block_pointed2, frag_pointed2)){
 
-            if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-              if(in_mc_comparison_ignore(block_pointed1, frag_pointed1))
-                res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 1);
-              else
-                res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 0);
+            if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && (heapinfo1[block_pointed1].busy_frag.ignore[frag_pointed1] == 1)){
+              res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 1);
             }else{
               res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 0);
             }
@@ -721,11 +670,8 @@ static int compare_area(void *area1, void* area2, size_t size, xbt_dynar_t previ
 
           if(add_heap_area_pair(previous, block_pointed1, frag_pointed1, block_pointed2, frag_pointed2)){
 
-            if(ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)){
-              if(in_mc_comparison_ignore(block_pointed1, frag_pointed1))
-                res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 1);
-              else
-                res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 0);
+            if((ignore_done < xbt_dynar_length(mc_heap_comparison_ignore)) && (heapinfo1[block_pointed1].busy_frag.ignore[frag_pointed1] == 1)){
+              res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 1);
             }else{
               res_compare = compare_area(addr_frag_pointed1, addr_frag_pointed2, heapinfo1[block_pointed1].busy_frag.frag_size[frag_pointed1], previous, 0);
             }
@@ -757,7 +703,7 @@ static int compare_area(void *area1, void* area2, size_t size, xbt_dynar_t previ
 
 static void heap_area_pair_free(heap_area_pair_t pair){
   if (pair){
-    free(pair);
+    xbt_free(pair);
     pair = NULL;
   }
 }
@@ -818,16 +764,16 @@ static void match_equals(xbt_dynar_t list, xbt_dynar_t *equals){
       if(heapinfo1[current_pair->block1].busy_frag.equal_to[current_pair->fragment1] != NULL){    
         remove_heap_equality(equals, 1, real_addr_frag1);
         previous_area = heapinfo1[current_pair->block1].busy_frag.equal_to[current_pair->fragment1];
-        xbt_free( heapinfo2[previous_area->block].busy_frag.equal_to[previous_area->fragment]);
+        xbt_free(heapinfo2[previous_area->block].busy_frag.equal_to[previous_area->fragment]);
         heapinfo2[previous_area->block].busy_frag.equal_to[previous_area->fragment] = NULL;
-        xbt_free(heapinfo1[current_pair->block1].busy_frag.equal_to[current_pair->fragment1]); 
+        xbt_free(previous_area); 
       }
       if(heapinfo2[current_pair->block2].busy_frag.equal_to[current_pair->fragment2] != NULL){        
         remove_heap_equality(equals, 2, real_addr_frag2); 
         previous_area = heapinfo2[current_pair->block2].busy_frag.equal_to[current_pair->fragment2];
         xbt_free(heapinfo1[previous_area->block].busy_frag.equal_to[previous_area->fragment]);
         heapinfo1[previous_area->block].busy_frag.equal_to[previous_area->fragment] = NULL;
-        xbt_free(heapinfo2[current_pair->block2].busy_frag.equal_to[current_pair->fragment2]);
+        xbt_free(previous_area);
       }
       
       if(real_addr_frag1 != real_addr_frag2)
@@ -846,14 +792,14 @@ static void match_equals(xbt_dynar_t list, xbt_dynar_t *equals){
         previous_area = heapinfo1[current_pair->block1].busy_block.equal_to;
         xbt_free(heapinfo2[previous_area->block].busy_block.equal_to);
         heapinfo2[previous_area->block].busy_block.equal_to = NULL; 
-        xbt_free(heapinfo1[current_pair->block1].busy_block.equal_to);
+        xbt_free(previous_area);
       }
       if(heapinfo2[current_pair->block2].busy_block.equal_to != NULL){
         remove_heap_equality(equals, 2, real_addr_block2);
         previous_area = heapinfo2[current_pair->block2].busy_block.equal_to;
         xbt_free(heapinfo1[previous_area->block].busy_block.equal_to);
         heapinfo1[previous_area->block].busy_block.equal_to = NULL;
-        xbt_free(heapinfo2[current_pair->block2].busy_block.equal_to);
+        xbt_free(previous_area);
       }
       
       if(real_addr_block1 != real_addr_block2)
@@ -996,7 +942,7 @@ int mmalloc_linear_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2){
   
 }
 
-static char * is_stack(void *address){
+static char* is_stack(void *address){
   unsigned int cursor = 0;
   stack_region_t stack;
 
@@ -1094,7 +1040,6 @@ static void remove_heap_equality(xbt_dynar_t *equals, int address, void *a){
       xbt_dynar_remove_at(*equals, cursor, NULL);
 
   }
-
   
 }
 
index 9ae3771..e92b122 100644 (file)
@@ -10,6 +10,7 @@
 #include "internal_config.h"
 #include <math.h>
 
+//#define MM_LEGACY_VERBOSE 1 /* define this to see which version of malloc gets used */
 
 /* The mmalloc() package can use a single implicit malloc descriptor
    for mmalloc/mrealloc/mfree operations which do not supply an explicit
@@ -30,7 +31,124 @@ void mmalloc_set_current_heap(xbt_mheap_t new_heap)
   __mmalloc_current_heap = new_heap;
 }
 
+
 #ifdef MMALLOC_WANT_OVERRIDE_LEGACY
+#ifdef HAVE_GNU_LD
+
+#undef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#include <dlfcn.h>
+
+static void * (*real_malloc) (size_t);
+static void * (*real_realloc) (void*,size_t);
+static void * (*real_free) (void*);
+
+static void mm_gnuld_legacy_init(void) { /* This function is called from mmalloc_preinit(); it works even if it's static because all mm is in mm.c */
+  real_malloc = (void * (*) (size_t)) dlsym(RTLD_NEXT, "malloc");
+  real_realloc = (void * (*) (void*,size_t)) dlsym(RTLD_NEXT, "realloc");
+  real_free = (void * (*) (void*)) dlsym(RTLD_NEXT, "free");
+  __mmalloc_current_heap = __mmalloc_default_mdp;
+}
+
+/* Hello pimple!
+ * DL needs some memory while resolving the malloc symbol, that is somehow problematic
+ * To that extend, we have a little area here living in .BSS that we return if asked for memory before the malloc is resolved.
+ */
+int allocated_junk=0; /* keep track of whether our little area was already given to someone */
+char junkarea[512];
+
+/* This version use mmalloc if there is a current heap, or the legacy implem if not */
+void *malloc(size_t n) {
+  xbt_mheap_t mdp = __mmalloc_current_heap;
+  void *ret;
+#ifdef MM_LEGACY_VERBOSE
+  static int warned_raw = 0;
+  static int warned_mmalloc = 0;
+#endif
+
+  if (mdp) {
+    LOCK(mdp);
+    ret = mmalloc(mdp, n);
+    UNLOCK(mdp);
+#ifdef MM_LEGACY_VERBOSE
+    if (!warned_mmalloc) {
+      fprintf(stderr,"Using mmalloc; enabling the model-checker in cmake may have a bad impact on your simulation performance\n");
+      warned_mmalloc = 1;
+    }
+#endif
+  } else {
+    if (!real_malloc) {
+      if (allocated_junk) {
+        fprintf(stderr,
+            "Panic: real malloc symbol not resolved yet, and I already gave my little private memory chunk away. "
+            "Damn LD, we must extend our code to have several such areas.\n");
+        exit(1);
+      } else if (n>512) {
+        fprintf(stderr,
+            "Panic: real malloc symbol not resolved yet, and I need %zu bytes while my little private memory chunk is only 512 bytes wide. "
+            "Damn LD, we must fix our code to extend this area.\n",n);
+        exit(1);
+      } else {
+        allocated_junk = 1;
+        return junkarea;
+      }
+    }
+#ifdef MM_LEGACY_VERBOSE
+    if (!warned_raw) {
+      fprintf(stderr,"Using system malloc after interception; you seem to be currently model-checking\n");
+      warned_raw = 1;
+    }
+#endif
+    ret = real_malloc(n);
+  }
+  return ret;
+}
+
+
+void *calloc(size_t nmemb, size_t size)
+{
+  void *ret = malloc(nmemb*size);
+  memset(ret, 0, nmemb * size);
+  return ret;
+}
+
+void *realloc(void *p, size_t s)
+{
+  xbt_mheap_t mdp = __mmalloc_current_heap;
+  void *ret;
+
+  if (mdp) {
+    LOCK(mdp);
+    ret = mrealloc(mdp, p, s);
+    UNLOCK(mdp);
+  } else {
+    ret = real_realloc(p,s);
+  }
+
+  return ret;
+}
+
+void free(void *p)
+{
+  if (p==NULL)
+    return;
+  if (p!=junkarea) {
+    xbt_mheap_t mdp = __mmalloc_current_heap;
+
+    if (mdp) {
+      LOCK(mdp);
+      mfree(mdp, p);
+      UNLOCK(mdp);
+    } else {
+      real_free(p);
+    }
+  } else {
+    allocated_junk=0;
+  }
+}
+
+
+#else /* NO GNU_LD */
 void *malloc(size_t n)
 {
   xbt_mheap_t mdp = __mmalloc_current_heap ?: (xbt_mheap_t) mmalloc_preinit();
@@ -77,6 +195,7 @@ void free(void *p)
     UNLOCK(mdp);
   }
 }
-#endif
+#endif /* NO GNU_LD */
+#endif /* WANT_MALLOC_OVERRIDE */
 
 
index de1942a..07cbe7e 100644 (file)
@@ -330,6 +330,10 @@ void *mmalloc_preinit(void)
   }
   xbt_assert(__mmalloc_default_mdp != NULL);
 
+#if defined(HAVE_GNU_LD) && defined(MMALLOC_WANT_OVERRIDE_LEGACY)
+  mm_gnuld_legacy_init();
+#endif
+
   return __mmalloc_default_mdp;
 }
 
index 89d1ec6..726842f 100644 (file)
@@ -122,7 +122,8 @@ static void *register_morecore(struct mdesc *mdp, size_t size)
 
     newinfo[BLOCK(oldinfo)].busy_block.size = BLOCKIFY(mdp->heapsize * sizeof(malloc_info));
     newinfo[BLOCK(oldinfo)].busy_block.busy_size = size;
-    newinfo[BLOCK(oldinfo)].busy_block.bt_size = 0;// FIXME setup the backtrace
+    newinfo[BLOCK(oldinfo)].busy_block.ignore = 0;
+    //newinfo[BLOCK(oldinfo)].busy_block.bt_size = 0;// FIXME setup the backtrace
     mfree(mdp, (void *) oldinfo);
     mdp->heapsize = newsize;
   }
@@ -201,7 +202,8 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
 
       /* Update our metadata about this fragment */
       candidate_info->busy_frag.frag_size[candidate_frag] = requested_size;
-      xbt_backtrace_no_malloc(candidate_info->busy_frag.bt[candidate_frag],XBT_BACKTRACE_SIZE);
+      candidate_info->busy_frag.ignore[candidate_frag] = 0;
+      //xbt_backtrace_no_malloc(candidate_info->busy_frag.bt[candidate_frag],XBT_BACKTRACE_SIZE);
 
       /* Update the statistics.  */
       mdp -> heapstats.chunks_used++;
@@ -220,6 +222,7 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
       /* Link all fragments but the first as free, and add the block to the swag of blocks containing free frags  */
       for (i = 1; i < (size_t) (BLOCKSIZE >> log); ++i) {
         mdp->heapinfo[block].busy_frag.frag_size[i] = -1;
+        mdp->heapinfo[block].busy_frag.ignore[i] = 0;
       }
       mdp->heapinfo[block].busy_frag.nfree = i - 1;
       mdp->heapinfo[block].freehook.prev = NULL;
@@ -229,7 +232,8 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
 
       /* mark the fragment returned as busy */
       mdp->heapinfo[block].busy_frag.frag_size[0] = requested_size;
-      xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_frag.bt[0],XBT_BACKTRACE_SIZE);
+      mdp->heapinfo[block].busy_frag.ignore[0] = 0;
+      //xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_frag.bt[0],XBT_BACKTRACE_SIZE);
       
       /* update stats */
       mdp -> heapstats.chunks_free += (BLOCKSIZE >> log) - 1;
@@ -276,7 +280,8 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
         }
         mdp->heapinfo[block].busy_block.size = blocks;
         mdp->heapinfo[block].busy_block.busy_size = requested_size;
-        mdp->heapinfo[block].busy_block.bt_size=xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE);
+        //mdp->heapinfo[block].busy_block.bt_size=xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE);
+        mdp->heapinfo[block].busy_block.ignore = 0;
         mdp -> heapstats.chunks_used++;
         mdp -> heapstats.bytes_used += blocks * BLOCKSIZE;
 
@@ -314,8 +319,9 @@ void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
     }
     mdp->heapinfo[block].busy_block.size = blocks;
     mdp->heapinfo[block].busy_block.busy_size = requested_size;
+    mdp->heapinfo[block].busy_block.ignore = 0;
     //mdp->heapinfo[block].busy_block.bt_size = 0;
-    mdp->heapinfo[block].busy_block.bt_size = xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE);
+    //mdp->heapinfo[block].busy_block.bt_size = xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE);
 
     mdp -> heapstats.chunks_used++;
     mdp -> heapstats.bytes_used += blocks * BLOCKSIZE;
index 26feb7d..8eeadaa 100644 (file)
@@ -155,14 +155,16 @@ typedef struct {
     struct {
       size_t nfree;               /* Free fragments in a fragmented block.  */
       short frag_size[MAX_FRAGMENT_PER_BLOCK];
-      void *bt[MAX_FRAGMENT_PER_BLOCK][XBT_BACKTRACE_SIZE]; /* Where it was malloced (or realloced lastly) */
+      //void *bt[MAX_FRAGMENT_PER_BLOCK][XBT_BACKTRACE_SIZE]; /* Where it was malloced (or realloced lastly) */
+      int ignore[MAX_FRAGMENT_PER_BLOCK];
       heap_area_t equal_to[MAX_FRAGMENT_PER_BLOCK];
     } busy_frag;
     struct {
       size_t size; /* Size (in blocks) of a large cluster.  */
       size_t busy_size; /* Actually used space, in bytes */
-      void *bt[XBT_BACKTRACE_SIZE]; /* Where it was malloced (or realloced lastly) */
-      int bt_size;
+      //void *bt[XBT_BACKTRACE_SIZE]; /* Where it was malloced (or realloced lastly) */
+      //int bt_size;
+      int ignore;
       heap_area_t equal_to;
     } busy_block;
     /* Heap information for a free block (that may be the first of a free cluster).  */
index 83c8181..9098beb 100644 (file)
@@ -447,7 +447,7 @@ int asprintf(char **ptr, const char *fmt, /*args */ ...)
   str_l = portable_vsnprintf(NULL, (size_t) 0, fmt, ap);
   va_end(ap);
   assert(str_l >= 0);           /* possible integer overflow if str_m > INT_MAX */
-  *ptr = (char *) malloc(str_m = (size_t) str_l + 1);
+  *ptr = (char *) xbt_malloc(str_m = (size_t) str_l + 1);
   if (*ptr == NULL) {
     errno = ENOMEM;
     str_l = -1;
@@ -476,7 +476,7 @@ int vasprintf(char **ptr, const char *fmt, va_list ap)
     va_end(ap2);
   }
   assert(str_l >= 0);           /* possible integer overflow if str_m > INT_MAX */
-  *ptr = (char *) malloc(str_m = (size_t) str_l + 1);
+  *ptr = (char *) xbt_malloc(str_m = (size_t) str_l + 1);
   if (*ptr == NULL) {
     errno = ENOMEM;
     str_l = -1;
@@ -504,7 +504,7 @@ int asnprintf(char **ptr, size_t str_m, const char *fmt, /*args */ ...)
   /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
   if (str_m == 0) {             /* not interested in resulting string, just return size */
   } else {
-    *ptr = (char *) malloc(str_m);
+    *ptr = (char *) xbt_malloc(str_m);
     if (*ptr == NULL) {
       errno = ENOMEM;
       str_l = -1;
@@ -538,7 +538,7 @@ int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap)
   /* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
   if (str_m == 0) {             /* not interested in resulting string, just return size */
   } else {
-    *ptr = (char *) malloc(str_m);
+    *ptr = (char *) xbt_malloc(str_m);
     if (*ptr == NULL) {
       errno = ENOMEM;
       str_l = -1;
index 651a2ff..9801a74 100644 (file)
@@ -162,7 +162,6 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l,
           e.used = backtrace((void **) e.bt, XBT_BACKTRACE_SIZE);
           e.bt_strings = NULL;
           e.msg = NULL;
-          e.remote = 0;
           xbt_ex_setup_backtrace(&e);
           if (*q == 'B') {
             show_string(e.bt_strings[1] + 8);
index 93c8e5c..89a67a6 100644 (file)
@@ -30,13 +30,6 @@ xbt_dynar_t xbt_cmdline = NULL; /* all we got in argv */
 
 int xbt_initialized = 0;
 
-int _surf_do_model_check = 0;
-int _surf_mc_checkpoint=0;
-char* _surf_mc_property_file=NULL;
-int _surf_mc_timeout=0;
-int _surf_mc_max_depth=1000;
-int _surf_mc_visited=0;
-
 /* Declare xbt_preinit and xbt_postexit as constructor/destructor of the library.
  * This is crude and rather compiler-specific, unfortunately.
  */
@@ -89,28 +82,22 @@ static void xbt_preinit(void)
   mmalloc_preinit();
 #endif
   xbt_log_preinit();
-
   xbt_backtrace_preinit();
   xbt_os_thread_mod_preinit();
   xbt_fifo_preinit();
   xbt_dict_preinit();
-
   atexit(xbt_postexit);
 }
 
 static void xbt_postexit(void)
 {
   xbt_backtrace_postexit();
-
   xbt_fifo_postexit();
   xbt_dict_postexit();
-
-  xbt_log_postexit();
   xbt_os_thread_mod_postexit();
-
-  free(xbt_binary_name);
   xbt_dynar_free(&xbt_cmdline);
-
+  xbt_log_postexit();
+  free(xbt_binary_name);
 #ifdef MMALLOC_WANT_OVERRIDE_LEGACY
   mmalloc_postexit();
 #endif
index e4ea184..4c361b5 100644 (file)
@@ -305,14 +305,14 @@ xbt_dynar_t xbt_str_split_str(const char *s, const char *sep)
     //if substring was not found add the entire string
     if (NULL == q) {
       v = strlen(p);
-      to_push = malloc(v + 1);
+      to_push = xbt_malloc(v + 1);
       memcpy(to_push, p, v);
       to_push[v] = '\0';
       xbt_dynar_push(res, &to_push);
       done = 1;
     } else {
       //get the appearance
-      to_push = malloc(q - p + 1);
+      to_push = xbt_malloc(q - p + 1);
       memcpy(to_push, p, q - p);
       //add string terminator
       to_push[q - p] = '\0';
index 688b4d9..70a08ac 100644 (file)
@@ -29,8 +29,8 @@ XBT_INLINE void xbt_strbuff_empty(xbt_strbuff_t b)
 
 xbt_strbuff_t xbt_strbuff_new(void)
 {
-  xbt_strbuff_t res = malloc(sizeof(s_xbt_strbuff_t));
-  res->data = malloc(512);
+  xbt_strbuff_t res = xbt_malloc(sizeof(s_xbt_strbuff_t));
+  res->data = xbt_malloc(512);
   res->size = 512;
   xbt_strbuff_empty(res);
   return res;
@@ -42,7 +42,7 @@ xbt_strbuff_t xbt_strbuff_new(void)
  */
 XBT_INLINE xbt_strbuff_t xbt_strbuff_new_from(const char *ctn)
 {
-  xbt_strbuff_t res = malloc(sizeof(s_xbt_strbuff_t));
+  xbt_strbuff_t res = xbt_malloc(sizeof(s_xbt_strbuff_t));
   res->data = xbt_strdup(ctn);
   res->used = res->size = strlen(ctn);
   return res;
@@ -76,7 +76,7 @@ void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
 
   if (needed_space > b->size) {
     b->size = MAX(minimal_increment + b->used, needed_space);
-    b->data = realloc(b->data, b->size);
+    b->data = xbt_realloc(b->data, b->size);
   }
   strcpy(b->data + b->used, toadd);
   b->used += addlen;
@@ -252,7 +252,7 @@ void xbt_strbuff_varsubst(xbt_strbuff_t b, xbt_dict_t patterns)
 //          XBT_DEBUG("Too short (by %d chars; %d chars left in area)",val_len- (end_subst-beg_subst), b->size - b->used);
           if (newused > b->size) {
             /* We have to realloc the data area before (because b->size is too small). We have to update our pointers, too */
-            char *newdata = realloc(b->data,
+            char *newdata = xbt_realloc(b->data,
                                     b->used + MAX(minimal_increment,
                                                   tooshort));
             int offset = newdata - b->data;
index 452fad6..70138a1 100644 (file)
@@ -28,6 +28,7 @@ static int receive(int argc, char *argv[])
   xbt_assert(MSG_task_get_sender(task), "No sender received");
   XBT_INFO("Got a message sent by '%s'",
         MSG_process_get_name(MSG_task_get_sender(task)));
+  MSG_task_destroy(task);
   return 0;
 }
 
index 86d1a40..da16a74 100644 (file)
@@ -5,7 +5,7 @@
 int main(int argc, char **argv) {
 
   int rank, i, j;
-  double a[SIZE][SIZE];
+  double a[SIZE][SIZE] = {{0}};
 
   MPI_Datatype columntype;
 
index f9b9ff2..f831471 100755 (executable)
@@ -264,8 +264,8 @@ RunTest exittest 3 "**** Checking Exit Processing ****"
 
 #uses MPI_Errors
 #RunTest trunc 2 "*** Testing Message truncation ***"
-#TODO: handle MPI_ERR_IN_STATUS
-#RunTest truncmult 2 '*** Testing Message trunction in multiple completions ***'
+
+RunTest truncmult 2 '*** Testing Message trunction in multiple completions ***'
 
 RunTest nullproc 2 "*** Testing handling of MPI_PROC_NULL ***"
 
index 9323ccc..10b418a 100644 (file)
@@ -95,20 +95,20 @@ for (i=0; i<ncomm; i++) {
             MPI_Get_count( &status, types[j], &count );
             if (count != counts[j]) {
                fprintf( stderr, 
-                       "Error in counts (got %d expected %d) with type %s\n",
+                       "Sendrecv_replace Error in counts (got %d expected %d) with type %s\n",
                         count, counts[j], names[j] );
                 err++;
                 }
             if (status.MPI_SOURCE != partner) {
                fprintf( stderr, 
-                       "Error in source (got %d expected %d) with type %s\n",
+                       "Sendrecv_replace Error in source (got %d expected %d) with type %s\n",
                         status.MPI_SOURCE, partner, names[j] );
                 err++;
                 }
             if ((errloc = CheckData( inbufs[j], outbufs[j], bytesize[j] ))) {
                char *p1, *p2;
                fprintf( stderr, 
-                  "Error in data with type %s (type %d on %d) at byte %d\n", 
+                  "Sendrecv_replace Error in data with type %s (type %d on %d) at byte %d\n", 
                         names[j], j, world_rank, errloc - 1 );
                p1 = (char *)inbufs[j];
                p2 = (char *)outbufs[j];
index a28d295..4e54094 100644 (file)
@@ -23,8 +23,8 @@ int main( int argc, char **argv)
     MPI_Type_ub(tmptype, &ub);
     MPI_Type_extent(tmptype, &extent);
 #ifdef DEBUG
-    printf("tmptype: size: %d lb: %ld ub: %ld ex: %ld\n", size, lb, ub, 
-          extent);
+    printf("tmptype: size: %d lb: %ld ub: %ld ex: %ld\n",
+           size, (long)lb, (long)ub, (long)extent);
 #endif
        
     blockcnt[0] = 1;
@@ -38,13 +38,13 @@ int main( int argc, char **argv)
     MPI_Type_ub(newtype, &ub);
     MPI_Type_extent(newtype, &extent);
 #ifdef DEBUG
-    printf("newtype: size: %ld lb: %ld ub: %ld ex: %d\n", size, lb, ub, 
-          extent);
+    printf("newtype: size: %d lb: %ld ub: %ld ex: %ld\n",
+           size, (long)lb, (long)ub, (long)extent);
 #endif 
     if (size != 1 || lb != 2 || ub != 3 || extent != 1) {
-           printf ("lb = %ld (should be 2), ub = %ld (should be 3) extent = %ld should be 1, size = %d (should be 1)\n", lb, ub, extent, size) ;
-    }
-    else {
+        printf("lb = %ld (should be 2), ub = %ld (should be 3) extent = %ld should be 1, size = %d (should be 1)\n",
+               (long)lb, (long)ub, (long)extent, size);
+    else {
        printf( " No Errors\n" );
     }
     MPI_Type_free(&tmptype);
index be04181..c87788e 100644 (file)
@@ -11,21 +11,21 @@ int main( int argc, char **argv )
 
 
   MPI_Type_extent(MPI_INT, &i_extent);
-  printf("MPI_Type_extent (MPI_INT) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_INT) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_INT, &i_size);
   printf("MPI_Type_size (MPI_INT) = %d\n", i_size);
 
 
   MPI_Type_extent(MPI_UNSIGNED, &i_extent);
-  printf("MPI_Type_extent (MPI_UNSIGNED) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_UNSIGNED) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_UNSIGNED, &i_size);
   printf("MPI_Type_size (MPI_UNSIGNED) = %d\n", i_size);
 
 #if defined(HAVE_LONG_DOUBLE)
   MPI_Type_extent(MPI_LONG_DOUBLE, &i_extent);
-  printf("MPI_Type_extent (MPI_LONG_DOUBLE) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_LONG_DOUBLE) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_LONG_DOUBLE, &i_size);
   printf("MPI_Type_size (MPI_LONG_DOUBLE) = %d\n", i_size);
index 1da6964..edcb2bb 100644 (file)
@@ -26,13 +26,14 @@ main( int argc, char **argv)
        
        /* Check that the results are correct */
 #ifdef DEBUG
-       printf("lb=%ld, ub=%ld, extent=%ld\n", lb, ub, extent);
+       printf("lb=%ld, ub=%ld, extent=%ld\n",
+               (long)lb, (long)ub, (long)extent);
        printf("Should be lb=4, ub=5, extent=1\n");
 #endif
        if (lb != 4 || ub != 5 || extent != 1) {
-           printf ("lb = %ld (should be 4), ub = %ld (should be 5) extent = %ld should be 1\n", lb, ub, extent) ;
-       }
-       else {
+            printf("lb = %ld (should be 4), ub = %ld (should be 5) extent = %ld should be 1\n",
+                   (long)lb, (long)ub, (long)extent) ;
+       else {
            printf( " No Errors\n" );
        }
 
index 8fd729f..ce84eac 100644 (file)
@@ -5,7 +5,7 @@
 int main(int argc, char **argv) {
 
   int rank, i, j;
-  double a[SIZE][SIZE];
+  double a[SIZE][SIZE] = {{0}};
 
   MPI_Datatype columntype;
 
index e7b3f09..b016125 100644 (file)
 $ ./xbt/mmalloc_test --log=root.fmt:%m%n
 > Allocating a new heap
 > HeapA allocated
-> 100 bytes allocated with offset 175000
-> 200 bytes allocated with offset 176000
-> 300 bytes allocated with offset 177000
-> 400 bytes allocated with offset 177200
-> 500 bytes allocated with offset 177400
-> 600 bytes allocated with offset 178000
-> 700 bytes allocated with offset 178400
-> 800 bytes allocated with offset 178800
-> 900 bytes allocated with offset 178c00
-> 1000 bytes allocated with offset 179000
-> 1100 bytes allocated with offset 17a000
-> 1200 bytes allocated with offset 17a800
-> 1300 bytes allocated with offset 17b000
-> 1400 bytes allocated with offset 17b800
-> 1500 bytes allocated with offset 17c000
-> 1600 bytes allocated with offset 17c800
-> 1700 bytes allocated with offset 17d000
-> 1800 bytes allocated with offset 17d800
-> 1900 bytes allocated with offset 17e000
-> 2000 bytes allocated with offset 17e800
-> 2100 bytes allocated with offset 17f000
-> 2200 bytes allocated with offset 180000
-> 2300 bytes allocated with offset 181000
-> 2400 bytes allocated with offset 182000
-> 2500 bytes allocated with offset 183000
-> 2600 bytes allocated with offset 184000
-> 2700 bytes allocated with offset 185000
-> 2800 bytes allocated with offset 186000
-> 2900 bytes allocated with offset 187000
-> 3000 bytes allocated with offset 188000
-> 3100 bytes allocated with offset 189000
-> 3200 bytes allocated with offset 18a000
-> 3300 bytes allocated with offset 18b000
-> 3400 bytes allocated with offset 18c000
-> 3500 bytes allocated with offset 18d000
-> 3600 bytes allocated with offset 18e000
-> 3700 bytes allocated with offset 18f000
-> 3800 bytes allocated with offset 190000
-> 3900 bytes allocated with offset 191000
-> 4000 bytes allocated with offset 192000
-> 4100 bytes allocated with offset 193000
-> 4200 bytes allocated with offset 195000
-> 4300 bytes allocated with offset 197000
-> 4400 bytes allocated with offset 199000
-> 4500 bytes allocated with offset 19b000
-> 4600 bytes allocated with offset 19d000
-> 4700 bytes allocated with offset 19f000
-> 4800 bytes allocated with offset 1a1000
-> 4900 bytes allocated with offset 1a3000
-> 5000 bytes allocated with offset 1a5000
-> 100 bytes allocated with offset 175080
-> 200 bytes allocated with offset 176100
-> 300 bytes allocated with offset 177600
-> 400 bytes allocated with offset 177800
-> 500 bytes allocated with offset 177a00
-> 600 bytes allocated with offset 179400
-> 700 bytes allocated with offset 179800
-> 800 bytes allocated with offset 179c00
-> 900 bytes allocated with offset 1a7000
-> 1000 bytes allocated with offset 1a7400
-> 1100 bytes allocated with offset 1a8000
-> 1200 bytes allocated with offset 1a8800
-> 1300 bytes allocated with offset 1a9000
-> 1400 bytes allocated with offset 1a9800
-> 1500 bytes allocated with offset 1aa000
-> 1600 bytes allocated with offset 1aa800
-> 1700 bytes allocated with offset 1ab000
-> 1800 bytes allocated with offset 1ab800
-> 1900 bytes allocated with offset 1ac000
-> 2000 bytes allocated with offset 1ac800
-> 2100 bytes allocated with offset 1ad000
-> 2200 bytes allocated with offset 1ae000
-> 2300 bytes allocated with offset 1af000
-> 2400 bytes allocated with offset 1b0000
-> 2500 bytes allocated with offset 1b1000
-> 2600 bytes allocated with offset 1b2000
-> 2700 bytes allocated with offset 1b3000
-> 2800 bytes allocated with offset 1b4000
-> 2900 bytes allocated with offset 1b5000
-> 3000 bytes allocated with offset 1b6000
-> 3100 bytes allocated with offset 1b7000
-> 3200 bytes allocated with offset 1b8000
-> 3300 bytes allocated with offset 1b9000
-> 3400 bytes allocated with offset 1ba000
-> 3500 bytes allocated with offset 1bb000
-> 3600 bytes allocated with offset 1bc000
-> 3700 bytes allocated with offset 1bd000
-> 3800 bytes allocated with offset 1be000
-> 3900 bytes allocated with offset 1bf000
-> 4000 bytes allocated with offset 1c0000
-> 4100 bytes allocated with offset 1c1000
-> 4200 bytes allocated with offset 1c3000
-> 4300 bytes allocated with offset 1c5000
-> 4400 bytes allocated with offset 1c7000
-> 4500 bytes allocated with offset 1c9000
-> 4600 bytes allocated with offset 1cb000
-> 4700 bytes allocated with offset 1cd000
-> 4800 bytes allocated with offset 1cf000
-> 4900 bytes allocated with offset 1d1000
-> 5000 bytes allocated with offset 1d3000
+> 100 bytes allocated with offset 55000
+> 200 bytes allocated with offset 56000
+> 300 bytes allocated with offset 57000
+> 400 bytes allocated with offset 57200
+> 500 bytes allocated with offset 57400
+> 600 bytes allocated with offset 58000
+> 700 bytes allocated with offset 58400
+> 800 bytes allocated with offset 58800
+> 900 bytes allocated with offset 58c00
+> 1000 bytes allocated with offset 59000
+> 1100 bytes allocated with offset 5a000
+> 1200 bytes allocated with offset 5a800
+> 1300 bytes allocated with offset 5b000
+> 1400 bytes allocated with offset 5b800
+> 1500 bytes allocated with offset 5c000
+> 1600 bytes allocated with offset 5c800
+> 1700 bytes allocated with offset 5d000
+> 1800 bytes allocated with offset 5d800
+> 1900 bytes allocated with offset 5e000
+> 2000 bytes allocated with offset 5e800
+> 2100 bytes allocated with offset 5f000
+> 2200 bytes allocated with offset 60000
+> 2300 bytes allocated with offset 61000
+> 2400 bytes allocated with offset 62000
+> 2500 bytes allocated with offset 63000
+> 2600 bytes allocated with offset 64000
+> 2700 bytes allocated with offset 65000
+> 2800 bytes allocated with offset 66000
+> 2900 bytes allocated with offset 67000
+> 3000 bytes allocated with offset 68000
+> 3100 bytes allocated with offset 69000
+> 3200 bytes allocated with offset 6a000
+> 3300 bytes allocated with offset 6b000
+> 3400 bytes allocated with offset 6c000
+> 3500 bytes allocated with offset 6d000
+> 3600 bytes allocated with offset 6e000
+> 3700 bytes allocated with offset 6f000
+> 3800 bytes allocated with offset 70000
+> 3900 bytes allocated with offset 71000
+> 4000 bytes allocated with offset 72000
+> 4100 bytes allocated with offset 73000
+> 4200 bytes allocated with offset 75000
+> 4300 bytes allocated with offset 77000
+> 4400 bytes allocated with offset 79000
+> 4500 bytes allocated with offset 7b000
+> 4600 bytes allocated with offset 7d000
+> 4700 bytes allocated with offset 7f000
+> 4800 bytes allocated with offset 81000
+> 4900 bytes allocated with offset 83000
+> 5000 bytes allocated with offset 85000
+> 100 bytes allocated with offset 55080
+> 200 bytes allocated with offset 56100
+> 300 bytes allocated with offset 57600
+> 400 bytes allocated with offset 57800
+> 500 bytes allocated with offset 57a00
+> 600 bytes allocated with offset 59400
+> 700 bytes allocated with offset 59800
+> 800 bytes allocated with offset 59c00
+> 900 bytes allocated with offset 87000
+> 1000 bytes allocated with offset 87400
+> 1100 bytes allocated with offset 88000
+> 1200 bytes allocated with offset 88800
+> 1300 bytes allocated with offset 89000
+> 1400 bytes allocated with offset 89800
+> 1500 bytes allocated with offset 8a000
+> 1600 bytes allocated with offset 8a800
+> 1700 bytes allocated with offset 8b000
+> 1800 bytes allocated with offset 8b800
+> 1900 bytes allocated with offset 8c000
+> 2000 bytes allocated with offset 8c800
+> 2100 bytes allocated with offset 8d000
+> 2200 bytes allocated with offset 8e000
+> 2300 bytes allocated with offset 8f000
+> 2400 bytes allocated with offset 90000
+> 2500 bytes allocated with offset 91000
+> 2600 bytes allocated with offset 92000
+> 2700 bytes allocated with offset 93000
+> 2800 bytes allocated with offset 94000
+> 2900 bytes allocated with offset 95000
+> 3000 bytes allocated with offset 96000
+> 3100 bytes allocated with offset 97000
+> 3200 bytes allocated with offset 98000
+> 3300 bytes allocated with offset 99000
+> 3400 bytes allocated with offset 9a000
+> 3500 bytes allocated with offset 9b000
+> 3600 bytes allocated with offset 9c000
+> 3700 bytes allocated with offset 9d000
+> 3800 bytes allocated with offset 9e000
+> 3900 bytes allocated with offset 9f000
+> 4000 bytes allocated with offset a0000
+> 4100 bytes allocated with offset a1000
+> 4200 bytes allocated with offset a3000
+> 4300 bytes allocated with offset a5000
+> 4400 bytes allocated with offset a7000
+> 4500 bytes allocated with offset a9000
+> 4600 bytes allocated with offset ab000
+> 4700 bytes allocated with offset ad000
+> 4800 bytes allocated with offset af000
+> 4900 bytes allocated with offset b1000
+> 5000 bytes allocated with offset b3000
 > All blocks were correctly allocated. Free every second block
 > Memset every second block to zero (yeah, they are not currently allocated :)
 > Re-allocate every second block
index 4656155..c688491 100644 (file)
 $ ./xbt/mmalloc_test --log=root.fmt:%m%n
 > Allocating a new heap
 > HeapA allocated
-> 100 bytes allocated with offset 171000
-> 200 bytes allocated with offset 171100
-> 300 bytes allocated with offset 172000
-> 400 bytes allocated with offset 172200
-> 500 bytes allocated with offset 172400
-> 600 bytes allocated with offset 173000
-> 700 bytes allocated with offset 173400
-> 800 bytes allocated with offset 173800
-> 900 bytes allocated with offset 173c00
-> 1000 bytes allocated with offset 174000
-> 1100 bytes allocated with offset 175000
-> 1200 bytes allocated with offset 175800
-> 1300 bytes allocated with offset 176000
-> 1400 bytes allocated with offset 176800
-> 1500 bytes allocated with offset 177000
-> 1600 bytes allocated with offset 177800
-> 1700 bytes allocated with offset 178000
-> 1800 bytes allocated with offset 178800
-> 1900 bytes allocated with offset 179000
-> 2000 bytes allocated with offset 179800
-> 2100 bytes allocated with offset 17a000
-> 2200 bytes allocated with offset 17b000
-> 2300 bytes allocated with offset 17c000
-> 2400 bytes allocated with offset 17d000
-> 2500 bytes allocated with offset 17e000
-> 2600 bytes allocated with offset 17f000
-> 2700 bytes allocated with offset 180000
-> 2800 bytes allocated with offset 181000
-> 2900 bytes allocated with offset 182000
-> 3000 bytes allocated with offset 183000
-> 3100 bytes allocated with offset 184000
-> 3200 bytes allocated with offset 185000
-> 3300 bytes allocated with offset 186000
-> 3400 bytes allocated with offset 187000
-> 3500 bytes allocated with offset 188000
-> 3600 bytes allocated with offset 189000
-> 3700 bytes allocated with offset 18a000
-> 3800 bytes allocated with offset 18b000
-> 3900 bytes allocated with offset 18c000
-> 4000 bytes allocated with offset 18d000
-> 4100 bytes allocated with offset 18e000
-> 4200 bytes allocated with offset 190000
-> 4300 bytes allocated with offset 192000
-> 4400 bytes allocated with offset 194000
-> 4500 bytes allocated with offset 196000
-> 4600 bytes allocated with offset 198000
-> 4700 bytes allocated with offset 19a000
-> 4800 bytes allocated with offset 19c000
-> 4900 bytes allocated with offset 19e000
-> 5000 bytes allocated with offset 1a0000
-> 100 bytes allocated with offset 171200
-> 200 bytes allocated with offset 171300
-> 300 bytes allocated with offset 172600
-> 400 bytes allocated with offset 172800
-> 500 bytes allocated with offset 172a00
-> 600 bytes allocated with offset 174400
-> 700 bytes allocated with offset 174800
-> 800 bytes allocated with offset 174c00
-> 900 bytes allocated with offset 1a2000
-> 1000 bytes allocated with offset 1a2400
-> 1100 bytes allocated with offset 1a3000
-> 1200 bytes allocated with offset 1a3800
-> 1300 bytes allocated with offset 1a4000
-> 1400 bytes allocated with offset 1a4800
-> 1500 bytes allocated with offset 1a5000
-> 1600 bytes allocated with offset 1a5800
-> 1700 bytes allocated with offset 1a6000
-> 1800 bytes allocated with offset 1a6800
-> 1900 bytes allocated with offset 1a7000
-> 2000 bytes allocated with offset 1a7800
-> 2100 bytes allocated with offset 1a8000
-> 2200 bytes allocated with offset 1a9000
-> 2300 bytes allocated with offset 1aa000
-> 2400 bytes allocated with offset 1ab000
-> 2500 bytes allocated with offset 1ac000
-> 2600 bytes allocated with offset 1ad000
-> 2700 bytes allocated with offset 1ae000
-> 2800 bytes allocated with offset 1af000
-> 2900 bytes allocated with offset 1b0000
-> 3000 bytes allocated with offset 1b1000
-> 3100 bytes allocated with offset 1b2000
-> 3200 bytes allocated with offset 1b3000
-> 3300 bytes allocated with offset 1b4000
-> 3400 bytes allocated with offset 1b5000
-> 3500 bytes allocated with offset 1b6000
-> 3600 bytes allocated with offset 1b7000
-> 3700 bytes allocated with offset 1b8000
-> 3800 bytes allocated with offset 1b9000
-> 3900 bytes allocated with offset 1ba000
-> 4000 bytes allocated with offset 1bb000
-> 4100 bytes allocated with offset 1bc000
-> 4200 bytes allocated with offset 1be000
-> 4300 bytes allocated with offset 1c0000
-> 4400 bytes allocated with offset 1c2000
-> 4500 bytes allocated with offset 1c4000
-> 4600 bytes allocated with offset 1c6000
-> 4700 bytes allocated with offset 1c8000
-> 4800 bytes allocated with offset 1ca000
-> 4900 bytes allocated with offset 1cc000
-> 5000 bytes allocated with offset 1ce000
+> 100 bytes allocated with offset 41000
+> 200 bytes allocated with offset 41100
+> 300 bytes allocated with offset 42000
+> 400 bytes allocated with offset 42200
+> 500 bytes allocated with offset 42400
+> 600 bytes allocated with offset 43000
+> 700 bytes allocated with offset 43400
+> 800 bytes allocated with offset 43800
+> 900 bytes allocated with offset 43c00
+> 1000 bytes allocated with offset 44000
+> 1100 bytes allocated with offset 45000
+> 1200 bytes allocated with offset 45800
+> 1300 bytes allocated with offset 46000
+> 1400 bytes allocated with offset 46800
+> 1500 bytes allocated with offset 47000
+> 1600 bytes allocated with offset 47800
+> 1700 bytes allocated with offset 48000
+> 1800 bytes allocated with offset 48800
+> 1900 bytes allocated with offset 49000
+> 2000 bytes allocated with offset 49800
+> 2100 bytes allocated with offset 4a000
+> 2200 bytes allocated with offset 4b000
+> 2300 bytes allocated with offset 4c000
+> 2400 bytes allocated with offset 4d000
+> 2500 bytes allocated with offset 4e000
+> 2600 bytes allocated with offset 4f000
+> 2700 bytes allocated with offset 50000
+> 2800 bytes allocated with offset 51000
+> 2900 bytes allocated with offset 52000
+> 3000 bytes allocated with offset 53000
+> 3100 bytes allocated with offset 54000
+> 3200 bytes allocated with offset 55000
+> 3300 bytes allocated with offset 56000
+> 3400 bytes allocated with offset 57000
+> 3500 bytes allocated with offset 58000
+> 3600 bytes allocated with offset 59000
+> 3700 bytes allocated with offset 5a000
+> 3800 bytes allocated with offset 5b000
+> 3900 bytes allocated with offset 5c000
+> 4000 bytes allocated with offset 5d000
+> 4100 bytes allocated with offset 5e000
+> 4200 bytes allocated with offset 60000
+> 4300 bytes allocated with offset 62000
+> 4400 bytes allocated with offset 64000
+> 4500 bytes allocated with offset 66000
+> 4600 bytes allocated with offset 68000
+> 4700 bytes allocated with offset 6a000
+> 4800 bytes allocated with offset 6c000
+> 4900 bytes allocated with offset 6e000
+> 5000 bytes allocated with offset 70000
+> 100 bytes allocated with offset 41200
+> 200 bytes allocated with offset 41300
+> 300 bytes allocated with offset 42600
+> 400 bytes allocated with offset 42800
+> 500 bytes allocated with offset 42a00
+> 600 bytes allocated with offset 44400
+> 700 bytes allocated with offset 44800
+> 800 bytes allocated with offset 44c00
+> 900 bytes allocated with offset 72000
+> 1000 bytes allocated with offset 72400
+> 1100 bytes allocated with offset 73000
+> 1200 bytes allocated with offset 73800
+> 1300 bytes allocated with offset 74000
+> 1400 bytes allocated with offset 74800
+> 1500 bytes allocated with offset 75000
+> 1600 bytes allocated with offset 75800
+> 1700 bytes allocated with offset 76000
+> 1800 bytes allocated with offset 76800
+> 1900 bytes allocated with offset 77000
+> 2000 bytes allocated with offset 77800
+> 2100 bytes allocated with offset 78000
+> 2200 bytes allocated with offset 79000
+> 2300 bytes allocated with offset 7a000
+> 2400 bytes allocated with offset 7b000
+> 2500 bytes allocated with offset 7c000
+> 2600 bytes allocated with offset 7d000
+> 2700 bytes allocated with offset 7e000
+> 2800 bytes allocated with offset 7f000
+> 2900 bytes allocated with offset 80000
+> 3000 bytes allocated with offset 81000
+> 3100 bytes allocated with offset 82000
+> 3200 bytes allocated with offset 83000
+> 3300 bytes allocated with offset 84000
+> 3400 bytes allocated with offset 85000
+> 3500 bytes allocated with offset 86000
+> 3600 bytes allocated with offset 87000
+> 3700 bytes allocated with offset 88000
+> 3800 bytes allocated with offset 89000
+> 3900 bytes allocated with offset 8a000
+> 4000 bytes allocated with offset 8b000
+> 4100 bytes allocated with offset 8c000
+> 4200 bytes allocated with offset 8e000
+> 4300 bytes allocated with offset 90000
+> 4400 bytes allocated with offset 92000
+> 4500 bytes allocated with offset 94000
+> 4600 bytes allocated with offset 96000
+> 4700 bytes allocated with offset 98000
+> 4800 bytes allocated with offset 9a000
+> 4900 bytes allocated with offset 9c000
+> 5000 bytes allocated with offset 9e000
 > All blocks were correctly allocated. Free every second block
 > Memset every second block to zero (yeah, they are not currently allocated :)
 > Re-allocate every second block
index e95bd14..1224959 100644 (file)
@@ -11,6 +11,7 @@
 #endif
 
 #include <stdio.h>
+#include "simgrid/sg_config.h"
 #include "surf/surf.h"
 #include "surf/surf_resource.h"
 #include "surf/surfxml_parse.h" // for reset callback
@@ -52,8 +53,8 @@ void test(char *platform)
   e_surf_action_state_t stateActionB;
   e_surf_action_state_t stateActionC;
   double now = -1.0;
-  xbt_cfg_set_parse(_surf_cfg_set, "cpu/model:Cas01");
-  xbt_cfg_set_parse(_surf_cfg_set, "network/model:CM02");
+  xbt_cfg_set_parse(_sg_cfg_set, "cpu/model:Cas01");
+  xbt_cfg_set_parse(_sg_cfg_set, "network/model:CM02");
   parse_platform_file(platform);
 
   /*********************** CPU ***********************************/
index a30f0e4..4c92bea 100644 (file)
@@ -10,6 +10,7 @@
 #endif
 
 #include <stdio.h>
+#include "simgrid/sg_config.h"
 #include "surf/surf.h"
 #include "surf/surf_resource.h"
 #include "surf/surfxml_parse.h" // for reset callback
@@ -46,8 +47,8 @@ void test(char *platform)
   double now = -1.0;
   int running;
 
-  xbt_cfg_set_parse(_surf_cfg_set, "network/model:CM02");
-  xbt_cfg_set_parse(_surf_cfg_set, "cpu/model:Cas01");
+  xbt_cfg_set_parse(_sg_cfg_set, "network/model:CM02");
+  xbt_cfg_set_parse(_sg_cfg_set, "cpu/model:Cas01");
   parse_platform_file(platform);
 
   /*********************** WORKSTATION ***********************************/
index 9801be3..8544ab9 100755 (executable)
@@ -86,7 +86,7 @@ sub parse_file {
 }
 # Retrieve all the file names, and add their content to $data
 my $data;
-open FILES, "find src/ tools/ include/ -name '*.c'|" || die "Cannot search for the source file names: $!\n";
+open FILES, "find ../src/ ../tools/ ../include/ -name '*.c'|" || die "Cannot search for the source file names: $!\n";
 while (my $file=<FILES>) {
     chomp $file;
     parse_file($file);