From ae66e43b95b26467c1cb9df271e83f51d3d7147b Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 2 Jul 2007 07:07:46 +0000 Subject: [PATCH] Integrate Bruno's work on SIMIX onto main stream. Tests are broken, but it looks reasonable git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3626 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/Makefile.am | 84 +-- src/Makefile.in | 615 ++----------------- src/gras/DataDesc/ddt_parse.yy.c | 93 ++- src/gras/Msg/msg.c | 2 + src/gras/Msg/msg_interface.h | 4 + src/gras/Msg/sg_msg.c | 115 ++-- src/gras/Transport/sg_transport.c | 187 +++--- src/gras/Transport/transport.c | 42 +- src/gras/Transport/transport_interface.h | 6 +- src/gras/Transport/transport_plugin_file.c | 2 +- src/gras/Transport/transport_plugin_sg.c | 239 +++++--- src/gras/Transport/transport_plugin_tcp.c | 2 +- src/gras/Virtu/process.c | 7 +- src/gras/Virtu/sg_dns.c | 4 +- src/gras/Virtu/sg_emul.c | 103 +++- src/gras/Virtu/sg_process.c | 133 ++--- src/gras/Virtu/sg_time.c | 27 +- src/gras/Virtu/virtu_private.h | 4 + src/gras/Virtu/virtu_sg.h | 25 +- src/gras/gras.c | 1 - src/gras_config.h.in | 3 - src/msg/deployment.c | 98 +-- src/msg/environment.c | 73 +-- src/msg/global.c | 413 ++----------- src/msg/gos.c | 665 ++++++++++----------- src/msg/host.c | 60 +- src/msg/m_process.c | 323 +++------- src/msg/msg_config.c | 78 +-- src/msg/private.h | 111 +--- src/msg/task.c | 104 ++-- 30 files changed, 1244 insertions(+), 2379 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index c38ae6b509..e87f858612 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -58,21 +58,9 @@ EXTRA_DIST= \ \ amok/Bandwidth/bandwidth_private.h \ amok/amok_modinter.h - -if USE_SIMIX - EXTRA_DIST+=include/simix/simix.h include/simix/datatypes.h simix/msg_simix_private.h \ - gras_simix/Transport/gras_simix_transport_interface.h \ - gras_simix/Virtu/gras_simix_virtu_interface.h gras_simix/Virtu/gras_simix_virtu_private.h\ - gras_simix/Virtu/gras_simix_virtu_rl.h gras_simix/Virtu/gras_simix_virtu_sg.h \ - gras_simix/DataDesc/gras_simix_ddt_parse.yy.l gras_simix/DataDesc/gras_simix_ddt_parse.yy.c -else - EXTRA_DIST+=gras/Transport/transport_interface.h \ - gras/Virtu/virtu_interface.h gras/Virtu/virtu_private.h\ - gras/Virtu/virtu_rl.h gras/Virtu/virtu_sg.h \ - gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c -endif - -# gras_private.h + \ + include/simix/simix.h include/simix/datatypes.h \ + simix/msg_simix_private.h #LIBRARY_VERSION= 0:0:0 # | | | @@ -87,7 +75,7 @@ endif # | Set to zero if current is incremented # +- Increment if interfaces have been added, removed or changed -VERSION_INFO= -version-info 1:0:0 +VERSION_INFO= -version-info 2:0:0 # from `info libtool "Updating version info"` # and `info libtool "Release numbers"` # @@ -153,18 +141,6 @@ RL_SRC= \ \ gras/Msg/rl_msg.c -RL_SIMIX_SRC= \ - gras_simix/gras_simix_rl_stubs.c xbt/xbt_thread.c \ - \ - gras_simix/Transport/gras_simix_rl_transport.c \ - gras_simix/Transport/gras_simix_transport_plugin_file.c gras_simix/Transport/gras_simix_transport_plugin_tcp.c \ - \ - gras_simix/Virtu/gras_simix_rl_emul.c \ - gras_simix/Virtu/gras_simix_rl_process.c gras_simix/Virtu/gras_simix_rl_time.c \ - gras_simix/Virtu/gras_simix_rl_dns.c\ - \ - gras_simix/Msg/gras_simix_rl_msg.c - SG_SRC= \ xbt/context.c \ \ @@ -213,16 +189,7 @@ MSG_SRC= msg/msg_config.c \ msg/task.c msg/host.c msg/m_process.c msg/gos.c \ msg/global.c msg/environment.c msg/deployment.c -MSG_SIMIX_SRC= msg_simix/msg_simix_config.c \ - msg_simix/msg_simix_task.c \ - msg_simix/msg_simix_host.c \ - msg_simix/msg_simix_process.c \ - msg_simix/msg_simix_gos.c \ - msg_simix/msg_simix_global.c \ - msg_simix/msg_simix_environment.c \ - msg_simix/msg_simix_deployment.c - -GRAS_SRC= gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ +GRAS_SG_SRC= gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ \ gras/Virtu/sg_emul.c \ gras/Virtu/sg_process.c gras/Virtu/sg_time.c \ @@ -231,39 +198,9 @@ GRAS_SRC= gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c gras/sg_stubs.c \ gras/Msg/sg_msg.c -GRAS_SIMIX_SRC= gras_simix/Transport/gras_simix_sg_transport.c gras_simix/Transport/gras_simix_transport_plugin_sg.c \ - \ - gras_simix/Virtu/gras_simix_sg_emul.c \ - gras_simix/Virtu/gras_simix_sg_process.c gras_simix/Virtu/gras_simix_sg_time.c \ - gras_simix/Virtu/gras_simix_sg_dns.c\ - \ - gras_simix/gras_simix_sg_stubs.c \ - gras_simix/Msg/gras_simix_sg_msg.c - -if USE_SIMIX - SG_SRC+=$(SIMIX_SRC) - SG_SRC+=$(MSG_SIMIX_SRC) - SG_SRC+=$(GRAS_SIMIX_SRC) - EXTRA_DIST+=$(MSG_SRC) - COMMON_SRC+=gras_simix/gras_simix_gras.c \ - gras_simix/Transport/gras_simix_transport.c gras_simix/Transport/gras_simix_transport_private.h \ - gras_simix/Msg/gras_simix_msg.c gras_simix/Msg/gras_simix_rpc.c gras_simix/Msg/gras_simix_timer.c \ - gras_simix/Msg/gras_simix_msg_interface.h gras_simix/Msg/gras_simix_msg_private.h \ - gras_simix/Virtu/gras_simix_process.c gras_simix/Virtu/gras_simix_gras_module.c \ - \ - gras_simix/DataDesc/gras_simix_ddt_create.c \ - gras_simix/DataDesc/gras_simix_ddt_convert.c gras_simix/DataDesc/gras_simix_ddt_exchange.c \ - gras_simix/DataDesc/gras_simix_cbps.c gras_simix/DataDesc/gras_simix_datadesc.c \ - gras_simix/DataDesc/gras_simix_datadesc_interface.h gras_simix/DataDesc/gras_simix_datadesc_private.h \ - gras_simix/DataDesc/gras_simix_ddt_parse.c gras_simix/DataDesc/gras_simix_ddt_parse.yy.c gras_simix/DataDesc/gras_simix_ddt_parse.yy.h - -else - EXTRA_DIST+=$(SIMIX_SRC) - EXTRA_DIST+=$(MSG_SIMIX_SRC) - EXTRA_DIST+=$(GRAS_SIMIX_SRC) - SG_SRC+=$(MSG_SRC) - SG_SRC+=$(GRAS_SRC) - COMMON_SRC+=gras/gras.c \ +SG_SRC+=$(SIMIX_SRC) $(MSG_SRC) $(GRAS_SG_SRC) + +COMMON_SRC+=gras/gras.c \ gras/Transport/transport.c gras/Transport/transport_private.h \ gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ gras/Msg/msg_interface.h gras/Msg/msg_private.h \ @@ -275,7 +212,6 @@ else gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \ gras/DataDesc/datadesc_interface.h gras/DataDesc/datadesc_private.h \ gras/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h -endif AMOK_SRC= \ amok/amok_base.c \ @@ -396,11 +332,7 @@ endif ### Declare the library content ### -if USE_SIMIX -libgras_la_SOURCES= $(COMMON_SRC) $(RL_SIMIX_SRC) $(AMOK_SRC) -else libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC) -endif libgras_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GTNETS_LDFLAGS@ @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm libsimgrid_la_SOURCES= $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC) diff --git a/src/Makefile.in b/src/Makefile.in index 7e97eba2b3..1384c6e1ef 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -43,54 +43,12 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@USE_SIMIX_TRUE@am__append_1 = include/simix/simix.h include/simix/datatypes.h simix/msg_simix_private.h \ -@USE_SIMIX_TRUE@ gras_simix/Transport/gras_simix_transport_interface.h \ -@USE_SIMIX_TRUE@ gras_simix/Virtu/gras_simix_virtu_interface.h gras_simix/Virtu/gras_simix_virtu_private.h\ -@USE_SIMIX_TRUE@ gras_simix/Virtu/gras_simix_virtu_rl.h gras_simix/Virtu/gras_simix_virtu_sg.h \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_ddt_parse.yy.l gras_simix/DataDesc/gras_simix_ddt_parse.yy.c - -@USE_SIMIX_FALSE@am__append_2 = gras/Transport/transport_interface.h \ -@USE_SIMIX_FALSE@ gras/Virtu/virtu_interface.h gras/Virtu/virtu_private.h\ -@USE_SIMIX_FALSE@ gras/Virtu/virtu_rl.h gras/Virtu/virtu_sg.h \ -@USE_SIMIX_FALSE@ gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c - -@USE_GTNETS_TRUE@am__append_3 = $(GTNETS_SRC) -@USE_GTNETS_FALSE@am__append_4 = $(GTNETS_SRC) -@HAVE_SDP_TRUE@am__append_5 = surf/sdp.c -@HAVE_SDP_FALSE@am__append_6 = surf/sdp.c -@USE_SIMIX_TRUE@am__append_7 = $(SIMIX_SRC) $(MSG_SIMIX_SRC) \ -@USE_SIMIX_TRUE@ $(GRAS_SIMIX_SRC) -@USE_SIMIX_TRUE@am__append_8 = $(MSG_SRC) -@USE_SIMIX_TRUE@am__append_9 = gras_simix/gras_simix_gras.c \ -@USE_SIMIX_TRUE@ gras_simix/Transport/gras_simix_transport.c gras_simix/Transport/gras_simix_transport_private.h \ -@USE_SIMIX_TRUE@ gras_simix/Msg/gras_simix_msg.c gras_simix/Msg/gras_simix_rpc.c gras_simix/Msg/gras_simix_timer.c \ -@USE_SIMIX_TRUE@ gras_simix/Msg/gras_simix_msg_interface.h gras_simix/Msg/gras_simix_msg_private.h \ -@USE_SIMIX_TRUE@ gras_simix/Virtu/gras_simix_process.c gras_simix/Virtu/gras_simix_gras_module.c \ -@USE_SIMIX_TRUE@ \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_ddt_create.c \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_ddt_convert.c gras_simix/DataDesc/gras_simix_ddt_exchange.c \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_cbps.c gras_simix/DataDesc/gras_simix_datadesc.c \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_datadesc_interface.h gras_simix/DataDesc/gras_simix_datadesc_private.h \ -@USE_SIMIX_TRUE@ gras_simix/DataDesc/gras_simix_ddt_parse.c gras_simix/DataDesc/gras_simix_ddt_parse.yy.c gras_simix/DataDesc/gras_simix_ddt_parse.yy.h - -@USE_SIMIX_FALSE@am__append_10 = $(SIMIX_SRC) $(MSG_SIMIX_SRC) \ -@USE_SIMIX_FALSE@ $(GRAS_SIMIX_SRC) -@USE_SIMIX_FALSE@am__append_11 = $(MSG_SRC) $(GRAS_SRC) -@USE_SIMIX_FALSE@am__append_12 = gras/gras.c \ -@USE_SIMIX_FALSE@ gras/Transport/transport.c gras/Transport/transport_private.h \ -@USE_SIMIX_FALSE@ gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ -@USE_SIMIX_FALSE@ gras/Msg/msg_interface.h gras/Msg/msg_private.h \ -@USE_SIMIX_FALSE@ \ -@USE_SIMIX_FALSE@ gras/Virtu/process.c gras/Virtu/gras_module.c \ -@USE_SIMIX_FALSE@ \ -@USE_SIMIX_FALSE@ gras/DataDesc/ddt_create.c \ -@USE_SIMIX_FALSE@ gras/DataDesc/ddt_convert.c gras/DataDesc/ddt_exchange.c \ -@USE_SIMIX_FALSE@ gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \ -@USE_SIMIX_FALSE@ gras/DataDesc/datadesc_interface.h gras/DataDesc/datadesc_private.h \ -@USE_SIMIX_FALSE@ gras/DataDesc/ddt_parse.c gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h - +@USE_GTNETS_TRUE@am__append_1 = $(GTNETS_SRC) +@USE_GTNETS_FALSE@am__append_2 = $(GTNETS_SRC) +@HAVE_SDP_TRUE@am__append_3 = surf/sdp.c +@HAVE_SDP_FALSE@am__append_4 = surf/sdp.c @GRAMINE_MODE_FALSE@noinst_PROGRAMS = testall$(EXEEXT) -@GRAMINE_MODE_FALSE@am__append_13 = $(testall_SOURCES) +@GRAMINE_MODE_FALSE@am__append_5 = $(testall_SOURCES) DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/gras_config.h.in $(srcdir)/ucontext_stack.h.in \ $(top_srcdir)/acmacro/dist-files.mk @@ -119,95 +77,22 @@ am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libgras_la_LIBADD = -am__libgras_la_SOURCES_DIST = xbt/snprintf.c xbt/xbt_str.c xbt/ex.c \ - xbt_modinter.h gras_modinter.h xbt/sysdep.c xbt/asserts.c \ - xbt/log.c xbt/xbt_log_appender_file.c \ - xbt/xbt_log_layout_simple.c xbt/xbt_log_layout_format.c \ - xbt/mallocator.c xbt/dynar.c xbt/dict.c xbt/dict_elm.c \ - xbt/dict_cursor.c xbt/dict_multi.c xbt/heap.c xbt/fifo.c \ - xbt/swag.c xbt/graph.c xbt/set.c xbt/xbt_matrix.c \ - xbt/xbt_peer.c xbt/xbt_main.c xbt/config.c xbt/cunit.c \ - xbt/graphxml_parse.c gras_simix/gras_simix_gras.c \ - gras_simix/Transport/gras_simix_transport.c \ - gras_simix/Transport/gras_simix_transport_private.h \ - gras_simix/Msg/gras_simix_msg.c \ - gras_simix/Msg/gras_simix_rpc.c \ - gras_simix/Msg/gras_simix_timer.c \ - gras_simix/Msg/gras_simix_msg_interface.h \ - gras_simix/Msg/gras_simix_msg_private.h \ - gras_simix/Virtu/gras_simix_process.c \ - gras_simix/Virtu/gras_simix_gras_module.c \ - gras_simix/DataDesc/gras_simix_ddt_create.c \ - gras_simix/DataDesc/gras_simix_ddt_convert.c \ - gras_simix/DataDesc/gras_simix_ddt_exchange.c \ - gras_simix/DataDesc/gras_simix_cbps.c \ - gras_simix/DataDesc/gras_simix_datadesc.c \ - gras_simix/DataDesc/gras_simix_datadesc_interface.h \ - gras_simix/DataDesc/gras_simix_datadesc_private.h \ - gras_simix/DataDesc/gras_simix_ddt_parse.c \ - gras_simix/DataDesc/gras_simix_ddt_parse.yy.c \ - gras_simix/DataDesc/gras_simix_ddt_parse.yy.h gras/gras.c \ - gras/Transport/transport.c gras/Transport/transport_private.h \ - gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ - gras/Msg/msg_interface.h gras/Msg/msg_private.h \ - gras/Virtu/process.c gras/Virtu/gras_module.c \ - gras/DataDesc/ddt_create.c gras/DataDesc/ddt_convert.c \ - gras/DataDesc/ddt_exchange.c gras/DataDesc/cbps.c \ - gras/DataDesc/datadesc.c gras/DataDesc/datadesc_interface.h \ - gras/DataDesc/datadesc_private.h gras/DataDesc/ddt_parse.c \ - gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h \ - gras/rl_stubs.c xbt/xbt_thread.c gras/Transport/rl_transport.c \ - gras/Transport/transport_plugin_file.c \ - gras/Transport/transport_plugin_tcp.c gras/Virtu/rl_emul.c \ - gras/Virtu/rl_process.c gras/Virtu/rl_time.c \ - gras/Virtu/rl_dns.c gras/Msg/rl_msg.c amok/amok_base.c \ - amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \ - amok/PeerManagement/peermanagement.c \ - gras_simix/gras_simix_rl_stubs.c \ - gras_simix/Transport/gras_simix_rl_transport.c \ - gras_simix/Transport/gras_simix_transport_plugin_file.c \ - gras_simix/Transport/gras_simix_transport_plugin_tcp.c \ - gras_simix/Virtu/gras_simix_rl_emul.c \ - gras_simix/Virtu/gras_simix_rl_process.c \ - gras_simix/Virtu/gras_simix_rl_time.c \ - gras_simix/Virtu/gras_simix_rl_dns.c \ - gras_simix/Msg/gras_simix_rl_msg.c -@USE_SIMIX_TRUE@am__objects_1 = gras_simix_gras.lo \ -@USE_SIMIX_TRUE@ gras_simix_transport.lo gras_simix_msg.lo \ -@USE_SIMIX_TRUE@ gras_simix_rpc.lo gras_simix_timer.lo \ -@USE_SIMIX_TRUE@ gras_simix_process.lo \ -@USE_SIMIX_TRUE@ gras_simix_gras_module.lo \ -@USE_SIMIX_TRUE@ gras_simix_ddt_create.lo \ -@USE_SIMIX_TRUE@ gras_simix_ddt_convert.lo \ -@USE_SIMIX_TRUE@ gras_simix_ddt_exchange.lo gras_simix_cbps.lo \ -@USE_SIMIX_TRUE@ gras_simix_datadesc.lo gras_simix_ddt_parse.lo \ -@USE_SIMIX_TRUE@ gras_simix_ddt_parse.yy.lo -@USE_SIMIX_FALSE@am__objects_2 = gras.lo transport.lo msg.lo rpc.lo \ -@USE_SIMIX_FALSE@ timer.lo process.lo gras_module.lo \ -@USE_SIMIX_FALSE@ ddt_create.lo ddt_convert.lo ddt_exchange.lo \ -@USE_SIMIX_FALSE@ cbps.lo datadesc.lo ddt_parse.lo \ -@USE_SIMIX_FALSE@ ddt_parse.yy.lo -am__objects_3 = snprintf.lo xbt_str.lo ex.lo sysdep.lo asserts.lo \ +am__objects_1 = snprintf.lo xbt_str.lo ex.lo sysdep.lo asserts.lo \ log.lo xbt_log_appender_file.lo xbt_log_layout_simple.lo \ xbt_log_layout_format.lo mallocator.lo dynar.lo dict.lo \ dict_elm.lo dict_cursor.lo dict_multi.lo heap.lo fifo.lo \ swag.lo graph.lo set.lo xbt_matrix.lo xbt_peer.lo xbt_main.lo \ - config.lo cunit.lo graphxml_parse.lo $(am__objects_1) \ - $(am__objects_2) -am__objects_4 = rl_stubs.lo xbt_thread.lo rl_transport.lo \ + config.lo cunit.lo graphxml_parse.lo gras.lo transport.lo \ + msg.lo rpc.lo timer.lo process.lo gras_module.lo ddt_create.lo \ + ddt_convert.lo ddt_exchange.lo cbps.lo datadesc.lo \ + ddt_parse.lo ddt_parse.yy.lo +am__objects_2 = rl_stubs.lo xbt_thread.lo rl_transport.lo \ transport_plugin_file.lo transport_plugin_tcp.lo rl_emul.lo \ rl_process.lo rl_time.lo rl_dns.lo rl_msg.lo -am__objects_5 = amok_base.lo bandwidth.lo saturate.lo \ +am__objects_3 = amok_base.lo bandwidth.lo saturate.lo \ peermanagement.lo -am__objects_6 = gras_simix_rl_stubs.lo xbt_thread.lo \ - gras_simix_rl_transport.lo gras_simix_transport_plugin_file.lo \ - gras_simix_transport_plugin_tcp.lo gras_simix_rl_emul.lo \ - gras_simix_rl_process.lo gras_simix_rl_time.lo \ - gras_simix_rl_dns.lo gras_simix_rl_msg.lo -@USE_SIMIX_FALSE@am_libgras_la_OBJECTS = $(am__objects_3) \ -@USE_SIMIX_FALSE@ $(am__objects_4) $(am__objects_5) -@USE_SIMIX_TRUE@am_libgras_la_OBJECTS = $(am__objects_3) \ -@USE_SIMIX_TRUE@ $(am__objects_6) $(am__objects_5) +am_libgras_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) libgras_la_OBJECTS = $(am_libgras_la_OBJECTS) libsimgrid_la_LIBADD = am__libsimgrid_la_SOURCES_DIST = xbt/snprintf.c xbt/xbt_str.c xbt/ex.c \ @@ -218,33 +103,14 @@ am__libsimgrid_la_SOURCES_DIST = xbt/snprintf.c xbt/xbt_str.c xbt/ex.c \ xbt/dict_cursor.c xbt/dict_multi.c xbt/heap.c xbt/fifo.c \ xbt/swag.c xbt/graph.c xbt/set.c xbt/xbt_matrix.c \ xbt/xbt_peer.c xbt/xbt_main.c xbt/config.c xbt/cunit.c \ - xbt/graphxml_parse.c gras_simix/gras_simix_gras.c \ - gras_simix/Transport/gras_simix_transport.c \ - gras_simix/Transport/gras_simix_transport_private.h \ - gras_simix/Msg/gras_simix_msg.c \ - gras_simix/Msg/gras_simix_rpc.c \ - gras_simix/Msg/gras_simix_timer.c \ - gras_simix/Msg/gras_simix_msg_interface.h \ - gras_simix/Msg/gras_simix_msg_private.h \ - gras_simix/Virtu/gras_simix_process.c \ - gras_simix/Virtu/gras_simix_gras_module.c \ - gras_simix/DataDesc/gras_simix_ddt_create.c \ - gras_simix/DataDesc/gras_simix_ddt_convert.c \ - gras_simix/DataDesc/gras_simix_ddt_exchange.c \ - gras_simix/DataDesc/gras_simix_cbps.c \ - gras_simix/DataDesc/gras_simix_datadesc.c \ - gras_simix/DataDesc/gras_simix_datadesc_interface.h \ - gras_simix/DataDesc/gras_simix_datadesc_private.h \ - gras_simix/DataDesc/gras_simix_ddt_parse.c \ - gras_simix/DataDesc/gras_simix_ddt_parse.yy.c \ - gras_simix/DataDesc/gras_simix_ddt_parse.yy.h gras/gras.c \ - gras/Transport/transport.c gras/Transport/transport_private.h \ - gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ - gras/Msg/msg_interface.h gras/Msg/msg_private.h \ - gras/Virtu/process.c gras/Virtu/gras_module.c \ - gras/DataDesc/ddt_create.c gras/DataDesc/ddt_convert.c \ - gras/DataDesc/ddt_exchange.c gras/DataDesc/cbps.c \ - gras/DataDesc/datadesc.c gras/DataDesc/datadesc_interface.h \ + xbt/graphxml_parse.c gras/gras.c gras/Transport/transport.c \ + gras/Transport/transport_private.h gras/Msg/msg.c \ + gras/Msg/rpc.c gras/Msg/timer.c gras/Msg/msg_interface.h \ + gras/Msg/msg_private.h gras/Virtu/process.c \ + gras/Virtu/gras_module.c gras/DataDesc/ddt_create.c \ + gras/DataDesc/ddt_convert.c gras/DataDesc/ddt_exchange.c \ + gras/DataDesc/cbps.c gras/DataDesc/datadesc.c \ + gras/DataDesc/datadesc_interface.h \ gras/DataDesc/datadesc_private.h gras/DataDesc/ddt_parse.c \ gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h \ xbt/context.c surf/maxmin.c surf/lagrange.c surf/trace_mgr.c \ @@ -257,69 +123,44 @@ am__libsimgrid_la_SOURCES_DIST = xbt/snprintf.c xbt/xbt_str.c xbt/ex.c \ surf/sdp.c simix/smx_global.c simix/smx_deployment.c \ simix/smx_config.c simix/smx_environment.c simix/smx_host.c \ simix/smx_process.c simix/smx_action.c simix/smx_synchro.c \ - msg_simix/msg_simix_config.c msg_simix/msg_simix_task.c \ - msg_simix/msg_simix_host.c msg_simix/msg_simix_process.c \ - msg_simix/msg_simix_gos.c msg_simix/msg_simix_global.c \ - msg_simix/msg_simix_environment.c \ - msg_simix/msg_simix_deployment.c \ - gras_simix/Transport/gras_simix_sg_transport.c \ - gras_simix/Transport/gras_simix_transport_plugin_sg.c \ - gras_simix/Virtu/gras_simix_sg_emul.c \ - gras_simix/Virtu/gras_simix_sg_process.c \ - gras_simix/Virtu/gras_simix_sg_time.c \ - gras_simix/Virtu/gras_simix_sg_dns.c \ - gras_simix/gras_simix_sg_stubs.c \ - gras_simix/Msg/gras_simix_sg_msg.c msg/msg_config.c msg/task.c \ - msg/host.c msg/m_process.c msg/gos.c msg/global.c \ - msg/environment.c msg/deployment.c \ + msg/msg_config.c msg/task.c msg/host.c msg/m_process.c \ + msg/gos.c msg/global.c msg/environment.c msg/deployment.c \ gras/Transport/sg_transport.c \ gras/Transport/transport_plugin_sg.c gras/Virtu/sg_emul.c \ gras/Virtu/sg_process.c gras/Virtu/sg_time.c \ gras/Virtu/sg_dns.c gras/sg_stubs.c gras/Msg/sg_msg.c \ amok/amok_base.c amok/Bandwidth/bandwidth.c \ amok/Bandwidth/saturate.c amok/PeerManagement/peermanagement.c -am__objects_7 = gtnets_simulator.lo gtnets_topology.lo \ +am__objects_4 = gtnets_simulator.lo gtnets_topology.lo \ gtnets_interface.lo network_gtnets.lo -@USE_GTNETS_TRUE@am__objects_8 = $(am__objects_7) -@HAVE_SDP_TRUE@am__objects_9 = sdp.lo -am__objects_10 = smx_global.lo smx_deployment.lo smx_config.lo \ +@USE_GTNETS_TRUE@am__objects_5 = $(am__objects_4) +@HAVE_SDP_TRUE@am__objects_6 = sdp.lo +am__objects_7 = smx_global.lo smx_deployment.lo smx_config.lo \ smx_environment.lo smx_host.lo smx_process.lo smx_action.lo \ smx_synchro.lo -am__objects_11 = msg_simix_config.lo msg_simix_task.lo \ - msg_simix_host.lo msg_simix_process.lo msg_simix_gos.lo \ - msg_simix_global.lo msg_simix_environment.lo \ - msg_simix_deployment.lo -am__objects_12 = gras_simix_sg_transport.lo \ - gras_simix_transport_plugin_sg.lo gras_simix_sg_emul.lo \ - gras_simix_sg_process.lo gras_simix_sg_time.lo \ - gras_simix_sg_dns.lo gras_simix_sg_stubs.lo \ - gras_simix_sg_msg.lo -@USE_SIMIX_TRUE@am__objects_13 = $(am__objects_10) $(am__objects_11) \ -@USE_SIMIX_TRUE@ $(am__objects_12) -am__objects_14 = msg_config.lo task.lo host.lo m_process.lo gos.lo \ +am__objects_8 = msg_config.lo task.lo host.lo m_process.lo gos.lo \ global.lo environment.lo deployment.lo -am__objects_15 = sg_transport.lo transport_plugin_sg.lo sg_emul.lo \ +am__objects_9 = sg_transport.lo transport_plugin_sg.lo sg_emul.lo \ sg_process.lo sg_time.lo sg_dns.lo sg_stubs.lo sg_msg.lo -@USE_SIMIX_FALSE@am__objects_16 = $(am__objects_14) $(am__objects_15) -am__objects_17 = context.lo maxmin.lo lagrange.lo trace_mgr.lo surf.lo \ +am__objects_10 = context.lo maxmin.lo lagrange.lo trace_mgr.lo surf.lo \ surfxml_parse.lo cpu.lo network.lo workstation.lo \ surf_timer.lo network_dassf.lo workstation_KCCFLN05.lo \ sd_global.lo sd_link.lo sd_task.lo sd_workstation.lo \ - $(am__objects_8) $(am__objects_9) $(am__objects_13) \ - $(am__objects_16) -am_libsimgrid_la_OBJECTS = $(am__objects_3) $(am__objects_17) \ - $(am__objects_5) + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) +am_libsimgrid_la_OBJECTS = $(am__objects_1) $(am__objects_10) \ + $(am__objects_3) libsimgrid_la_OBJECTS = $(am_libsimgrid_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am__testall_SOURCES_DIST = ./cunit_unit.c ./ex_unit.c ./dynar_unit.c \ ./dict_unit.c ./set_unit.c ./swag_unit.c ./xbt_str_unit.c \ ./config_unit.c simgrid_units_main.c -@GRAMINE_MODE_FALSE@am__objects_18 = cunit_unit.$(OBJEXT) \ +@GRAMINE_MODE_FALSE@am__objects_11 = cunit_unit.$(OBJEXT) \ @GRAMINE_MODE_FALSE@ ex_unit.$(OBJEXT) dynar_unit.$(OBJEXT) \ @GRAMINE_MODE_FALSE@ dict_unit.$(OBJEXT) set_unit.$(OBJEXT) \ @GRAMINE_MODE_FALSE@ swag_unit.$(OBJEXT) xbt_str_unit.$(OBJEXT) \ @GRAMINE_MODE_FALSE@ config_unit.$(OBJEXT) -@GRAMINE_MODE_FALSE@am_testall_OBJECTS = $(am__objects_18) \ +@GRAMINE_MODE_FALSE@am_testall_OBJECTS = $(am__objects_11) \ @GRAMINE_MODE_FALSE@ simgrid_units_main.$(OBJEXT) testall_OBJECTS = $(am_testall_OBJECTS) @GRAMINE_MODE_FALSE@testall_DEPENDENCIES = libgras.la @@ -344,8 +185,8 @@ CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgras_la_SOURCES) $(libsimgrid_la_SOURCES) \ $(testall_SOURCES) -DIST_SOURCES = $(am__libgras_la_SOURCES_DIST) \ - $(am__libsimgrid_la_SOURCES_DIST) $(am__testall_SOURCES_DIST) +DIST_SOURCES = $(libgras_la_SOURCES) $(am__libsimgrid_la_SOURCES_DIST) \ + $(am__testall_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -431,8 +272,6 @@ SIMGRID_DEP = @SIMGRID_DEP@ STRIP = @STRIP@ USE_GTNETS_FALSE = @USE_GTNETS_FALSE@ USE_GTNETS_TRUE = @USE_GTNETS_TRUE@ -USE_SIMIX_FALSE = @USE_SIMIX_FALSE@ -USE_SIMIX_TRUE = @USE_SIMIX_TRUE@ VERSION = @VERSION@ WARNING = @WARNING@ abs_builddir = @abs_builddir@ @@ -520,11 +359,7 @@ EXTRA_DIST = portable.h xbt/mallocator_private.h xbt/dynar_private.h \ include/xbt/xbt_portability.h include/xbt/xbt_thread.h \ include/xbt/context.h msg/private.h simdag/private.h \ amok/Bandwidth/bandwidth_private.h amok/amok_modinter.h \ - $(am__append_1) $(am__append_2) $(am__append_4) \ - $(am__append_6) $(am__append_8) $(am__append_10) \ - $(am__append_13) - -# gras_private.h + $(am__append_2) $(am__append_4) $(am__append_5) #LIBRARY_VERSION= 0:0:0 # | | | @@ -538,7 +373,7 @@ EXTRA_DIST = portable.h xbt/mallocator_private.h xbt/dynar_private.h \ # | +- Increment if source code has changed # | Set to zero if current is incremented # +- Increment if interfaces have been added, removed or changed -VERSION_INFO = -version-info 1:0:0 +VERSION_INFO = -version-info 2:0:0 # from `info libtool "Updating version info"` # and `info libtool "Release numbers"` # @@ -570,8 +405,16 @@ COMMON_SRC = xbt/snprintf.c xbt/xbt_str.c xbt/ex.c xbt_modinter.h \ xbt/dict.c xbt/dict_elm.c xbt/dict_cursor.c xbt/dict_multi.c \ xbt/heap.c xbt/fifo.c xbt/swag.c xbt/graph.c xbt/set.c \ xbt/xbt_matrix.c xbt/xbt_peer.c xbt/xbt_main.c xbt/config.c \ - xbt/cunit.c xbt/graphxml_parse.c $(am__append_9) \ - $(am__append_12) + xbt/cunit.c xbt/graphxml_parse.c gras/gras.c \ + gras/Transport/transport.c gras/Transport/transport_private.h \ + gras/Msg/msg.c gras/Msg/rpc.c gras/Msg/timer.c \ + gras/Msg/msg_interface.h gras/Msg/msg_private.h \ + gras/Virtu/process.c gras/Virtu/gras_module.c \ + gras/DataDesc/ddt_create.c gras/DataDesc/ddt_convert.c \ + gras/DataDesc/ddt_exchange.c gras/DataDesc/cbps.c \ + gras/DataDesc/datadesc.c gras/DataDesc/datadesc_interface.h \ + gras/DataDesc/datadesc_private.h gras/DataDesc/ddt_parse.c \ + gras/DataDesc/ddt_parse.yy.c gras/DataDesc/ddt_parse.yy.h RL_SRC = \ gras/rl_stubs.c xbt/xbt_thread.c \ \ @@ -584,25 +427,13 @@ RL_SRC = \ \ gras/Msg/rl_msg.c -RL_SIMIX_SRC = \ - gras_simix/gras_simix_rl_stubs.c xbt/xbt_thread.c \ - \ - gras_simix/Transport/gras_simix_rl_transport.c \ - gras_simix/Transport/gras_simix_transport_plugin_file.c gras_simix/Transport/gras_simix_transport_plugin_tcp.c \ - \ - gras_simix/Virtu/gras_simix_rl_emul.c \ - gras_simix/Virtu/gras_simix_rl_process.c gras_simix/Virtu/gras_simix_rl_time.c \ - gras_simix/Virtu/gras_simix_rl_dns.c\ - \ - gras_simix/Msg/gras_simix_rl_msg.c - SG_SRC = xbt/context.c surf/maxmin.c surf/lagrange.c surf/trace_mgr.c \ surf/surf.c surf/surfxml_parse.c surf/cpu.c surf/network.c \ surf/workstation.c surf/surf_timer.c surf/network_dassf.c \ surf/workstation_KCCFLN05.c simdag/sd_global.c \ simdag/sd_link.c simdag/sd_task.c simdag/sd_workstation.c \ - $(am__append_3) $(am__append_5) $(am__append_7) \ - $(am__append_11) + $(am__append_1) $(am__append_3) $(SIMIX_SRC) $(MSG_SRC) \ + $(GRAS_SG_SRC) GTNETS_SRC = \ surf/gtnets/gtnets_simulator.cc \ surf/gtnets/gtnets_topology.cc \ @@ -623,16 +454,7 @@ MSG_SRC = msg/msg_config.c \ msg/task.c msg/host.c msg/m_process.c msg/gos.c \ msg/global.c msg/environment.c msg/deployment.c -MSG_SIMIX_SRC = msg_simix/msg_simix_config.c \ - msg_simix/msg_simix_task.c \ - msg_simix/msg_simix_host.c \ - msg_simix/msg_simix_process.c \ - msg_simix/msg_simix_gos.c \ - msg_simix/msg_simix_global.c \ - msg_simix/msg_simix_environment.c \ - msg_simix/msg_simix_deployment.c - -GRAS_SRC = gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ +GRAS_SG_SRC = gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c \ \ gras/Virtu/sg_emul.c \ gras/Virtu/sg_process.c gras/Virtu/sg_time.c \ @@ -641,15 +463,6 @@ GRAS_SRC = gras/Transport/sg_transport.c gras/Transport/transport_plugin_sg.c gras/sg_stubs.c \ gras/Msg/sg_msg.c -GRAS_SIMIX_SRC = gras_simix/Transport/gras_simix_sg_transport.c gras_simix/Transport/gras_simix_transport_plugin_sg.c \ - \ - gras_simix/Virtu/gras_simix_sg_emul.c \ - gras_simix/Virtu/gras_simix_sg_process.c gras_simix/Virtu/gras_simix_sg_time.c \ - gras_simix/Virtu/gras_simix_sg_dns.c\ - \ - gras_simix/gras_simix_sg_stubs.c \ - gras_simix/Msg/gras_simix_sg_msg.c - AMOK_SRC = \ amok/amok_base.c \ amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \ @@ -673,12 +486,11 @@ AMOK_SRC = \ @GRAMINE_MODE_FALSE@testall_SOURCES = $(TEST_UNITS) simgrid_units_main.c @GRAMINE_MODE_FALSE@testall_LDADD = libgras.la @GRAMINE_MODE_FALSE@TESTS = testall -@USE_SIMIX_FALSE@libgras_la_SOURCES = $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC) ### ### Declare the library content ### -@USE_SIMIX_TRUE@libgras_la_SOURCES = $(COMMON_SRC) $(RL_SIMIX_SRC) $(AMOK_SRC) +libgras_la_SOURCES = $(COMMON_SRC) $(RL_SRC) $(AMOK_SRC) libgras_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GTNETS_LDFLAGS@ @GRAS_DEP@ @LD_DYNAMIC_FLAGS@ -lm libsimgrid_la_SOURCES = $(COMMON_SRC) $(SG_SRC) $(AMOK_SRC) libsimgrid_la_LDFLAGS = -no-undefined $(VERSION_INFO) @GTNETS_LDFLAGS@ @SIMGRID_DEP@ @LD_DYNAMIC_FLAGS@ -lm @@ -817,37 +629,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphxml_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_cbps.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_datadesc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_ddt_convert.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_ddt_create.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_ddt_exchange.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_ddt_parse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_ddt_parse.yy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_gras.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_gras_module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_msg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_process.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_dns.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_emul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_msg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_process.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_stubs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rl_transport.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_rpc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_dns.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_emul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_msg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_process.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_stubs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_sg_transport.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_timer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_transport.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_transport_plugin_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_transport_plugin_sg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gras_simix_transport_plugin_tcp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtnets_interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtnets_simulator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtnets_topology.Plo@am__quote@ @@ -860,14 +641,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maxmin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_deployment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_environment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_global.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_gos.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_host.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_process.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_simix_task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_dassf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_gtnets.Plo@am__quote@ @@ -1134,104 +907,6 @@ graphxml_parse.lo: xbt/graphxml_parse.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o graphxml_parse.lo `test -f 'xbt/graphxml_parse.c' || echo '$(srcdir)/'`xbt/graphxml_parse.c -gras_simix_gras.lo: gras_simix/gras_simix_gras.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_gras.lo -MD -MP -MF "$(DEPDIR)/gras_simix_gras.Tpo" -c -o gras_simix_gras.lo `test -f 'gras_simix/gras_simix_gras.c' || echo '$(srcdir)/'`gras_simix/gras_simix_gras.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_gras.Tpo" "$(DEPDIR)/gras_simix_gras.Plo"; else rm -f "$(DEPDIR)/gras_simix_gras.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/gras_simix_gras.c' object='gras_simix_gras.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_gras.lo `test -f 'gras_simix/gras_simix_gras.c' || echo '$(srcdir)/'`gras_simix/gras_simix_gras.c - -gras_simix_transport.lo: gras_simix/Transport/gras_simix_transport.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_transport.lo -MD -MP -MF "$(DEPDIR)/gras_simix_transport.Tpo" -c -o gras_simix_transport.lo `test -f 'gras_simix/Transport/gras_simix_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_transport.Tpo" "$(DEPDIR)/gras_simix_transport.Plo"; else rm -f "$(DEPDIR)/gras_simix_transport.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_transport.c' object='gras_simix_transport.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_transport.lo `test -f 'gras_simix/Transport/gras_simix_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport.c - -gras_simix_msg.lo: gras_simix/Msg/gras_simix_msg.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_msg.lo -MD -MP -MF "$(DEPDIR)/gras_simix_msg.Tpo" -c -o gras_simix_msg.lo `test -f 'gras_simix/Msg/gras_simix_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_msg.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_msg.Tpo" "$(DEPDIR)/gras_simix_msg.Plo"; else rm -f "$(DEPDIR)/gras_simix_msg.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Msg/gras_simix_msg.c' object='gras_simix_msg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_msg.lo `test -f 'gras_simix/Msg/gras_simix_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_msg.c - -gras_simix_rpc.lo: gras_simix/Msg/gras_simix_rpc.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rpc.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rpc.Tpo" -c -o gras_simix_rpc.lo `test -f 'gras_simix/Msg/gras_simix_rpc.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_rpc.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rpc.Tpo" "$(DEPDIR)/gras_simix_rpc.Plo"; else rm -f "$(DEPDIR)/gras_simix_rpc.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Msg/gras_simix_rpc.c' object='gras_simix_rpc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rpc.lo `test -f 'gras_simix/Msg/gras_simix_rpc.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_rpc.c - -gras_simix_timer.lo: gras_simix/Msg/gras_simix_timer.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_timer.lo -MD -MP -MF "$(DEPDIR)/gras_simix_timer.Tpo" -c -o gras_simix_timer.lo `test -f 'gras_simix/Msg/gras_simix_timer.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_timer.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_timer.Tpo" "$(DEPDIR)/gras_simix_timer.Plo"; else rm -f "$(DEPDIR)/gras_simix_timer.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Msg/gras_simix_timer.c' object='gras_simix_timer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_timer.lo `test -f 'gras_simix/Msg/gras_simix_timer.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_timer.c - -gras_simix_process.lo: gras_simix/Virtu/gras_simix_process.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_process.lo -MD -MP -MF "$(DEPDIR)/gras_simix_process.Tpo" -c -o gras_simix_process.lo `test -f 'gras_simix/Virtu/gras_simix_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_process.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_process.Tpo" "$(DEPDIR)/gras_simix_process.Plo"; else rm -f "$(DEPDIR)/gras_simix_process.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_process.c' object='gras_simix_process.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_process.lo `test -f 'gras_simix/Virtu/gras_simix_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_process.c - -gras_simix_gras_module.lo: gras_simix/Virtu/gras_simix_gras_module.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_gras_module.lo -MD -MP -MF "$(DEPDIR)/gras_simix_gras_module.Tpo" -c -o gras_simix_gras_module.lo `test -f 'gras_simix/Virtu/gras_simix_gras_module.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_gras_module.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_gras_module.Tpo" "$(DEPDIR)/gras_simix_gras_module.Plo"; else rm -f "$(DEPDIR)/gras_simix_gras_module.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_gras_module.c' object='gras_simix_gras_module.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_gras_module.lo `test -f 'gras_simix/Virtu/gras_simix_gras_module.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_gras_module.c - -gras_simix_ddt_create.lo: gras_simix/DataDesc/gras_simix_ddt_create.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_ddt_create.lo -MD -MP -MF "$(DEPDIR)/gras_simix_ddt_create.Tpo" -c -o gras_simix_ddt_create.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_create.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_create.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_ddt_create.Tpo" "$(DEPDIR)/gras_simix_ddt_create.Plo"; else rm -f "$(DEPDIR)/gras_simix_ddt_create.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_ddt_create.c' object='gras_simix_ddt_create.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_ddt_create.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_create.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_create.c - -gras_simix_ddt_convert.lo: gras_simix/DataDesc/gras_simix_ddt_convert.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_ddt_convert.lo -MD -MP -MF "$(DEPDIR)/gras_simix_ddt_convert.Tpo" -c -o gras_simix_ddt_convert.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_convert.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_convert.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_ddt_convert.Tpo" "$(DEPDIR)/gras_simix_ddt_convert.Plo"; else rm -f "$(DEPDIR)/gras_simix_ddt_convert.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_ddt_convert.c' object='gras_simix_ddt_convert.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_ddt_convert.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_convert.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_convert.c - -gras_simix_ddt_exchange.lo: gras_simix/DataDesc/gras_simix_ddt_exchange.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_ddt_exchange.lo -MD -MP -MF "$(DEPDIR)/gras_simix_ddt_exchange.Tpo" -c -o gras_simix_ddt_exchange.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_exchange.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_exchange.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_ddt_exchange.Tpo" "$(DEPDIR)/gras_simix_ddt_exchange.Plo"; else rm -f "$(DEPDIR)/gras_simix_ddt_exchange.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_ddt_exchange.c' object='gras_simix_ddt_exchange.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_ddt_exchange.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_exchange.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_exchange.c - -gras_simix_cbps.lo: gras_simix/DataDesc/gras_simix_cbps.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_cbps.lo -MD -MP -MF "$(DEPDIR)/gras_simix_cbps.Tpo" -c -o gras_simix_cbps.lo `test -f 'gras_simix/DataDesc/gras_simix_cbps.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_cbps.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_cbps.Tpo" "$(DEPDIR)/gras_simix_cbps.Plo"; else rm -f "$(DEPDIR)/gras_simix_cbps.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_cbps.c' object='gras_simix_cbps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_cbps.lo `test -f 'gras_simix/DataDesc/gras_simix_cbps.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_cbps.c - -gras_simix_datadesc.lo: gras_simix/DataDesc/gras_simix_datadesc.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_datadesc.lo -MD -MP -MF "$(DEPDIR)/gras_simix_datadesc.Tpo" -c -o gras_simix_datadesc.lo `test -f 'gras_simix/DataDesc/gras_simix_datadesc.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_datadesc.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_datadesc.Tpo" "$(DEPDIR)/gras_simix_datadesc.Plo"; else rm -f "$(DEPDIR)/gras_simix_datadesc.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_datadesc.c' object='gras_simix_datadesc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_datadesc.lo `test -f 'gras_simix/DataDesc/gras_simix_datadesc.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_datadesc.c - -gras_simix_ddt_parse.lo: gras_simix/DataDesc/gras_simix_ddt_parse.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_ddt_parse.lo -MD -MP -MF "$(DEPDIR)/gras_simix_ddt_parse.Tpo" -c -o gras_simix_ddt_parse.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_parse.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_parse.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_ddt_parse.Tpo" "$(DEPDIR)/gras_simix_ddt_parse.Plo"; else rm -f "$(DEPDIR)/gras_simix_ddt_parse.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_ddt_parse.c' object='gras_simix_ddt_parse.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_ddt_parse.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_parse.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_parse.c - -gras_simix_ddt_parse.yy.lo: gras_simix/DataDesc/gras_simix_ddt_parse.yy.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_ddt_parse.yy.lo -MD -MP -MF "$(DEPDIR)/gras_simix_ddt_parse.yy.Tpo" -c -o gras_simix_ddt_parse.yy.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_parse.yy.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_parse.yy.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_ddt_parse.yy.Tpo" "$(DEPDIR)/gras_simix_ddt_parse.yy.Plo"; else rm -f "$(DEPDIR)/gras_simix_ddt_parse.yy.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/DataDesc/gras_simix_ddt_parse.yy.c' object='gras_simix_ddt_parse.yy.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_ddt_parse.yy.lo `test -f 'gras_simix/DataDesc/gras_simix_ddt_parse.yy.c' || echo '$(srcdir)/'`gras_simix/DataDesc/gras_simix_ddt_parse.yy.c - gras.lo: gras/gras.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras.lo -MD -MP -MF "$(DEPDIR)/gras.Tpo" -c -o gras.lo `test -f 'gras/gras.c' || echo '$(srcdir)/'`gras/gras.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras.Tpo" "$(DEPDIR)/gras.Plo"; else rm -f "$(DEPDIR)/gras.Tpo"; exit 1; fi @@ -1428,69 +1103,6 @@ peermanagement.lo: amok/PeerManagement/peermanagement.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o peermanagement.lo `test -f 'amok/PeerManagement/peermanagement.c' || echo '$(srcdir)/'`amok/PeerManagement/peermanagement.c -gras_simix_rl_stubs.lo: gras_simix/gras_simix_rl_stubs.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_stubs.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_stubs.Tpo" -c -o gras_simix_rl_stubs.lo `test -f 'gras_simix/gras_simix_rl_stubs.c' || echo '$(srcdir)/'`gras_simix/gras_simix_rl_stubs.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_stubs.Tpo" "$(DEPDIR)/gras_simix_rl_stubs.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_stubs.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/gras_simix_rl_stubs.c' object='gras_simix_rl_stubs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_stubs.lo `test -f 'gras_simix/gras_simix_rl_stubs.c' || echo '$(srcdir)/'`gras_simix/gras_simix_rl_stubs.c - -gras_simix_rl_transport.lo: gras_simix/Transport/gras_simix_rl_transport.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_transport.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_transport.Tpo" -c -o gras_simix_rl_transport.lo `test -f 'gras_simix/Transport/gras_simix_rl_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_rl_transport.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_transport.Tpo" "$(DEPDIR)/gras_simix_rl_transport.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_transport.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_rl_transport.c' object='gras_simix_rl_transport.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_transport.lo `test -f 'gras_simix/Transport/gras_simix_rl_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_rl_transport.c - -gras_simix_transport_plugin_file.lo: gras_simix/Transport/gras_simix_transport_plugin_file.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_transport_plugin_file.lo -MD -MP -MF "$(DEPDIR)/gras_simix_transport_plugin_file.Tpo" -c -o gras_simix_transport_plugin_file.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_file.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_file.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_transport_plugin_file.Tpo" "$(DEPDIR)/gras_simix_transport_plugin_file.Plo"; else rm -f "$(DEPDIR)/gras_simix_transport_plugin_file.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_transport_plugin_file.c' object='gras_simix_transport_plugin_file.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_transport_plugin_file.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_file.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_file.c - -gras_simix_transport_plugin_tcp.lo: gras_simix/Transport/gras_simix_transport_plugin_tcp.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_transport_plugin_tcp.lo -MD -MP -MF "$(DEPDIR)/gras_simix_transport_plugin_tcp.Tpo" -c -o gras_simix_transport_plugin_tcp.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_tcp.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_tcp.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_transport_plugin_tcp.Tpo" "$(DEPDIR)/gras_simix_transport_plugin_tcp.Plo"; else rm -f "$(DEPDIR)/gras_simix_transport_plugin_tcp.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_transport_plugin_tcp.c' object='gras_simix_transport_plugin_tcp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_transport_plugin_tcp.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_tcp.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_tcp.c - -gras_simix_rl_emul.lo: gras_simix/Virtu/gras_simix_rl_emul.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_emul.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_emul.Tpo" -c -o gras_simix_rl_emul.lo `test -f 'gras_simix/Virtu/gras_simix_rl_emul.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_emul.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_emul.Tpo" "$(DEPDIR)/gras_simix_rl_emul.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_emul.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_rl_emul.c' object='gras_simix_rl_emul.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_emul.lo `test -f 'gras_simix/Virtu/gras_simix_rl_emul.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_emul.c - -gras_simix_rl_process.lo: gras_simix/Virtu/gras_simix_rl_process.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_process.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_process.Tpo" -c -o gras_simix_rl_process.lo `test -f 'gras_simix/Virtu/gras_simix_rl_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_process.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_process.Tpo" "$(DEPDIR)/gras_simix_rl_process.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_process.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_rl_process.c' object='gras_simix_rl_process.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_process.lo `test -f 'gras_simix/Virtu/gras_simix_rl_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_process.c - -gras_simix_rl_time.lo: gras_simix/Virtu/gras_simix_rl_time.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_time.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_time.Tpo" -c -o gras_simix_rl_time.lo `test -f 'gras_simix/Virtu/gras_simix_rl_time.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_time.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_time.Tpo" "$(DEPDIR)/gras_simix_rl_time.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_time.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_rl_time.c' object='gras_simix_rl_time.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_time.lo `test -f 'gras_simix/Virtu/gras_simix_rl_time.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_time.c - -gras_simix_rl_dns.lo: gras_simix/Virtu/gras_simix_rl_dns.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_dns.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_dns.Tpo" -c -o gras_simix_rl_dns.lo `test -f 'gras_simix/Virtu/gras_simix_rl_dns.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_dns.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_dns.Tpo" "$(DEPDIR)/gras_simix_rl_dns.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_dns.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_rl_dns.c' object='gras_simix_rl_dns.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_dns.lo `test -f 'gras_simix/Virtu/gras_simix_rl_dns.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_rl_dns.c - -gras_simix_rl_msg.lo: gras_simix/Msg/gras_simix_rl_msg.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_rl_msg.lo -MD -MP -MF "$(DEPDIR)/gras_simix_rl_msg.Tpo" -c -o gras_simix_rl_msg.lo `test -f 'gras_simix/Msg/gras_simix_rl_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_rl_msg.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_rl_msg.Tpo" "$(DEPDIR)/gras_simix_rl_msg.Plo"; else rm -f "$(DEPDIR)/gras_simix_rl_msg.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Msg/gras_simix_rl_msg.c' object='gras_simix_rl_msg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_rl_msg.lo `test -f 'gras_simix/Msg/gras_simix_rl_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_rl_msg.c - context.lo: xbt/context.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT context.lo -MD -MP -MF "$(DEPDIR)/context.Tpo" -c -o context.lo `test -f 'xbt/context.c' || echo '$(srcdir)/'`xbt/context.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/context.Tpo" "$(DEPDIR)/context.Plo"; else rm -f "$(DEPDIR)/context.Tpo"; exit 1; fi @@ -1673,118 +1285,6 @@ smx_synchro.lo: simix/smx_synchro.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o smx_synchro.lo `test -f 'simix/smx_synchro.c' || echo '$(srcdir)/'`simix/smx_synchro.c -msg_simix_config.lo: msg_simix/msg_simix_config.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_config.lo -MD -MP -MF "$(DEPDIR)/msg_simix_config.Tpo" -c -o msg_simix_config.lo `test -f 'msg_simix/msg_simix_config.c' || echo '$(srcdir)/'`msg_simix/msg_simix_config.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_config.Tpo" "$(DEPDIR)/msg_simix_config.Plo"; else rm -f "$(DEPDIR)/msg_simix_config.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_config.c' object='msg_simix_config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_config.lo `test -f 'msg_simix/msg_simix_config.c' || echo '$(srcdir)/'`msg_simix/msg_simix_config.c - -msg_simix_task.lo: msg_simix/msg_simix_task.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_task.lo -MD -MP -MF "$(DEPDIR)/msg_simix_task.Tpo" -c -o msg_simix_task.lo `test -f 'msg_simix/msg_simix_task.c' || echo '$(srcdir)/'`msg_simix/msg_simix_task.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_task.Tpo" "$(DEPDIR)/msg_simix_task.Plo"; else rm -f "$(DEPDIR)/msg_simix_task.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_task.c' object='msg_simix_task.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_task.lo `test -f 'msg_simix/msg_simix_task.c' || echo '$(srcdir)/'`msg_simix/msg_simix_task.c - -msg_simix_host.lo: msg_simix/msg_simix_host.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_host.lo -MD -MP -MF "$(DEPDIR)/msg_simix_host.Tpo" -c -o msg_simix_host.lo `test -f 'msg_simix/msg_simix_host.c' || echo '$(srcdir)/'`msg_simix/msg_simix_host.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_host.Tpo" "$(DEPDIR)/msg_simix_host.Plo"; else rm -f "$(DEPDIR)/msg_simix_host.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_host.c' object='msg_simix_host.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_host.lo `test -f 'msg_simix/msg_simix_host.c' || echo '$(srcdir)/'`msg_simix/msg_simix_host.c - -msg_simix_process.lo: msg_simix/msg_simix_process.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_process.lo -MD -MP -MF "$(DEPDIR)/msg_simix_process.Tpo" -c -o msg_simix_process.lo `test -f 'msg_simix/msg_simix_process.c' || echo '$(srcdir)/'`msg_simix/msg_simix_process.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_process.Tpo" "$(DEPDIR)/msg_simix_process.Plo"; else rm -f "$(DEPDIR)/msg_simix_process.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_process.c' object='msg_simix_process.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_process.lo `test -f 'msg_simix/msg_simix_process.c' || echo '$(srcdir)/'`msg_simix/msg_simix_process.c - -msg_simix_gos.lo: msg_simix/msg_simix_gos.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_gos.lo -MD -MP -MF "$(DEPDIR)/msg_simix_gos.Tpo" -c -o msg_simix_gos.lo `test -f 'msg_simix/msg_simix_gos.c' || echo '$(srcdir)/'`msg_simix/msg_simix_gos.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_gos.Tpo" "$(DEPDIR)/msg_simix_gos.Plo"; else rm -f "$(DEPDIR)/msg_simix_gos.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_gos.c' object='msg_simix_gos.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_gos.lo `test -f 'msg_simix/msg_simix_gos.c' || echo '$(srcdir)/'`msg_simix/msg_simix_gos.c - -msg_simix_global.lo: msg_simix/msg_simix_global.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_global.lo -MD -MP -MF "$(DEPDIR)/msg_simix_global.Tpo" -c -o msg_simix_global.lo `test -f 'msg_simix/msg_simix_global.c' || echo '$(srcdir)/'`msg_simix/msg_simix_global.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_global.Tpo" "$(DEPDIR)/msg_simix_global.Plo"; else rm -f "$(DEPDIR)/msg_simix_global.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_global.c' object='msg_simix_global.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_global.lo `test -f 'msg_simix/msg_simix_global.c' || echo '$(srcdir)/'`msg_simix/msg_simix_global.c - -msg_simix_environment.lo: msg_simix/msg_simix_environment.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_environment.lo -MD -MP -MF "$(DEPDIR)/msg_simix_environment.Tpo" -c -o msg_simix_environment.lo `test -f 'msg_simix/msg_simix_environment.c' || echo '$(srcdir)/'`msg_simix/msg_simix_environment.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_environment.Tpo" "$(DEPDIR)/msg_simix_environment.Plo"; else rm -f "$(DEPDIR)/msg_simix_environment.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_environment.c' object='msg_simix_environment.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_environment.lo `test -f 'msg_simix/msg_simix_environment.c' || echo '$(srcdir)/'`msg_simix/msg_simix_environment.c - -msg_simix_deployment.lo: msg_simix/msg_simix_deployment.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_simix_deployment.lo -MD -MP -MF "$(DEPDIR)/msg_simix_deployment.Tpo" -c -o msg_simix_deployment.lo `test -f 'msg_simix/msg_simix_deployment.c' || echo '$(srcdir)/'`msg_simix/msg_simix_deployment.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_simix_deployment.Tpo" "$(DEPDIR)/msg_simix_deployment.Plo"; else rm -f "$(DEPDIR)/msg_simix_deployment.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='msg_simix/msg_simix_deployment.c' object='msg_simix_deployment.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg_simix_deployment.lo `test -f 'msg_simix/msg_simix_deployment.c' || echo '$(srcdir)/'`msg_simix/msg_simix_deployment.c - -gras_simix_sg_transport.lo: gras_simix/Transport/gras_simix_sg_transport.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_transport.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_transport.Tpo" -c -o gras_simix_sg_transport.lo `test -f 'gras_simix/Transport/gras_simix_sg_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_sg_transport.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_transport.Tpo" "$(DEPDIR)/gras_simix_sg_transport.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_transport.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_sg_transport.c' object='gras_simix_sg_transport.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_transport.lo `test -f 'gras_simix/Transport/gras_simix_sg_transport.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_sg_transport.c - -gras_simix_transport_plugin_sg.lo: gras_simix/Transport/gras_simix_transport_plugin_sg.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_transport_plugin_sg.lo -MD -MP -MF "$(DEPDIR)/gras_simix_transport_plugin_sg.Tpo" -c -o gras_simix_transport_plugin_sg.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_sg.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_sg.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_transport_plugin_sg.Tpo" "$(DEPDIR)/gras_simix_transport_plugin_sg.Plo"; else rm -f "$(DEPDIR)/gras_simix_transport_plugin_sg.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Transport/gras_simix_transport_plugin_sg.c' object='gras_simix_transport_plugin_sg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_transport_plugin_sg.lo `test -f 'gras_simix/Transport/gras_simix_transport_plugin_sg.c' || echo '$(srcdir)/'`gras_simix/Transport/gras_simix_transport_plugin_sg.c - -gras_simix_sg_emul.lo: gras_simix/Virtu/gras_simix_sg_emul.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_emul.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_emul.Tpo" -c -o gras_simix_sg_emul.lo `test -f 'gras_simix/Virtu/gras_simix_sg_emul.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_emul.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_emul.Tpo" "$(DEPDIR)/gras_simix_sg_emul.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_emul.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_sg_emul.c' object='gras_simix_sg_emul.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_emul.lo `test -f 'gras_simix/Virtu/gras_simix_sg_emul.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_emul.c - -gras_simix_sg_process.lo: gras_simix/Virtu/gras_simix_sg_process.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_process.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_process.Tpo" -c -o gras_simix_sg_process.lo `test -f 'gras_simix/Virtu/gras_simix_sg_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_process.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_process.Tpo" "$(DEPDIR)/gras_simix_sg_process.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_process.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_sg_process.c' object='gras_simix_sg_process.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_process.lo `test -f 'gras_simix/Virtu/gras_simix_sg_process.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_process.c - -gras_simix_sg_time.lo: gras_simix/Virtu/gras_simix_sg_time.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_time.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_time.Tpo" -c -o gras_simix_sg_time.lo `test -f 'gras_simix/Virtu/gras_simix_sg_time.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_time.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_time.Tpo" "$(DEPDIR)/gras_simix_sg_time.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_time.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_sg_time.c' object='gras_simix_sg_time.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_time.lo `test -f 'gras_simix/Virtu/gras_simix_sg_time.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_time.c - -gras_simix_sg_dns.lo: gras_simix/Virtu/gras_simix_sg_dns.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_dns.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_dns.Tpo" -c -o gras_simix_sg_dns.lo `test -f 'gras_simix/Virtu/gras_simix_sg_dns.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_dns.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_dns.Tpo" "$(DEPDIR)/gras_simix_sg_dns.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_dns.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Virtu/gras_simix_sg_dns.c' object='gras_simix_sg_dns.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_dns.lo `test -f 'gras_simix/Virtu/gras_simix_sg_dns.c' || echo '$(srcdir)/'`gras_simix/Virtu/gras_simix_sg_dns.c - -gras_simix_sg_stubs.lo: gras_simix/gras_simix_sg_stubs.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_stubs.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_stubs.Tpo" -c -o gras_simix_sg_stubs.lo `test -f 'gras_simix/gras_simix_sg_stubs.c' || echo '$(srcdir)/'`gras_simix/gras_simix_sg_stubs.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_stubs.Tpo" "$(DEPDIR)/gras_simix_sg_stubs.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_stubs.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/gras_simix_sg_stubs.c' object='gras_simix_sg_stubs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_stubs.lo `test -f 'gras_simix/gras_simix_sg_stubs.c' || echo '$(srcdir)/'`gras_simix/gras_simix_sg_stubs.c - -gras_simix_sg_msg.lo: gras_simix/Msg/gras_simix_sg_msg.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gras_simix_sg_msg.lo -MD -MP -MF "$(DEPDIR)/gras_simix_sg_msg.Tpo" -c -o gras_simix_sg_msg.lo `test -f 'gras_simix/Msg/gras_simix_sg_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_sg_msg.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gras_simix_sg_msg.Tpo" "$(DEPDIR)/gras_simix_sg_msg.Plo"; else rm -f "$(DEPDIR)/gras_simix_sg_msg.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gras_simix/Msg/gras_simix_sg_msg.c' object='gras_simix_sg_msg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gras_simix_sg_msg.lo `test -f 'gras_simix/Msg/gras_simix_sg_msg.c' || echo '$(srcdir)/'`gras_simix/Msg/gras_simix_sg_msg.c - msg_config.lo: msg/msg_config.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msg_config.lo -MD -MP -MF "$(DEPDIR)/msg_config.Tpo" -c -o msg_config.lo `test -f 'msg/msg_config.c' || echo '$(srcdir)/'`msg/msg_config.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msg_config.Tpo" "$(DEPDIR)/msg_config.Plo"; else rm -f "$(DEPDIR)/msg_config.Tpo"; exit 1; fi @@ -2183,7 +1683,7 @@ check-TESTS: $(TESTS) else :; fi distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../acmacro $(distdir)/amok $(distdir)/amok/Bandwidth $(distdir)/gras/DataDesc $(distdir)/gras/Transport $(distdir)/gras/Virtu $(distdir)/gras_simix $(distdir)/gras_simix/DataDesc $(distdir)/gras_simix/Msg $(distdir)/gras_simix/Transport $(distdir)/gras_simix/Virtu $(distdir)/include/simix $(distdir)/include/surf $(distdir)/include/xbt $(distdir)/msg $(distdir)/msg_simix $(distdir)/simdag $(distdir)/simix $(distdir)/surf $(distdir)/surf/gtnets $(distdir)/xbt + $(mkdir_p) $(distdir)/../acmacro $(distdir)/amok $(distdir)/amok/Bandwidth $(distdir)/include/surf $(distdir)/include/xbt $(distdir)/msg $(distdir)/simdag $(distdir)/surf $(distdir)/surf/gtnets $(distdir)/xbt @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -2311,6 +1811,9 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES + \ + include/simix/simix.h include/simix/datatypes.h \ + simix/msg_simix_private.h @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@./cunit_unit.c: xbt/cunit.c @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@ @top_srcdir@/tools/sg_unit_extractor.pl $^ diff --git a/src/gras/DataDesc/ddt_parse.yy.c b/src/gras/DataDesc/ddt_parse.yy.c index 3c9ea34c44..1b9e0b1f85 100644 --- a/src/gras/DataDesc/ddt_parse.yy.c +++ b/src/gras/DataDesc/ddt_parse.yy.c @@ -8,7 +8,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 31 +#define YY_FLEX_SUBMINOR_VERSION 33 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -30,7 +30,15 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; @@ -134,6 +142,10 @@ typedef unsigned int flex_uint32_t; #define YY_BUF_SIZE 16384 #endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; @@ -267,7 +279,7 @@ int gras_ddt_parse_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow gras_ddt_parse_wrap()'s to do buffer switches @@ -515,6 +527,8 @@ char *gras_ddt_parse_text; #define YY_EXTRA_TYPE void * #endif +static int yy_init_globals (void ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -653,9 +667,9 @@ YY_DECL int comment_caller=0; int annotate_caller=0; - if ( (yy_init) ) + if ( !(yy_init) ) { - (yy_init) = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; @@ -1177,7 +1191,7 @@ static int yy_get_next_buffer (void) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1489,9 +1503,7 @@ static void gras_ddt_parse__load_buffer_state (void) } #ifndef __cplusplus -#ifndef _WIN32 extern int isatty (int ); -#endif #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. @@ -1680,16 +1692,16 @@ YY_BUFFER_STATE gras_ddt_parse__scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to gras_ddt_parse_lex() will * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan + * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * gras_ddt_parse__scan_bytes() instead. */ -YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char * yy_str ) +YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char * yystr ) { - return gras_ddt_parse__scan_bytes(yy_str,strlen(yy_str) ); + return gras_ddt_parse__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to gras_ddt_parse_lex() will @@ -1699,7 +1711,7 @@ YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char * yy_str ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE gras_ddt_parse__scan_bytes (yyconst char * bytes, int len ) +YY_BUFFER_STATE gras_ddt_parse__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1707,15 +1719,15 @@ YY_BUFFER_STATE gras_ddt_parse__scan_bytes (yyconst char * bytes, int len ) int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; + n = _yybytes_len + 2; buf = (char *) gras_ddt_parse_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = gras_ddt_parse__scan_buffer(buf,n ); if ( ! b ) @@ -1836,6 +1848,34 @@ void gras_ddt_parse_set_debug (int bdebug ) gras_ddt_parse__flex_debug = bdebug ; } +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from gras_ddt_parse_lex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + gras_ddt_parse_in = stdin; + gras_ddt_parse_out = stdout; +#else + gras_ddt_parse_in = (FILE *) 0; + gras_ddt_parse_out = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * gras_ddt_parse_lex_init() + */ + return 0; +} + /* gras_ddt_parse_lex_destroy is for both reentrant and non-reentrant scanners. */ int gras_ddt_parse_lex_destroy (void) { @@ -1851,6 +1891,10 @@ int gras_ddt_parse_lex_destroy (void) gras_ddt_parse_free((yy_buffer_stack) ); (yy_buffer_stack) = NULL; + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * gras_ddt_parse_lex() is called, initialization will occur. */ + yy_init_globals( ); + return 0; } @@ -1862,7 +1906,7 @@ int gras_ddt_parse_lex_destroy (void) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; - for ( i = 0; i < n; ++i ) + for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif @@ -1871,7 +1915,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static int yy_flex_strlen (yyconst char * s ) { register int n; - for ( n = 0; s[n]; ++n ) + for ( n = 0; s[n]; ++n ) ; return n; @@ -1902,19 +1946,6 @@ void gras_ddt_parse_free (void * ptr ) #define YYTABLES_NAME "yytables" -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef yytext_ptr -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif - /* {space}+ { return(TOKEN_SPACE);} */ void gras_ddt_parse_dump(void) { diff --git a/src/gras/Msg/msg.c b/src/gras/Msg/msg.c index 6fcf0ad434..f1f89a4ad6 100644 --- a/src/gras/Msg/msg.c +++ b/src/gras/Msg/msg.c @@ -39,6 +39,7 @@ static void *gras_msg_procdata_new() { res->msg_waitqueue = xbt_dynar_new(sizeof(s_gras_msg_t), NULL); res->cbl_list = xbt_dynar_new(sizeof(gras_cblist_t *),gras_cbl_free); res->timers = xbt_dynar_new(sizeof(s_gras_timer_t), NULL); + res->msg_to_receive_queue = xbt_fifo_new(); return (void*)res; } @@ -53,6 +54,7 @@ static void gras_msg_procdata_free(void *data) { xbt_dynar_free(&( res->msg_waitqueue )); xbt_dynar_free(&( res->cbl_list )); xbt_dynar_free(&( res->timers )); + xbt_fifo_free( res->msg_to_receive_queue ); free(res->name); free(res); diff --git a/src/gras/Msg/msg_interface.h b/src/gras/Msg/msg_interface.h index 3595ead608..2cb52fe0d3 100644 --- a/src/gras/Msg/msg_interface.h +++ b/src/gras/Msg/msg_interface.h @@ -13,6 +13,7 @@ #define GRAS_MSG_INTERFACE_H #include "gras/transport.h" +#include "xbt/fifo.h" /* * Data of this module specific to each process @@ -36,6 +37,9 @@ typedef struct { /* registered timers */ xbt_dynar_t timers; /* elm type: s_gras_timer_t */ + + /* queue storing the msgs that have to received and the process synchronization made (wait the surf action done) */ + xbt_fifo_t msg_to_receive_queue; /* elm type: s_gras_msg_t */ } s_gras_msg_procdata_t,*gras_msg_procdata_t; diff --git a/src/gras/Msg/sg_msg.c b/src/gras/Msg/sg_msg.c index 67b2d8b32b..afd8d342e3 100644 --- a/src/gras/Msg/sg_msg.c +++ b/src/gras/Msg/sg_msg.c @@ -20,26 +20,40 @@ XBT_LOG_EXTERNAL_CATEGORY(gras_msg); XBT_LOG_DEFAULT_CATEGORY(gras_msg); +typedef void* gras_trp_bufdata_; + void gras_msg_send_ext(gras_socket_t sock, e_gras_msg_kind_t kind, unsigned long int ID, gras_msgtype_t msgtype, void *payload) { - m_task_t task=NULL; - gras_trp_sg_sock_data_t *sock_data = (gras_trp_sg_sock_data_t *)sock->data; - gras_msg_t msg; + smx_action_t act; /* simix action */ + gras_trp_sg_sock_data_t *sock_data; + gras_hostdata_t *hd; + gras_trp_procdata_t trp_remote_proc; + gras_msg_procdata_t msg_remote_proc; + gras_msg_t msg; /* message to send */ int whole_payload_size=0; /* msg->payload_size is used to memcpy the payload. This is used to report the load onto the simulator. It also counts the size of pointed stuff */ - char *name; + + sock_data = (gras_trp_sg_sock_data_t *)sock->data; + + hd = (gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); xbt_assert1(!gras_socket_is_meas(sock), "Asked to send a message on the measurement socket %p", sock); - - msg=xbt_new0(s_gras_msg_t,1); - msg->type=msgtype; - msg->ID = ID; - + + /* got the mutex my port */ + DEBUG1("Sock port %d",sock->port); + SIMIX_mutex_lock(sock_data->mutex); + + /*initialize gras message */ + msg = xbt_new(s_gras_msg_t,1); + msg->expe = sock; + msg->kind = kind; + msg->type = msgtype; + msg->ID = ID; if (kind == e_gras_msg_kind_rpcerror) { /* error on remote host, carfull, payload is an exception */ msg->payl_size=gras_datadesc_size(gras_datadesc_by_name("ex_t")); @@ -59,33 +73,37 @@ void gras_msg_send_ext(gras_socket_t sock, whole_payload_size = gras_datadesc_copy(msgtype->ctn_type, payload, msg->payl); } + /* put message on msg_queue */ + msg_remote_proc = (gras_msg_procdata_t)gras_libdata_by_name_from_remote("gras_msg",sock_data->to_process); + xbt_fifo_push(msg_remote_proc->msg_to_receive_queue,msg); + + /* wake-up the receiver */ + trp_remote_proc = (gras_trp_procdata_t)gras_libdata_by_name_from_remote("gras_trp",sock_data->to_process); + xbt_fifo_push(trp_remote_proc->active_socket,sock); - msg->kind = kind; + SIMIX_cond_signal(trp_remote_proc->cond); - if (XBT_LOG_ISENABLED(gras_msg,xbt_log_priority_verbose)) { - asprintf(&name,"type:'%s';kind:'%s';ID %lu from %s:%d to %s:%d", - msg->type->name, e_gras_msg_kind_names[msg->kind], msg->ID, - gras_os_myname(),gras_os_myport(), - gras_socket_peer_name(sock), gras_socket_peer_port(sock)); - task=MSG_task_create(name,0, - ((double)whole_payload_size),msg); - free(name); - } else { - task=MSG_task_create(msg->type->name,0, - ((double)whole_payload_size),msg); - } - + /* wait for the receiver */ + SIMIX_cond_wait(sock_data->cond, sock_data->mutex); - DEBUG1("Prepare to send a message to %s", - MSG_host_get_name (sock_data->to_host)); - if (MSG_task_put_with_timeout(task, sock_data->to_host,sock_data->to_chan,60.0) != MSG_OK) - THROW0(system_error,0,"Problem during the MSG_task_put with timeout 60"); + /* creates simix action and waits its ends, waits in the sender host condition*/ + act = SIMIX_action_communicate(SIMIX_host_self(), sock_data->to_host,msgtype->name, (double)whole_payload_size, -1); + SIMIX_register_action_to_condition(act,sock_data->cond); + SIMIX_register_condition_to_action(act,sock_data->cond); + + VERB5("Sending to %s(%s) a message type '%s' kind '%s' ID %lu", + SIMIX_host_get_name(sock_data->to_host),SIMIX_process_get_name(sock_data->to_process), + msg->type->name,e_gras_msg_kind_names[msg->kind], msg->ID); + + SIMIX_cond_wait(sock_data->cond, sock_data->mutex); + /* error treatmeant */ + + /* cleanup structures */ + SIMIX_action_destroy(act); + SIMIX_mutex_unlock(sock_data->mutex); + + VERB0("Message sent"); - VERB5("Sent to %s(%d) a message type '%s' kind '%s' ID %lu", - MSG_host_get_name(sock_data->to_host),sock_data->to_PID, - msg->type->name, - e_gras_msg_kind_names[msg->kind], - msg->ID); } /* * receive the next message on the given socket. @@ -94,30 +112,41 @@ void gras_msg_recv(gras_socket_t sock, gras_msg_t msg) { - m_task_t task=NULL; + gras_trp_sg_sock_data_t *sock_data; + gras_trp_sg_sock_data_t *remote_sock_data; + gras_hostdata_t *remote_hd; gras_msg_t msg_got; - gras_trp_procdata_t pd=(gras_trp_procdata_t)gras_libdata_by_name("gras_trp"); + gras_msg_procdata_t msg_procdata = (gras_msg_procdata_t)gras_libdata_by_name("gras_msg"); xbt_assert1(!gras_socket_is_meas(sock), "Asked to receive a message on the measurement socket %p", sock); xbt_assert0(msg,"msg is an out parameter of gras_msg_recv..."); + sock_data = (gras_trp_sg_sock_data_t *)sock->data; + remote_sock_data = ((gras_trp_sg_sock_data_t *)sock->data)->to_socket->data; + DEBUG3("Remote host %s, Remote Port: %d Local port %d", SIMIX_host_get_name(sock_data->to_host), sock->peer_port, sock->port); + remote_hd = (gras_hostdata_t *)SIMIX_host_get_data(sock_data->to_host); - if (MSG_task_get(&task, pd->chan) != MSG_OK) - THROW0(system_error,0,"Error in MSG_task_get()"); + if (xbt_fifo_size(msg_procdata->msg_to_receive_queue) == 0 ) { + THROW_IMPOSSIBLE; + } + DEBUG1("Size msg_to_receive buffer: %d", xbt_fifo_size(msg_procdata->msg_to_receive_queue)); + msg_got = xbt_fifo_shift(msg_procdata->msg_to_receive_queue); - msg_got=MSG_task_get_data(task); + SIMIX_mutex_lock(remote_sock_data->mutex); +/* ok, I'm here, you can continuate the communication */ + SIMIX_cond_signal(remote_sock_data->cond); +/* wait for communication end */ + SIMIX_cond_wait(remote_sock_data->cond,remote_sock_data->mutex); - msg_got->expe= msg->expe; + msg_got->expe= msg->expe; memcpy(msg,msg_got,sizeof(s_gras_msg_t)); + xbt_free(msg_got); + SIMIX_mutex_unlock(remote_sock_data->mutex); - free(msg_got); - if (MSG_task_destroy(task) != MSG_OK) - THROW0(system_error,0,"Error in MSG_task_destroy()"); - - VERB3("Received a message type '%s' kind '%s' ID %lu",// from %s", + VERB3("Received a message type '%s' kind '%s' ID %lu",// from %s", msg->type->name, e_gras_msg_kind_names[msg->kind], msg->ID); diff --git a/src/gras/Transport/sg_transport.c b/src/gras/Transport/sg_transport.c index e11b1166be..a767070c6d 100644 --- a/src/gras/Transport/sg_transport.c +++ b/src/gras/Transport/sg_transport.c @@ -9,7 +9,6 @@ #include "xbt/ex.h" #include "gras/Transport/transport_private.h" -#include "msg/msg.h" #include "gras/Virtu/virtu_sg.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_trp); @@ -17,7 +16,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_trp); /* check transport_private.h for an explanation of this variable; this just need to be defined to NULL in SG */ gras_socket_t _gras_lastly_selected_socket = NULL; -/** +/** * gras_trp_select: * * Returns the next socket to service having a message awaiting. @@ -29,112 +28,94 @@ gras_socket_t _gras_lastly_selected_socket = NULL; * if timeout>0 and no message there, wait at most that amount of time before giving up. */ gras_socket_t gras_trp_select(double timeout) { - - gras_socket_t res; - gras_trp_procdata_t pd = - (gras_trp_procdata_t) gras_libdata_by_id(gras_trp_libdata_id); - gras_trp_sg_sock_data_t *sockdata; - gras_trp_plugin_t trp; + gras_socket_t res; + gras_trp_procdata_t pd = (gras_trp_procdata_t) gras_libdata_by_id(gras_trp_libdata_id); + gras_trp_sg_sock_data_t *sockdata; + gras_trp_plugin_t trp; + gras_socket_t active_socket; + gras_socket_t sock_iter; /* iterating over all sockets */ + int cursor; + + DEBUG0("Trying to get the lock pd, trp_select"); + SIMIX_mutex_lock(pd->mutex); + DEBUG3("select on %s@%s with timeout=%f", + SIMIX_process_get_name(SIMIX_process_self()), + SIMIX_host_get_name(SIMIX_host_self()), + timeout); + + if (xbt_fifo_size(pd->active_socket) == 0) { + /* message didn't arrive yet, wait */ + SIMIX_cond_wait_timeout(pd->cond,pd->mutex,timeout); + } - gras_socket_t sock_iter; /* iterating over all sockets */ - int cursor,cpt; + if (xbt_fifo_size(pd->active_socket) == 0) { + DEBUG0("TIMEOUT"); + SIMIX_mutex_unlock(pd->mutex); + THROW0(timeout_error,0,"Timeout"); + } + active_socket = xbt_fifo_shift(pd->active_socket); + + /* Ok, got something. Open a socket back to the expeditor */ + + /* Try to reuse an already openned socket to that expeditor */ + DEBUG1("Open sockets size %lu",xbt_dynar_length(pd->sockets)); + xbt_dynar_foreach(pd->sockets,cursor,sock_iter) { + DEBUG1("Consider %p as outgoing socket to expeditor",sock_iter); + + if (sock_iter->meas || !sock_iter->outgoing) + continue; + /* + if ((sock_iter->peer_port == active_socket->port) && + (((gras_trp_sg_sock_data_t*)sock_iter->data)->to_host == SIMIX_process_get_host(((gras_trp_sg_sock_data_t*)active_socket->data)->from_process))) { + */ + if ( (((gras_trp_sg_sock_data_t*)sock_iter->data)->to_socket == active_socket) && (((gras_trp_sg_sock_data_t*)sock_iter->data)->to_host == SIMIX_process_get_host(((gras_trp_sg_sock_data_t*)active_socket->data)->from_process)) ) { + SIMIX_mutex_unlock(pd->mutex); + return sock_iter; + } + } - gras_sg_portrec_t pr; /* iterating to find the chanel of expeditor */ + /* Socket to expeditor not created yet */ + DEBUG0("Create a socket to the expeditor"); - int r_pid; - gras_hostdata_t *remote_hd; + trp = gras_trp_plugin_get_by_name("sg"); - DEBUG3("select on %s@%s with timeout=%f", - MSG_process_get_name(MSG_process_self()), - MSG_host_get_name(MSG_host_self()), - timeout); + gras_trp_socket_new(1,&res); + res->plugin = trp; - MSG_channel_select_from((m_channel_t) pd->chan, timeout, &r_pid); - - if (r_pid < 0) { - DEBUG0("TIMEOUT"); - THROW0(timeout_error,0,"Timeout"); - } - - /* Ok, got something. Open a socket back to the expeditor */ - - /* Try to reuse an already openned socket to that expeditor */ - xbt_dynar_foreach(pd->sockets,cursor,sock_iter) { - DEBUG1("Consider %p as outgoing socket to expeditor",sock_iter); - - if (sock_iter->meas || !sock_iter->outgoing) - continue; - - sockdata = sock_iter->data; - if (sockdata->to_PID == r_pid) { - return sock_iter; - } - } - - /* Socket to expeditor not created yet */ - DEBUG0("Create a socket to the expeditor"); - - trp = gras_trp_plugin_get_by_name("sg"); - - gras_trp_socket_new(1,&res); - res->plugin = trp; - - res->incoming = 1; - res->outgoing = 1; - res->accepting = 0; - res->sd = -1; - - res->port = -1; - - sockdata = xbt_new(gras_trp_sg_sock_data_t,1); - sockdata->from_PID = MSG_process_self_PID(); - sockdata->to_PID = r_pid; - sockdata->to_host = MSG_process_get_host(MSG_process_from_PID(r_pid)); - res->data = sockdata; - gras_trp_buf_init_sock(res); - - res->peer_name = strdup(MSG_host_get_name(sockdata->to_host)); - - remote_hd=(gras_hostdata_t *)MSG_host_get_data(sockdata->to_host); - xbt_assert0(remote_hd,"Run gras_process_init!!"); - - sockdata->to_chan = -1; - res->peer_port = -10; - for (cursor=0; cursorproc[cursor] == r_pid) { - sockdata->to_chan = cursor; - DEBUG2("Chan %d on %s is for my pal", - cursor,res->peer_name); - - xbt_dynar_foreach(remote_hd->ports, cpt, pr) { - if (sockdata->to_chan == pr.tochan) { - if (pr.meas) { - DEBUG0("Damn, it's for measurement"); - continue; - } - - res->peer_port = pr.port; - DEBUG1("Cool, it points to port %d", pr.port); - break; - } else { - DEBUG2("Wrong port (tochan=%d, looking for %d)\n", - pr.tochan,sockdata->to_chan); - } - } - if (res->peer_port == -10) { - /* was for measurement */ - sockdata->to_chan = -1; - } else { - /* found it, don't let it override by meas */ - break; - } - } - } - res->peer_port = ((gras_trp_procdata_t) gras_libdata_by_name_from_remote("gras_trp",MSG_process_from_PID(r_pid)))->myport; - xbt_assert0(sockdata->to_chan != -1, - "Got a message from a process without channel"); - - return res; + res->incoming = 1; + res->outgoing = 1; + res->accepting = 0; + res->sd = -1; + + res->port = -1; + + /* initialize the ports */ + //res->peer_port = active_socket->port; + res->port = active_socket->peer_port; + + /* create sockdata */ + sockdata = xbt_new(gras_trp_sg_sock_data_t,1); + sockdata->from_process = SIMIX_process_self(); + sockdata->to_process = ((gras_trp_sg_sock_data_t*)(active_socket->data))->from_process; + + res->peer_port = ((gras_trp_procdata_t)gras_libdata_by_name_from_remote("gras_trp",sockdata->to_process))->myport; + sockdata->to_socket = active_socket; + /*update the peer to_socket variable */ + ((gras_trp_sg_sock_data_t*)active_socket->data)->to_socket = res; + sockdata->cond = SIMIX_cond_init(); + sockdata->mutex = SIMIX_mutex_init(); + + sockdata->to_host = SIMIX_process_get_host(((gras_trp_sg_sock_data_t*)(active_socket->data))->from_process); + + res->data = sockdata; + res->peer_name = strdup(SIMIX_host_get_name(sockdata->to_host)); + + gras_trp_buf_init_sock(res); + + DEBUG4("Create socket to process:%s(Port %d) from process: %s(Port %d)",SIMIX_process_get_name(sockdata->from_process),res->peer_port, SIMIX_process_get_name(sockdata->to_process), res->port); + + SIMIX_mutex_unlock(pd->mutex); + return res; } diff --git a/src/gras/Transport/transport.c b/src/gras/Transport/transport.c index 134b418420..e668b3f32a 100644 --- a/src/gras/Transport/transport.c +++ b/src/gras/Transport/transport.c @@ -97,10 +97,7 @@ void gras_trp_init(void){ void gras_trp_exit(void){ - xbt_dynar_t sockets = ((gras_trp_procdata_t) gras_libdata_by_id(gras_trp_libdata_id))->sockets; - gras_socket_t sock_iter; - int cursor; - + DEBUG1("gras_trp value %d",_gras_trp_started); if (_gras_trp_started == 0) { return; } @@ -115,13 +112,6 @@ gras_trp_exit(void){ } #endif - /* Close all the sockets */ - xbt_dynar_foreach(sockets,cursor,sock_iter) { - VERB1("Closing the socket %p left open on exit. Maybe a socket leak?", - sock_iter); - gras_socket_close(sock_iter); - } - /* Delete the plugins */ xbt_dict_free(&_gras_trp_plugins); } @@ -360,20 +350,22 @@ void gras_socket_close(gras_socket_t sock) { } /* FIXME: Issue an event when the socket is closed */ + DEBUG1("sockets pointer before %p",sockets); if (sock) { - xbt_dynar_foreach(sockets,cursor,sock_iter) { - if (sock == sock_iter) { - xbt_dynar_cursor_rm(sockets,&cursor); - if (sock->plugin->socket_close) - (* sock->plugin->socket_close)(sock); - - /* free the memory */ - if (sock->peer_name) - free(sock->peer_name); - free(sock); - XBT_OUT; - return; - } + xbt_dynar_foreach(sockets,cursor,sock_iter) { + if (sock == sock_iter) { + DEBUG2("remove sock cursor %d dize %lu\n",cursor,xbt_dynar_length(sockets)); + xbt_dynar_cursor_rm(sockets,&cursor); + if (sock->plugin->socket_close) + (* sock->plugin->socket_close)(sock); + + /* free the memory */ + if (sock->peer_name) + free(sock->peer_name); + free(sock); + XBT_OUT; + return; + } } WARN1("Ignoring request to free an unknown socket (%p). Execution stack:",sock); xbt_backtrace_display(); @@ -573,7 +565,7 @@ static void *gras_trp_procdata_new() { res->name = xbt_strdup("gras_trp"); res->name_len = 0; - res->sockets = xbt_dynar_new(sizeof(gras_socket_t*), NULL); + res->sockets = xbt_dynar_new(sizeof(gras_socket_t*), NULL); res->myport = 0; return (void*)res; diff --git a/src/gras/Transport/transport_interface.h b/src/gras/Transport/transport_interface.h index 411f4217d6..eb6064b8ee 100644 --- a/src/gras/Transport/transport_interface.h +++ b/src/gras/Transport/transport_interface.h @@ -13,6 +13,7 @@ #define GRAS_TRP_INTERFACE_H #include "portable.h" /* sometimes needed for fd_set */ +#include "simix/simix.h" /*** *** Options @@ -102,8 +103,9 @@ typedef struct { fd_set *fdset; /* SG only elements. In RL, they are part of the OS ;) */ - int chan; /* Formated messages channel */ - int measChan; /* Unformated echange channel for performance measurement*/ + smx_cond_t cond; + smx_mutex_t mutex; + xbt_fifo_t active_socket; } s_gras_trp_procdata_t,*gras_trp_procdata_t; diff --git a/src/gras/Transport/transport_plugin_file.c b/src/gras/Transport/transport_plugin_file.c index 1b559697a1..a09864ed16 100644 --- a/src/gras/Transport/transport_plugin_file.c +++ b/src/gras/Transport/transport_plugin_file.c @@ -8,7 +8,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "portable.h" -#include "transport_private.h" +#include "gras/Transport/transport_private.h" #include "xbt/ex.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_file,gras_trp, diff --git a/src/gras/Transport/transport_plugin_sg.c b/src/gras/Transport/transport_plugin_sg.c index b19a9f837b..e7b59a480a 100644 --- a/src/gras/Transport/transport_plugin_sg.c +++ b/src/gras/Transport/transport_plugin_sg.c @@ -13,9 +13,8 @@ #include "xbt/ex.h" -#include "msg/msg.h" - -#include "transport_private.h" +#include "gras/Msg/msg_private.h" +#include "gras/Transport/transport_private.h" #include "gras/Virtu/virtu_sg.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_trp_sg,gras_trp,"SimGrid pseudo-transport"); @@ -96,16 +95,16 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self, /* OUT */ gras_socket_t sock){ xbt_ex_t e; - m_host_t peer; + smx_host_t peer; gras_hostdata_t *hd; gras_trp_sg_sock_data_t *data; gras_sg_portrec_t pr; /* make sure this socket will reach someone */ - if (!(peer=MSG_get_host_by_name(sock->peer_name))) + if (!(peer=SIMIX_host_get_by_name(sock->peer_name))) THROW1(mismatch_error,0,"Can't connect to %s: no such host.\n",sock->peer_name); - if (!(hd=(gras_hostdata_t *)MSG_host_get_data(peer))) + if (!(hd=(gras_hostdata_t *)SIMIX_host_get_data(peer))) THROW1(mismatch_error,0, "can't connect to %s: no process on this host", sock->peer_name); @@ -132,40 +131,41 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self, "can't connect to %s:%d in meas mode, the process listen " "in regular mode on this port",sock->peer_name,sock->peer_port); } - /* create the socket */ data = xbt_new(gras_trp_sg_sock_data_t,1); - data->from_PID = MSG_process_self_PID(); - data->to_PID = hd->proc[ pr.tochan ]; + data->from_process = SIMIX_process_self(); + data->to_process = pr.process; data->to_host = peer; - data->to_chan = pr.tochan; - + + /* initialize mutex and condition of the socket */ + data->mutex = SIMIX_mutex_init(); + data->cond = SIMIX_cond_init(); + data->to_socket = pr.socket; + sock->data = data; sock->incoming = 1; - DEBUG6("%s (PID %d) connects in %s mode to %s:%d (to_PID=%d)", - MSG_process_get_name(MSG_process_self()), MSG_process_self_PID(), + DEBUG5("%s (PID %ld) connects in %s mode to %s:%d", + SIMIX_process_get_name(SIMIX_process_self()), gras_os_getpid(), sock->meas?"meas":"regular", - sock->peer_name,sock->peer_port,data->to_PID); + sock->peer_name,sock->peer_port); } void gras_trp_sg_socket_server(gras_trp_plugin_t self, gras_socket_t sock){ - gras_hostdata_t *hd=(gras_hostdata_t *)MSG_host_get_data(MSG_host_self()); - gras_trp_procdata_t pd=(gras_trp_procdata_t)gras_libdata_by_id(gras_trp_libdata_id); + gras_hostdata_t *hd=(gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); gras_sg_portrec_t pr; gras_trp_sg_sock_data_t *data; volatile int found; - const char *host=MSG_host_get_name(MSG_host_self()); + const char *host=SIMIX_host_get_name(SIMIX_host_self()); xbt_ex_t e; xbt_assert0(hd,"Please run gras_process_init on each process"); sock->accepting = 0; /* no such nuisance in SG */ - found = 0; TRY { find_port(hd,sock->port,&pr); @@ -182,53 +182,61 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self, "can't listen on address %s:%d: port already in use.", host,sock->port); - pr.tochan = sock->meas ? pd->measChan : pd->chan; pr.port = sock->port; pr.meas = sock->meas; + pr.socket = sock; + pr.process = SIMIX_process_self(); xbt_dynar_push(hd->ports,&pr); /* Create the socket */ data = xbt_new(gras_trp_sg_sock_data_t,1); - data->from_PID = -1; - data->to_PID = MSG_process_self_PID(); - data->to_host = MSG_host_self(); - data->to_chan = pd->chan; + data->from_process = SIMIX_process_self(); + data->to_process = NULL; + data->to_host = SIMIX_host_self(); + data->cond = SIMIX_cond_init(); + data->mutex = SIMIX_mutex_init(); + sock->data = data; - VERB6("'%s' (%d) ears on %s:%d%s (%p)", - MSG_process_get_name(MSG_process_self()), MSG_process_self_PID(), + VERB6("'%s' (%ld) ears on %s:%d%s (%p)", + SIMIX_process_get_name(SIMIX_process_self()), gras_os_getpid(), host,sock->port,sock->meas? " (mode meas)":"",sock); + } void gras_trp_sg_socket_close(gras_socket_t sock){ - gras_hostdata_t *hd=(gras_hostdata_t *)MSG_host_get_data(MSG_host_self()); + gras_hostdata_t *hd=(gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); int cpt; - - gras_sg_portrec_t pr; + gras_sg_portrec_t pr; XBT_IN1(" (sock=%p)",sock); if (!sock) return; + xbt_assert0(hd,"Please run gras_process_init on each process"); - if (sock->data) - free(sock->data); + if (sock->data) { + SIMIX_cond_destroy(((gras_trp_sg_sock_data_t*)sock->data)->cond); + SIMIX_mutex_destroy(((gras_trp_sg_sock_data_t*)sock->data)->mutex); + free(sock->data); + } - if (sock->incoming && sock->port >= 0) { + if (sock->incoming && !sock->outgoing && sock->port >= 0) { /* server mode socket. Unregister it from 'OS' tables */ xbt_dynar_foreach(hd->ports, cpt, pr) { DEBUG2("Check pr %d of %lu", cpt, xbt_dynar_length(hd->ports)); if (pr.port == sock->port) { - xbt_dynar_cursor_rm(hd->ports, &cpt); - XBT_OUT; - return; + xbt_dynar_cursor_rm(hd->ports, &cpt); + XBT_OUT; + return; } } WARN2("socket_close called on the unknown incoming socket %p (port=%d)", sock,sock->port); } XBT_OUT; + } typedef struct { @@ -246,72 +254,141 @@ void gras_trp_sg_chunk_send(gras_socket_t sock, void gras_trp_sg_chunk_send_raw(gras_socket_t sock, const char *data, unsigned long int size) { - m_task_t task=NULL; - static unsigned int count=0; char name[256]; - gras_trp_sg_sock_data_t *sock_data = (gras_trp_sg_sock_data_t *)sock->data; - sg_task_data_t *task_data; - + static unsigned int count=0; + + smx_action_t act; /* simix action */ + gras_trp_sg_sock_data_t *sock_data; + gras_trp_sg_sock_data_t *remote_sock_data; + gras_hostdata_t *hd; + gras_hostdata_t *remote_hd; + gras_trp_procdata_t trp_remote_proc; + gras_msg_procdata_t msg_remote_proc; + gras_msg_t msg; /* message to send */ + + sock_data = (gras_trp_sg_sock_data_t *)sock->data; + remote_sock_data = ((gras_trp_sg_sock_data_t *)sock->data)->to_socket->data; + hd = (gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); + remote_hd = (gras_hostdata_t *)SIMIX_host_get_data(sock_data->to_host); + xbt_assert0(sock->meas, "SG chunk exchange shouldn't be used on non-measurement sockets"); + sprintf(name,"Chunk[%d]",count++); + /*initialize gras message */ + msg = xbt_new(s_gras_msg_t,1); + msg->expe = sock; + msg->payl_size=size; - task_data=xbt_new(sg_task_data_t,1); - task_data->size = size; if (data) { - task_data->data=(void*)xbt_malloc(size); - memcpy(task_data->data,data,size); + msg->payl=(void*)xbt_malloc(size); + memcpy(msg->payl,data,size); } else { - task_data->data = NULL; + msg->payl = NULL; } - task=MSG_task_create(name,0,((double)size),task_data); - + /* put message on msg_queue */ + msg_remote_proc = (gras_msg_procdata_t)gras_libdata_by_name_from_remote("gras_msg",sock_data->to_process); + xbt_fifo_push(msg_remote_proc->msg_to_receive_queue,msg); + + /* wake-up the receiver */ + trp_remote_proc = (gras_trp_procdata_t)gras_libdata_by_name_from_remote("gras_trp",sock_data->to_process); + SIMIX_cond_signal(trp_remote_proc->cond); + + SIMIX_mutex_lock(remote_sock_data->mutex); + //SIMIX_mutex_lock(remote_hd->mutex_port[sock->peer_port]); + /* wait for the receiver */ + SIMIX_cond_wait(remote_sock_data->cond,remote_sock_data->mutex); + //SIMIX_cond_wait(remote_hd->cond_port[sock->peer_port], remote_hd->mutex_port[sock->peer_port]); + + /* creates simix action and waits its ends, waits in the sender host condition*/ DEBUG5("send chunk %s from %s to %s:%d (size=%ld)", - name, MSG_host_get_name(MSG_host_self()), - MSG_host_get_name(sock_data->to_host), sock_data->to_chan,size); - if (MSG_task_put_with_timeout(task, sock_data->to_host,sock_data->to_chan,60.0) != MSG_OK) { - THROW0(system_error,0,"Problem during the MSG_task_put with timeout 60"); - } + name, SIMIX_host_get_name(SIMIX_host_self()), + SIMIX_host_get_name(sock_data->to_host), sock->peer_port,size); + + act = SIMIX_action_communicate(SIMIX_host_self(), sock_data->to_host, name, size, -1); + /* + SIMIX_register_action_to_condition(act,remote_hd->cond_port[sock->peer_port]); + SIMIX_register_condition_to_action(act,remote_hd->cond_port[sock->peer_port]); + */ + SIMIX_register_action_to_condition(act,remote_sock_data->cond); + SIMIX_register_condition_to_action(act,remote_sock_data->cond); + + SIMIX_host_get_name(sock_data->to_host),SIMIX_process_get_name(sock_data->to_process), + + SIMIX_cond_wait(remote_sock_data->cond,remote_sock_data->mutex); + //SIMIX_cond_wait(remote_hd->cond_port[sock->peer_port], remote_hd->mutex_port[sock->peer_port]); + /* error treatmeant */ + + /* cleanup structures */ + SIMIX_action_destroy(act); + + SIMIX_mutex_unlock(remote_sock_data->mutex); + //SIMIX_mutex_unlock(remote_hd->mutex_port[sock->peer_port]); + SIMIX_cond_signal(remote_sock_data->cond); + //SIMIX_cond_signal(remote_hd->cond_port[sock->peer_port]); } int gras_trp_sg_chunk_recv(gras_socket_t sock, char *data, unsigned long int size){ gras_trp_procdata_t pd=(gras_trp_procdata_t)gras_libdata_by_id(gras_trp_libdata_id); - - m_task_t task=NULL; - sg_task_data_t *task_data; - gras_trp_sg_sock_data_t *sock_data = sock->data; + gras_trp_sg_sock_data_t *sock_data; + gras_hostdata_t *remote_hd; + gras_hostdata_t *local_hd; + gras_msg_t msg_got; + gras_msg_procdata_t msg_procdata = (gras_msg_procdata_t)gras_libdata_by_name("gras_msg"); xbt_assert0(sock->meas, "SG chunk exchange shouldn't be used on non-measurement sockets"); - XBT_IN; - DEBUG4("recv chunk on %s -> %s:%d (size=%ld)", - MSG_host_get_name(sock_data->to_host), - MSG_host_get_name(MSG_host_self()), sock_data->to_chan, size); - if (MSG_task_get_with_time_out(&task, - (sock->meas ? pd->measChan : pd->chan), - 60) != MSG_OK) - THROW0(system_error,0,"Error in MSG_task_get()"); - DEBUG1("Got chuck %s",MSG_task_get_name(task)); - - task_data = MSG_task_get_data(task); - if (task_data->size != size) + + SIMIX_mutex_lock(pd->mutex); + if (xbt_fifo_size(msg_procdata->msg_to_receive_queue) == 0 ) { + SIMIX_cond_wait_timeout(pd->cond,pd->mutex,60); + } + if (xbt_fifo_size(msg_procdata->msg_to_receive_queue) == 0 ) { + THROW0(timeout_error,0,"Timeout"); + } + SIMIX_mutex_unlock(pd->mutex); + + sock_data = (gras_trp_sg_sock_data_t *)sock->data; + DEBUG3("Remote host %s, Remote Port: %d Local port %d", SIMIX_host_get_name(sock_data->to_host), sock->peer_port, sock->port); + remote_hd = (gras_hostdata_t *)SIMIX_host_get_data(sock_data->to_host); + local_hd = (gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); + + + + msg_got = xbt_fifo_shift(msg_procdata->msg_to_receive_queue); + + SIMIX_mutex_lock(sock_data->mutex); + //SIMIX_mutex_lock(local_hd->mutex_port[sock->port]); +/* ok, I'm here, you can continue the communication */ + SIMIX_cond_signal(sock_data->cond); + //SIMIX_cond_signal(local_hd->cond_port[sock->port]); + +/* wait for communication end */ + SIMIX_cond_wait(sock_data->cond,sock_data->mutex); + //SIMIX_cond_wait(local_hd->cond_port[sock->port],local_hd->mutex_port[sock->port]); + + + if (msg_got->payl_size != size) THROW5(mismatch_error,0, "Got %d bytes when %ld where expected (in %s->%s:%d)", - task_data->size, size, - MSG_host_get_name(sock_data->to_host), - MSG_host_get_name(MSG_host_self()), sock_data->to_chan); - if (data) - memcpy(data,task_data->data,size); - if (task_data->data) - free(task_data->data); - free(task_data); - - if (MSG_task_destroy(task) != MSG_OK) - THROW0(system_error,0,"Error in MSG_task_destroy()"); - - XBT_OUT; - return size; + msg_got->payl_size, size, + SIMIX_host_get_name(sock_data->to_host), + SIMIX_host_get_name(SIMIX_host_self()), sock->peer_port); + if (data) { + memcpy(data,msg_got->payl,size); + } + if (msg_got->payl) + xbt_free(msg_got->payl); + xbt_free(msg_got); + SIMIX_cond_wait(sock_data->cond,sock_data->mutex); + SIMIX_mutex_unlock(sock_data->mutex); + //SIMIX_mutex_unlock(local_hd->mutex_port[sock->port]); + /* + SIMIX_cond_wait(local_hd->cond_port[sock->port],local_hd->mutex_port[sock->port]); + SIMIX_mutex_unlock(local_hd->mutex_port[sock->port]); + */ + return 0; } diff --git a/src/gras/Transport/transport_plugin_tcp.c b/src/gras/Transport/transport_plugin_tcp.c index e5b5d4c466..dca33b1f42 100644 --- a/src/gras/Transport/transport_plugin_tcp.c +++ b/src/gras/Transport/transport_plugin_tcp.c @@ -14,7 +14,7 @@ #include "xbt/misc.h" #include "xbt/sysdep.h" #include "xbt/ex.h" -#include "transport_private.h" +#include "gras/Transport/transport_private.h" /* FIXME maybe READV is sometime a good thing? */ #undef HAVE_READV diff --git a/src/gras/Virtu/process.c b/src/gras/Virtu/process.c index f1883e667a..8f2ab4d80a 100644 --- a/src/gras/Virtu/process.c +++ b/src/gras/Virtu/process.c @@ -20,7 +20,6 @@ XBT_LOG_NEW_SUBCATEGORY(gras_virtu,gras,"Virtualization code"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_virtu_process,gras_virtu,"Process manipulation code"); - /* Functions to handle gras_procdata_t->libdata cells*/ typedef struct { char *name; @@ -81,13 +80,11 @@ void *gras_libdata_by_name(const char *name) { void *gras_libdata_by_name_from_procdata(const char*name, gras_procdata_t* pd) { void *res=NULL; xbt_ex_t e; - if (xbt_set_length(pd->libdata) < xbt_dynar_length(_gras_procdata_fabrics)) { /* Damn, some new modules were added since procdata_init(). Amok? */ /* Get 'em all */ gras_procdata_init(); } - TRY { res = xbt_set_get_by_name(pd->libdata, name); } CATCH(e) { @@ -106,6 +103,7 @@ void *gras_libdata_by_id(int id) { return xbt_set_get_by_id(pd->libdata, id); } + void gras_procdata_init() { gras_procdata_t *pd=gras_procdata_get(); @@ -120,7 +118,7 @@ gras_procdata_init() { pd->userdata = NULL; pd->libdata = xbt_set_new(); } - + xbt_dynar_foreach(_gras_procdata_fabrics,cursor,fab){ volatile int found = 0; @@ -152,7 +150,6 @@ gras_procdata_init() { WARN1("Module '%s' constructor is borken: it does not set elem->name_len", fab.name); } - xbt_set_add(pd->libdata, elem, fab.destructor); } } diff --git a/src/gras/Virtu/sg_dns.c b/src/gras/Virtu/sg_dns.c index 0f7cfa927f..509b89d406 100644 --- a/src/gras/Virtu/sg_dns.c +++ b/src/gras/Virtu/sg_dns.c @@ -11,9 +11,9 @@ #include "gras/Virtu/virtu_sg.h" const char *gras_os_myname(void) { - m_process_t process = MSG_process_self(); + smx_process_t process = SIMIX_process_self(); if ((process != NULL) && (process->simdata)) - return MSG_host_get_name(MSG_host_self()); + return SIMIX_host_get_name(SIMIX_host_self()); else return ""; } diff --git a/src/gras/Virtu/sg_emul.c b/src/gras/Virtu/sg_emul.c index 57dd2379e5..e37d750118 100644 --- a/src/gras/Virtu/sg_emul.c +++ b/src/gras/Virtu/sg_emul.c @@ -73,15 +73,31 @@ int gras_bench_always_begin(const char *location,int line) int gras_bench_always_end(void) { - m_task_t task = NULL; - + smx_action_t act; + smx_cond_t cond; + smx_mutex_t mutex; + xbt_assert0(benchmarking,"Not benchmarking yet"); benchmarking = 0; xbt_os_timer_stop(timer); duration = xbt_os_timer_elapsed(timer); - task = MSG_task_create("task", (duration)/reference, 0 , NULL); - MSG_task_execute(task); - MSG_task_destroy(task); + + cond = SIMIX_cond_init(); + mutex = SIMIX_mutex_init(); + + SIMIX_mutex_lock(mutex); + act = SIMIX_action_execute(SIMIX_host_self(), (char*) "task", (duration)/reference); + + SIMIX_register_action_to_condition(act,cond); + SIMIX_register_condition_to_action(act,cond); + SIMIX_cond_wait(cond, mutex); + + SIMIX_action_destroy(act); + SIMIX_mutex_unlock(mutex); + + SIMIX_cond_destroy(cond); + SIMIX_mutex_destroy(mutex); + return 0; } @@ -110,7 +126,9 @@ int gras_bench_once_begin(const char *location,int line) { int gras_bench_once_end(void) { - m_task_t task = NULL; + smx_action_t act; + smx_cond_t cond; + smx_mutex_t mutex; xbt_assert0(benchmarking,"Not benchmarking yet"); benchmarking = 0; @@ -122,9 +140,21 @@ int gras_bench_once_end(void) duration = get_from_dict(benchmark_set,locbuf); } DEBUG2("Simulate the run of a task of %f sec for %s",duration,locbuf); - task = MSG_task_create("task", (duration)/reference, 0 , NULL); - MSG_task_execute(task); - MSG_task_destroy(task); + cond = SIMIX_cond_init(); + mutex = SIMIX_mutex_init(); + + SIMIX_mutex_lock(mutex); + act = SIMIX_action_execute(SIMIX_host_self(), (char*)"task", (duration)/reference); + + SIMIX_register_action_to_condition(act,cond); + SIMIX_register_condition_to_action(act,cond); + SIMIX_cond_wait(cond, mutex); + + SIMIX_action_destroy(act); + SIMIX_mutex_unlock(mutex); + + SIMIX_cond_destroy(cond); + SIMIX_mutex_destroy(mutex); return 0; } @@ -139,4 +169,59 @@ int gras_if_SG(void) { return 1; } +void gras_global_init(int *argc,char **argv) { +return SIMIX_global_init(argc,argv); +} +void gras_create_environment(const char *file) { +return SIMIX_create_environment(file); +} +void gras_function_register(const char *name, void *code) { +return SIMIX_function_register(name, (smx_process_code_t)code); +} +void gras_main() { + smx_cond_t cond = NULL; + smx_action_t smx_action; + xbt_fifo_t actions_done = xbt_fifo_new(); + xbt_fifo_t actions_failed = xbt_fifo_new(); + + + /* Clean IO before the run */ + fflush(stdout); + fflush(stderr); + + + while (SIMIX_solve(actions_done, actions_failed) != -1.0) { + + while ( (smx_action = xbt_fifo_pop(actions_failed)) ) { + + + DEBUG1("** %s failed **",smx_action->name); + while ( (cond = xbt_fifo_pop(smx_action->cond_list)) ) { + SIMIX_cond_broadcast(cond); + } + /* action finished, destroy it */ + // SIMIX_action_destroy(smx_action); + } + + while ( (smx_action = xbt_fifo_pop(actions_done)) ) { + + DEBUG1("** %s done **",smx_action->name); + while ( (cond = xbt_fifo_pop(smx_action->cond_list)) ) { + SIMIX_cond_broadcast(cond); + } + /* action finished, destroy it */ + //SIMIX_action_destroy(smx_action); + } + } + xbt_fifo_free(actions_failed); + xbt_fifo_free(actions_done); + return; + +} +void gras_launch_application(const char *file) { +return SIMIX_launch_application(file); +} +void gras_clean() { +return SIMIX_clean(); +} diff --git a/src/gras/Virtu/sg_process.c b/src/gras/Virtu/sg_process.c index ea013670d4..017d860f09 100644 --- a/src/gras/Virtu/sg_process.c +++ b/src/gras/Virtu/sg_process.c @@ -15,19 +15,17 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_virtu_process); - +static long int PID = 1; void gras_process_init() { - gras_hostdata_t *hd=(gras_hostdata_t *)MSG_host_get_data(MSG_host_self()); + gras_hostdata_t *hd=(gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); gras_procdata_t *pd=xbt_new0(gras_procdata_t,1); gras_trp_procdata_t trp_pd; - gras_sg_portrec_t prmeas,pr; - int i; - - if (MSG_process_set_data(MSG_process_self(),(void*)pd) != MSG_OK) - THROW0(system_error,0,"Error in MSG_process_set_data()"); - + + SIMIX_process_set_data(SIMIX_process_self(),(void*)pd); + + gras_procdata_init(); if (!hd) { @@ -35,84 +33,61 @@ gras_process_init() { hd=xbt_new(gras_hostdata_t,1); hd->refcount = 1; hd->ports = xbt_dynar_new(sizeof(gras_sg_portrec_t),NULL); - - memset(hd->proc, 0, sizeof(hd->proc[0]) * XBT_MAX_CHANNEL); - - if (MSG_host_set_data(MSG_host_self(),(void*)hd) != MSG_OK) - THROW0(system_error,0,"Error in MSG_host_set_data()"); + SIMIX_host_set_data(SIMIX_host_self(),(void*)hd); } else { hd->refcount++; } - - /* take a free channel for this process */ - trp_pd = (gras_trp_procdata_t)gras_libdata_by_name("gras_trp"); - for (i=0; iproc[i]; i++); - if (i == XBT_MAX_CHANNEL) - THROW2(system_error,0, - "Can't add a new process on %s, because all channels are already in use. Please increase MAX CHANNEL (which is %d for now) and recompile GRAS.", - MSG_host_get_name(MSG_host_self()),XBT_MAX_CHANNEL); - - trp_pd->chan = i; - hd->proc[ i ] = MSG_process_self_PID(); - - /* regiter it to the ports structure */ - pr.port = -1; - pr.tochan = i; - pr.meas = 0; - xbt_dynar_push(hd->ports,&pr); - - /* take a free meas channel for this process */ - for (i=0; iproc[i]; i++); - if (i == XBT_MAX_CHANNEL) { - THROW2(system_error,0, - "Can't add a new process on %s, because all channels are already in use. Please increase MAX CHANNEL (which is %d for now) and recompile GRAS.", - MSG_host_get_name(MSG_host_self()),XBT_MAX_CHANNEL); - } - trp_pd->measChan = i; - hd->proc[ i ] = MSG_process_self_PID(); + trp_pd = (gras_trp_procdata_t)gras_libdata_by_name("gras_trp"); + pd->pid = PID++; + + if (SIMIX_process_self() != NULL ) { + pd->ppid = gras_os_getpid(); + } + else pd->ppid = -1; - /* register it to the ports structure */ - prmeas.port = -1; - prmeas.tochan = i; - prmeas.meas = 1; - xbt_dynar_push(hd->ports,&prmeas); + trp_pd->mutex = SIMIX_mutex_init(); + trp_pd->cond = SIMIX_cond_init(); + trp_pd->active_socket = xbt_fifo_new(); - VERB2("Creating process '%s' (%d)", - MSG_process_get_name(MSG_process_self()), - MSG_process_self_PID()); + VERB2("Creating process '%s' (%ld)", + SIMIX_process_get_name(SIMIX_process_self()), + gras_os_getpid()); } void gras_process_exit() { - gras_hostdata_t *hd=(gras_hostdata_t *)MSG_host_get_data(MSG_host_self()); - gras_procdata_t *pd=(gras_procdata_t*)MSG_process_get_data(MSG_process_self()); + xbt_dynar_t sockets = ((gras_trp_procdata_t) gras_libdata_by_name("gras_trp"))->sockets; + gras_socket_t sock_iter; + int cursor; + gras_hostdata_t *hd=(gras_hostdata_t *)SIMIX_host_get_data(SIMIX_host_self()); + gras_procdata_t *pd=(gras_procdata_t*)SIMIX_process_get_data(SIMIX_process_self()); gras_msg_procdata_t msg_pd=(gras_msg_procdata_t)gras_libdata_by_name("gras_msg"); gras_trp_procdata_t trp_pd=(gras_trp_procdata_t)gras_libdata_by_name("gras_trp"); - int myPID=MSG_process_self_PID(); - int cpt; - gras_sg_portrec_t pr; + + SIMIX_mutex_destroy(trp_pd->mutex); + SIMIX_cond_destroy(trp_pd->cond); + xbt_fifo_free(trp_pd->active_socket); + //int myPID=gras_os_getpid(); + //int cpt; + //gras_sg_portrec_t pr; xbt_assert0(hd,"Run gras_process_init (ie, gras_init)!!"); - VERB2("GRAS: Finalizing process '%s' (%d)", - MSG_process_get_name(MSG_process_self()),MSG_process_self_PID()); + VERB2("GRAS: Finalizing process '%s' (%ld)", + SIMIX_process_get_name(SIMIX_process_self()),gras_os_getpid()); if (xbt_dynar_length(msg_pd->msg_queue)) - WARN1("process %d terminated, but some messages are still queued", - MSG_process_self_PID()); - - for (cpt=0; cpt< XBT_MAX_CHANNEL; cpt++) - if (myPID == hd->proc[cpt]) - hd->proc[cpt] = 0; - - xbt_dynar_foreach(hd->ports, cpt, pr) { - if (pr.port == trp_pd->chan || pr.port == trp_pd->measChan) { - xbt_dynar_cursor_rm(hd->ports, &cpt); - } - } - + WARN1("process %ld terminated, but some messages are still queued", + gras_os_getpid()); + + /* if each process has its sockets list, we need to close them when the process finish */ + xbt_dynar_foreach(sockets,cursor,sock_iter) { + VERB1("Closing the socket %p left open on exit. Maybe a socket leak?", + sock_iter); + gras_socket_close(sock_iter); + } if ( ! --(hd->refcount)) { xbt_dynar_free(&hd->ports); free(hd); @@ -127,28 +102,28 @@ gras_process_exit() { gras_procdata_t *gras_procdata_get(void) { gras_procdata_t *pd= - (gras_procdata_t *)MSG_process_get_data(MSG_process_self()); + (gras_procdata_t *)SIMIX_process_get_data(SIMIX_process_self()); xbt_assert0(pd,"Run gras_process_init! (ie, gras_init)"); return pd; } void * -gras_libdata_by_name_from_remote(const char *name, m_process_t p) { +gras_libdata_by_name_from_remote(const char *name, smx_process_t p) { gras_procdata_t *pd= - (gras_procdata_t *)MSG_process_get_data(p); + (gras_procdata_t *)SIMIX_process_get_data(p); xbt_assert2(pd,"process '%s' on '%s' didn't run gras_process_init! (ie, gras_init)", - MSG_process_get_name(p),MSG_host_get_name(MSG_process_get_host(p))); + SIMIX_process_get_name(p),SIMIX_host_get_name(SIMIX_process_get_host(p))); return gras_libdata_by_name_from_procdata(name, pd); } const char* xbt_procname(void) { const char *res = NULL; - m_process_t process = MSG_process_self(); + smx_process_t process = SIMIX_process_self(); if ((process != NULL) && (process->simdata)) - res = MSG_process_get_name(process); + res = SIMIX_process_get_name(process); if (res) return res; else @@ -156,9 +131,11 @@ const char* xbt_procname(void) { } long int gras_os_getpid(void) { - m_process_t process = MSG_process_self(); - if ((process != NULL) && (process->simdata)) - return (long int)MSG_process_get_PID(MSG_process_self()); + + smx_process_t process = SIMIX_process_self(); + + if ((process != NULL) && (process->data)) + return ((gras_procdata_t*)process->data)->pid; else - return (long int)0; + return 0; } diff --git a/src/gras/Virtu/sg_time.c b/src/gras/Virtu/sg_time.c index eee9cd5a4c..56f8c35211 100644 --- a/src/gras/Virtu/sg_time.c +++ b/src/gras/Virtu/sg_time.c @@ -2,7 +2,7 @@ /* time - time related syscal wrappers */ -/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2003-2007 Martin Quinson. 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. */ @@ -13,12 +13,33 @@ * Time elapsed since the begining of the simulation. */ double gras_os_time() { - return MSG_get_clock(); + return SIMIX_get_clock(); } /* * Freeze the process for the specified amount of time */ void gras_os_sleep(double sec) { - MSG_process_sleep(sec); + smx_action_t act_sleep; + smx_process_t proc = SIMIX_process_self(); + smx_mutex_t mutex; + smx_cond_t cond; + /* create action to sleep */ + act_sleep = SIMIX_action_sleep(SIMIX_process_get_host(proc),sec); + + mutex = SIMIX_mutex_init(); + SIMIX_mutex_lock(mutex); + /* create conditional and register action to it */ + cond = SIMIX_cond_init(); + + SIMIX_register_condition_to_action(act_sleep, cond); + SIMIX_register_action_to_condition(act_sleep, cond); + SIMIX_cond_wait(cond,mutex); + SIMIX_mutex_unlock(mutex); + + /* remove variables */ + SIMIX_cond_destroy(cond); + SIMIX_mutex_destroy(mutex); + SIMIX_action_destroy(act_sleep); + } diff --git a/src/gras/Virtu/virtu_private.h b/src/gras/Virtu/virtu_private.h index ac60812959..275e2ec2f3 100644 --- a/src/gras/Virtu/virtu_private.h +++ b/src/gras/Virtu/virtu_private.h @@ -15,6 +15,7 @@ #include "xbt/dynar.h" #include "gras/Virtu/virtu_interface.h" +#include "simix/simix.h" /** @brief Data for each process */ typedef struct { @@ -32,6 +33,9 @@ typedef struct { * This is the new interface */ xbt_dynar_t moddata; + + long int pid; /* pid of process, only for SG */ + long int ppid; /* ppid of process, only for SG */ } gras_procdata_t; gras_procdata_t *gras_procdata_get(void); diff --git a/src/gras/Virtu/virtu_sg.h b/src/gras/Virtu/virtu_sg.h index 25f0854fce..1b72191d20 100644 --- a/src/gras/Virtu/virtu_sg.h +++ b/src/gras/Virtu/virtu_sg.h @@ -12,19 +12,19 @@ #include "gras/Virtu/virtu_private.h" #include "xbt/dynar.h" -#include "msg/msg.h" /* SimGrid header */ +#include "simix/simix.h" /* SimGrid header */ +#include "gras/Transport/transport_private.h" typedef struct { int port; /* list of ports used by a server socket */ - int tochan; /* the channel it points to */ - int meas; /* (boolean) the channel is for measurements or for messages */ + int meas; /* (boolean) the channel is for measurements or for messages */ + smx_process_t process; + gras_socket_t socket; } gras_sg_portrec_t; /* Data for each host */ typedef struct { int refcount; - int proc[XBT_MAX_CHANNEL]; /* PID of who's connected to each channel */ - /* If =0, then free */ xbt_dynar_t ports; @@ -32,15 +32,20 @@ typedef struct { /* data for each socket (FIXME: find a better location for that)*/ typedef struct { - int from_PID; /* process which sent this message */ - int to_PID; /* process to which this message is destinated */ + //int from_PID; /* process which sent this message */ + //int to_PID; /* process to which this message is destinated */ + smx_process_t from_process; + smx_process_t to_process; - m_host_t to_host; /* Who's on other side */ - m_channel_t to_chan;/* Channel on which the other side is earing */ + smx_host_t to_host; /* Who's on other side */ + + smx_cond_t cond; + smx_mutex_t mutex; + gras_socket_t to_socket; } gras_trp_sg_sock_data_t; -void *gras_libdata_by_name_from_remote(const char *name, m_process_t p); +void *gras_libdata_by_name_from_remote(const char *name, smx_process_t p); /* The same function by id would be really dangerous. * * Indeed, it would rely on the fact that all process register libdatas in diff --git a/src/gras/gras.c b/src/gras/gras.c index 0c696f7f67..5368343600 100644 --- a/src/gras/gras.c +++ b/src/gras/gras.c @@ -23,7 +23,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras,XBT_LOG_ROOT_CAT,"All GRAS categories (cf. section \ref GRAS_API)"); static int gras_running_process = 0; - #if defined(HAVE_SIGNAL) && defined(HAVE_SIGNAL_H) static void gras_sigusr_handler(int sig) { INFO0("SIGUSR1 received. Display the backtrace"); diff --git a/src/gras_config.h.in b/src/gras_config.h.in index fdfef2faf4..c041cdd478 100644 --- a/src/gras_config.h.in +++ b/src/gras_config.h.in @@ -198,9 +198,6 @@ /* Indicates whether we should use GTNetS or not */ #undef USE_GTNETS -/* Indicates whether we should use SimIX or not */ -#undef USE_SIMIX - /* Version number of package */ #undef VERSION diff --git a/src/msg/deployment.c b/src/msg/deployment.c index 45353ec349..516834ee7f 100644 --- a/src/msg/deployment.c +++ b/src/msg/deployment.c @@ -1,79 +1,16 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" -#include "surf/surfxml_parse_private.h" - -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_deployment, msg, - "Logging specific to MSG (deployment)"); -static int parse_argc = -1 ; -static char **parse_argv = NULL; -static m_process_code_t parse_code = NULL; -static m_host_t parse_host = NULL; -static double start_time = 0.0; -static double kill_time = -1.0; - -static void parse_process_init(void) -{ - parse_host = MSG_get_host_by_name(A_surfxml_process_host); - xbt_assert1(parse_host, "Unknown host %s",A_surfxml_process_host); - parse_code = MSG_get_registered_function(A_surfxml_process_function); - xbt_assert1(parse_code, "Unknown function %s",A_surfxml_process_function); - parse_argc = 0 ; - parse_argv = NULL; - parse_argc++; - parse_argv = xbt_realloc(parse_argv, (parse_argc) * sizeof(char *)); - parse_argv[(parse_argc) - 1] = xbt_strdup(A_surfxml_process_function); - surf_parse_get_double(&start_time,A_surfxml_process_start_time); - surf_parse_get_double(&kill_time,A_surfxml_process_kill_time); -} - -static void parse_argument(void) -{ - parse_argc++; - parse_argv = xbt_realloc(parse_argv, (parse_argc) * sizeof(char *)); - parse_argv[(parse_argc) - 1] = xbt_strdup(A_surfxml_argument_value); -} - -static void parse_process_finalize(void) -{ - process_arg_t arg = NULL; - m_process_t process = NULL; - if(start_time>MSG_get_clock()) { - arg = xbt_new0(s_process_arg_t,1); - arg->name = parse_argv[0]; - arg->code = parse_code; - arg->data = NULL; - arg->host = parse_host; - arg->argc = parse_argc; - arg->argv = parse_argv; - arg-> kill_time = kill_time; - - DEBUG3("Process %s(%s) will be started at time %f", arg->name, - arg->host->name,start_time); - surf_timer_resource->extension_public->set(start_time, (void*) &MSG_process_create_with_arguments, - arg); - } - if((start_time<0) || (start_time==MSG_get_clock())) { - DEBUG2("Starting Process %s(%s) right now", parse_argv[0], - parse_host->name); - process = MSG_process_create_with_arguments(parse_argv[0], parse_code, - NULL, parse_host, - parse_argc,parse_argv); - if(kill_time > MSG_get_clock()) { - surf_timer_resource->extension_public->set(kill_time, - (void*) &MSG_process_kill, - (void*) process); - } - } -} /** \ingroup msg_easier_life * \brief An application deployer. @@ -92,13 +29,13 @@ static void parse_process_finalize(void) */ void MSG_launch_application(const char *file) { + xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_launch_application."); - STag_surfxml_process_fun = parse_process_init; - ETag_surfxml_argument_fun = parse_argument; - ETag_surfxml_process_fun = parse_process_finalize; - surf_parse_open(file); - xbt_assert1((!surf_parse()),"Parse error in %s",file); - surf_parse_close(); + SIMIX_function_register_process_create(&__MSG_process_create_with_arguments); + SIMIX_function_register_process_kill(&MSG_process_kill); + SIMIX_launch_application(file); + + return; } /** \ingroup msg_easier_life @@ -111,9 +48,8 @@ void MSG_launch_application(const char *file) */ void MSG_function_register(const char *name,m_process_code_t code) { - xbt_assert0(msg_global,"MSG_global_init has to be called before MSG_function_register."); - - xbt_dict_set(msg_global->registered_functions,name,code,NULL); + SIMIX_function_register(name, code); + return; } /** \ingroup msg_easier_life @@ -127,9 +63,7 @@ m_process_code_t MSG_get_registered_function(const char *name) { m_process_code_t code = NULL; - xbt_assert0(msg_global,"MSG_global_init has to be called before MSG_get_registered_function."); - - code = xbt_dict_get_or_null(msg_global->registered_functions,name); + code = (m_process_code_t)SIMIX_get_registered_function(name); return code; } diff --git a/src/msg/environment.c b/src/msg/environment.c index fbc75cedb0..c4988a8ab2 100644 --- a/src/msg/environment.c +++ b/src/msg/environment.c @@ -1,23 +1,20 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" -#include "gras_config.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_environment, msg, - "Logging specific to MSG (environment)"); /** \defgroup msg_easier_life Platform and Application management * \brief This section describes functions to manage the platform creation * and the application deployment. You should also have a look at * \ref MSG_examples to have an overview of their usage. - */ -/** @addtogroup msg_easier_life * \htmlonly \endhtmlonly * */ @@ -33,16 +30,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_environment, msg, */ m_host_t MSG_get_host_by_name(const char *name) { - xbt_fifo_item_t i = NULL; - m_host_t host = NULL; - - xbt_assert0(((msg_global != NULL) - && (msg_global->host != NULL)), "Environment not set yet"); + smx_host_t simix_h = NULL; - xbt_fifo_foreach(msg_global->host,i,host,m_host_t) { - if(strcmp(host->name, name) == 0) return host; - } - return NULL; + simix_h = SIMIX_host_get_by_name(name); + if (simix_h == NULL) { + return NULL; + } + else return (m_host_t)simix_h->data; } /** \ingroup msg_easier_life @@ -61,38 +55,19 @@ m_host_t MSG_get_host_by_name(const char *name) * * Have a look in the directory examples/msg/ to have a big example. */ -void MSG_create_environment(const char *file) { - xbt_dict_cursor_t cursor = NULL; - char *name = NULL; - void *workstation = NULL; - char *workstation_model_name; - - msg_config_init(); /* make sure that our configuration set is created */ - surf_timer_resource_init(file); - - /* which model do you want today? */ - workstation_model_name = xbt_cfg_get_string (_msg_cfg_set, "surf_workstation_model"); - - DEBUG1("Model : %s", workstation_model_name); - if (!strcmp(workstation_model_name,"KCCFLN05")) { - surf_workstation_resource_init_KCCFLN05(file); - }else if (!strcmp(workstation_model_name,"KCCFLN05_proportional")) { - surf_workstation_resource_init_KCCFLN05_proportionnal(file); - } else if (!strcmp(workstation_model_name,"CLM03")) { - surf_workstation_resource_init_CLM03(file); -#ifdef USE_GTNETS - } else if (!strcmp(workstation_model_name,"GTNETS")) { - surf_workstation_resource_init_GTNETS(file); -#endif - } else { - xbt_assert0(0,"The impossible happened (once again)"); - } - _msg_init_status = 2; /* inited; don't change settings now */ +void MSG_create_environment(const char *file) +{ + smx_host_t *workstation = NULL; + int i; - xbt_dict_foreach(workstation_set, cursor, name, workstation) { - __MSG_host_create(name, workstation, NULL); - } + SIMIX_create_environment(file); + /* Initialize MSG hosts */ + workstation = SIMIX_host_get_table(); + for (i=0; i< SIMIX_host_get_number();i++) { + __MSG_host_create(workstation[i], NULL); + } + xbt_free(workstation); return; } diff --git a/src/msg/global.c b/src/msg/global.c index db2623660a..3acc6b7e68 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -1,33 +1,27 @@ - -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/ex.h" /* ex_backtrace_display */ -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, - "Logging specific to MSG (kernel)"); -int __stop_at_time = -1.0 ; +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)"); MSG_Global_t msg_global = NULL; -/* static void MarkAsFailed(m_task_t t, TBX_HashTable_t failedProcessList); */ -/* static xbt_fifo_t MSG_buildFailedHostList(double a, double b); */ /** \defgroup msg_simulation MSG simulation Functions * \brief This section describes the functions you need to know to * set up a simulation. You should have a look at \ref MSG_examples * to have an overview of their usage. - */ - -/** \addtogroup msg_simulation - * \htmlonly \endhtmlonly + * \htmlonly \endhtmlonly */ /********************************* MSG **************************************/ @@ -46,157 +40,32 @@ void MSG_global_init_args(int *argc, char **argv) void MSG_global_init(int *argc, char **argv) { if (!msg_global) { - surf_init(argc, argv); /* Initialize some common structures. Warning, it sets msg_global=NULL */ + SIMIX_global_init(argc, argv); msg_global = xbt_new0(s_MSG_Global_t,1); msg_global->host = xbt_fifo_new(); - msg_global->process_to_run = xbt_fifo_new(); msg_global->process_list = xbt_fifo_new(); msg_global->max_channel = 0; - msg_global->current_process = NULL; - msg_global->registered_functions = xbt_dict_new(); msg_global->PID = 1; - msg_global->task_mallocator = xbt_mallocator_new(256, - (pvoid_f_void_t*) task_mallocator_new_f, - (void_f_pvoid_t*) task_mallocator_free_f, - (void_f_pvoid_t*) task_mallocator_reset_f); } + return; + } /** \ingroup msg_easier_life * \brief Traces MSG events in the Paje format. */ + void MSG_paje_output(const char *filename) { - int i; - const char *paje_preembule= - "%EventDef PajeDefineContainerType 1\n" - "% NewType string\n" - "% ContainerType string\n" - "% NewName string\n" - "%EndEventDef\n" - "%EventDef PajeDefineStateType 3\n" - "% NewType string\n" - "% ContainerType string\n" - "% NewName string\n" - "%EndEventDef\n" - "%EventDef PajeDefineLinkType 5\n" - "% NewType string\n" - "% ContainerType string\n" - "% SourceContainerType string\n" - "% DestContainerType string\n" - "% NewName string\n" - "%EndEventDef\n" - "%EventDef PajeDefineEntityValue 6\n" - "% NewValue string\n" - "% EntityType string\n" - "% NewName string\n" - "%EndEventDef\n" - "%EventDef PajeCreateContainer 7\n" - "% Time date\n" - "% NewContainer string\n" - "% NewContainerType string\n" - "% Container string\n" - "% NewName string\n" - "%EndEventDef\n" - "%EventDef PajeDestroyContainer 8\n" - "% Time date\n" - "% Name string\n" - "% Type string\n" - "%EndEventDef\n" - "%EventDef PajeSetState 10\n" - "% Time date\n" - "% EntityType string\n" - "% Container string\n" - "% Value string\n" - "%EndEventDef\n" - "%EventDef PajePushState 11\n" - "% Time date\n" - "% EntityType string\n" - "% Container string\n" - "% Value string\n" - "% TaskName string\n" - "%EndEventDef\n" - "%EventDef PajePopState 12\n" - "% Time date\n" - "% EntityType string\n" - "% Container string\n" - "%EndEventDef\n" - "%EventDef PajeStartLink 16\n" - "% Time date\n" - "% EntityType string\n" - "% Container string\n" - "% Value string\n" - "% SourceContainer string\n" - "% Key string\n" - "%EndEventDef\n" - "%EventDef PajeEndLink 17\n" - "% Time date\n" - "% EntityType string\n" - "% Container string\n" - "% Value string\n" - "% DestContainer string\n" - "% Key string\n" - "%EndEventDef\n"; - - const char *type_definitions = "1 Sim_t 0 Simulation_t\n" - "1 H_t Sim_t m_host_t\n" - "1 P_t H_t m_process_t\n" - "3 S_t P_t \"Process State\"\n" - "6 E S_t Executing\n" - "6 B S_t Blocked\n" - "6 C S_t Communicating\n" - "5 Comm Sim_t P_t P_t Communication_t\n"; - - const char *ext = ".trace"; - int ext_len = strlen(ext); - int len; - m_host_t host; - m_process_t process; - xbt_fifo_item_t item = NULL; - - xbt_assert0(msg_global, "Initialize MSG first\n"); - xbt_assert0(!msg_global->paje_output, "Paje output already defined\n"); - xbt_assert0(filename, "Need a real file name\n"); - - len = strlen(filename); - if((lenpaje_output=fopen(filename,"w"); - xbt_assert1(msg_global->paje_output, "Failed to open %s \n",filename); - - fprintf(msg_global->paje_output,"%s",paje_preembule); - fprintf(msg_global->paje_output,"%s",type_definitions); - - /* Channels */ - for(i=0; imax_channel; i++) { - fprintf(msg_global->paje_output, "6 COMM_%d Comm \"Channel %d\"\n" ,i,i); - } - fprintf(msg_global->paje_output, - "7 0.0 CUR Sim_t 0 \"MSG simulation\"\n"); - - /* Hosts */ - xbt_fifo_foreach(msg_global->host,item,host,m_host_t) { - PAJE_HOST_NEW(host); - } - - /* Process */ - xbt_fifo_foreach(msg_global->process_list,item,process,m_process_t) { - PAJE_PROCESS_NEW(process); - } } /** \defgroup m_channel_management Understanding channels * \brief This section briefly describes the channel notion of MSG * (#m_channel_t). - */ - -/** \addtogroup m_channel_management - * \htmlonly \endhtmlonly + * \htmlonly \endhtmlonly + * * * For convenience, the simulator provides the notion of channel * that is close to the tag notion in MPI. A channel is not a @@ -240,59 +109,9 @@ int MSG_get_channel_number(void) void __MSG_display_process_status(void) { - m_process_t process = NULL; - xbt_fifo_item_t item = NULL; - int i; - int nbprocess=xbt_fifo_size(msg_global->process_list); - - INFO1("MSG: %d processes are still running, waiting for something.", - nbprocess); - /* List the process and their state */ - INFO0("MSG: () on : ."); - xbt_fifo_foreach(msg_global->process_list,item,process,m_process_t) { - simdata_process_t p_simdata = (simdata_process_t) process->simdata; - simdata_host_t h_simdata=(simdata_host_t)p_simdata->host->simdata; - char *who; - - asprintf(&who,"MSG: %s(%d) on %s: %s", - process->name,p_simdata->PID, - p_simdata->host->name, - (process->simdata->blocked)?"[blocked] " - :((process->simdata->suspended)?"[suspended] ":"")); - - for (i=0; imax_channel; i++) { - if (h_simdata->sleeping[i] == process) { - INFO2("%s\tListening on channel %d",who,i); - break; - } - } - if (i==msg_global->max_channel) { - if(p_simdata->waiting_task) { - if(p_simdata->waiting_task->simdata->compute) { - if(p_simdata->put_host) { - INFO4("%s\tTrying to send the task '%s' to Host %s, channel %d.", - who, p_simdata->waiting_task->name,p_simdata->put_host->name, p_simdata->put_channel); - } else { - INFO2("%s\tWaiting for %s to finish.",who,p_simdata->waiting_task->name); - } - } else if (p_simdata->waiting_task->simdata->comm) { - INFO2("%s\tWaiting for %s to be finished transfered.", - who,p_simdata->waiting_task->name); - } else { - INFO1("%s\tUNKNOWN STATUS. Please report this bug.",who); - } -/* The following would display the trace of where the maestro thread is, - since this is the thread calling this. I'd like to get the other threads to - run this to see where they were blocked, but I'm not sure of how to do this */ -/* xbt_backtrace_display(); */ - } else { /* Must be trying to put a task somewhere */ - INFO1("%s\tUNKNOWN STATUS. Please report this bug.",who); - } - } - free(who); - } } + /* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */ #include @@ -308,140 +127,47 @@ static void _XBT_CALL inthandler(int ignored) */ MSG_error_t MSG_main(void) { - m_process_t process = NULL; - int i; - double elapsed_time = 0.0; - int state_modifications = 1; - - /* Prepare to display some more info when dying on Ctrl-C pressing */ - signal(SIGINT,inthandler); - - /* Clean IO before the run */ - fflush(stdout); - fflush(stderr); - - surf_solve(); /* Takes traces into account. Returns 0.0 */ -/* xbt_fifo_size(msg_global->process_to_run) */ - while (1) { - xbt_context_empty_trash(); - if(xbt_fifo_size(msg_global->process_to_run) && (elapsed_time>0)) { - DEBUG0("**************************************************"); - } - if((__stop_at_time>0) && (MSG_get_clock() >= __stop_at_time)) { - DEBUG0("Let's stop here!"); - } - - while ((process = xbt_fifo_pop(msg_global->process_to_run))) { - DEBUG3("Scheduling %s(%d) on %s", - process->name,process->simdata->PID, - process->simdata->host->name); - msg_global->current_process = process; -/* fflush(NULL); */ - xbt_context_schedule(process->simdata->context); - msg_global->current_process = NULL; - } - - { - surf_action_t action = NULL; - surf_resource_t resource = NULL; - m_task_t task = NULL; - - void *fun = NULL; - void *arg = NULL; - - xbt_dynar_foreach(resource_list, i, resource) { - if(xbt_swag_size(resource->common_public->states.failed_action_set) || - xbt_swag_size(resource->common_public->states.done_action_set)) - state_modifications = 1; - } - - if(!state_modifications) { - DEBUG1("%f : Calling surf_solve",MSG_get_clock()); - elapsed_time = surf_solve(); - DEBUG1("Elapsed_time %f",elapsed_time); - - if (elapsed_time<0.0) { - /* fprintf(stderr, "We're done %g\n",elapsed_time); */ - break; - } - } - - while (surf_timer_resource->extension_public->get(&fun,(void*)&arg)) { - DEBUG2("got %p %p", fun, arg); - if(fun==MSG_process_create_with_arguments) { - process_arg_t args = arg; - DEBUG2("Launching %s on %s", args->name, args->host->name); - process = MSG_process_create_with_arguments(args->name, args->code, - args->data, args->host, - args->argc,args->argv); - if(args->kill_time > MSG_get_clock()) { - surf_timer_resource->extension_public->set(args->kill_time, - (void*) &MSG_process_kill, - (void*) process); - } - xbt_free(args); - } - if(fun==MSG_process_kill) { - process = arg; - DEBUG3("Killing %s(%d) on %s", process->name, process->simdata->PID, - process->simdata->host->name); - MSG_process_kill(process); - } - } - - xbt_dynar_foreach(resource_list, i, resource) { - while ((action = - xbt_swag_extract(resource->common_public->states. - failed_action_set))) { - task = action->data; - if(task) { - int _cursor; - DEBUG1("** %s failed **",task->name); - xbt_dynar_foreach(task->simdata->sleeping,_cursor,process) { - DEBUG3("\t preparing to wake up %s(%d) on %s", - process->name,process->simdata->PID, - process->simdata->host->name); - xbt_fifo_unshift(msg_global->process_to_run, process); - } - process=NULL; - } - } - while ((action = - xbt_swag_extract(resource->common_public->states. - done_action_set))) { - task = action->data; - if(task) { - int _cursor; - DEBUG1("** %s done **",task->name); - xbt_dynar_foreach(task->simdata->sleeping,_cursor,process) { - DEBUG3("\t preparing to wake up %s(%d) on %s", - process->name,process->simdata->PID, - process->simdata->host->name); - xbt_fifo_unshift(msg_global->process_to_run, process); - } - process=NULL; - } - } - } - } - state_modifications = 0; - } + smx_cond_t cond = NULL; + smx_action_t smx_action; + xbt_fifo_t actions_done = xbt_fifo_new(); + xbt_fifo_t actions_failed = xbt_fifo_new(); - if (xbt_fifo_size(msg_global->process_list) == 0) { -/* INFO0("Congratulations ! Simulation terminated : all processes are over"); */ - return MSG_OK; - } else { - INFO0("Oops ! Deadlock or code not perfectly clean."); - __MSG_display_process_status(); - if(XBT_LOG_ISENABLED(msg, xbt_log_priority_debug) || - XBT_LOG_ISENABLED(msg_kernel, xbt_log_priority_debug)) { - DEBUG0("Aborting!"); - xbt_abort(); - } - - INFO0("Return a Warning."); - return MSG_WARNING; - } + /* Prepare to display some more info when dying on Ctrl-C pressing */ + signal(SIGINT,inthandler); + + /* Clean IO before the run */ + fflush(stdout); + fflush(stderr); + + //surf_solve(); /* Takes traces into account. Returns 0.0 */ + /* xbt_fifo_size(msg_global->process_to_run) */ + + while (SIMIX_solve(actions_done, actions_failed) != -1.0) { + + while ( (smx_action = xbt_fifo_pop(actions_failed)) ) { + + + DEBUG1("** %s failed **",smx_action->name); + while ( (cond = xbt_fifo_pop(smx_action->cond_list)) ) { + SIMIX_cond_broadcast(cond); + } + /* action finished, destroy it */ + // SIMIX_action_destroy(smx_action); + } + + while ( (smx_action = xbt_fifo_pop(actions_done)) ) { + + DEBUG1("** %s done **",smx_action->name); + while ( (cond = xbt_fifo_pop(smx_action->cond_list)) ) { + SIMIX_cond_broadcast(cond); + } + /* action finished, destroy it */ + //SIMIX_action_destroy(smx_action); + } + } + xbt_fifo_free(actions_failed); + xbt_fifo_free(actions_done); + return MSG_OK; } /** \ingroup msg_simulation @@ -458,20 +184,15 @@ int MSG_process_killall(int reset_PIDs) while((p=xbt_fifo_pop(msg_global->process_list))) { if(p!=self) MSG_process_kill(p); - } + } if(reset_PIDs>0) { - msg_global->PID = reset_PIDs; + msg_global->PID = reset_PIDs; msg_global->session++; } - xbt_context_empty_trash(); - - if(self) { - xbt_context_yield(); - } - return msg_global->PID; + } /** \ingroup msg_simulation @@ -492,19 +213,10 @@ MSG_error_t MSG_clean(void) __MSG_host_destroy(h); } xbt_fifo_free(msg_global->host); - xbt_fifo_free(msg_global->process_to_run); xbt_fifo_free(msg_global->process_list); - xbt_dict_free(&(msg_global->registered_functions)); - xbt_mallocator_free(msg_global->task_mallocator); - if(msg_global->paje_output) { - fclose(msg_global->paje_output); - msg_global->paje_output = NULL; - } - msg_config_finalize(); free(msg_global); - msg_global = NULL; - surf_exit(); + SIMIX_clean(); return MSG_OK; } @@ -513,7 +225,8 @@ MSG_error_t MSG_clean(void) /** \ingroup msg_easier_life * \brief A clock (in second). */ -double MSG_get_clock(void) { - return surf_get_clock(); +double MSG_get_clock(void) +{ + return SIMIX_get_clock(); } diff --git a/src/msg/gos.c b/src/msg/gos.c index 3827b4ca40..fcd53b233c 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -1,15 +1,17 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, - "Logging specific to MSG (gos)"); + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, "Logging specific to MSG (gos)"); /** \defgroup msg_gos_functions MSG Operating System Functions * \brief This section describes the functions that can be used @@ -21,16 +23,17 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task, double max_duration, m_host_t host) { + m_process_t process = MSG_process_self(); m_task_t t = NULL; m_host_t h = NULL; - m_task_t task_to_wait_for; simdata_task_t t_simdata = NULL; simdata_host_t h_simdata = NULL; int first_time = 1; - e_surf_action_state_t state = SURF_ACTION_NOT_IN_THE_SYSTEM; xbt_fifo_item_t item = NULL; + smx_cond_t cond = NULL; //conditional wait if the task isn't on the channel yet + CHECK_HOST(); xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); /* Sanity check */ @@ -45,121 +48,108 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task, DEBUG2("Waiting for a task on channel %d (%s)", channel,h->name); + SIMIX_mutex_lock(h->simdata->mutex); while (1) { - if(xbt_fifo_size(h_simdata->mbox[channel])>0) { - if(!host) { - t = xbt_fifo_shift(h_simdata->mbox[channel]); - break; - } else { - xbt_fifo_foreach(h->simdata->mbox[channel],item,t,m_task_t) { - if(t->simdata->source==host) break; - } - if(item) { - xbt_fifo_remove_item(h->simdata->mbox[channel],item); - break; - } - } - } - - if(max_duration>0) { - if(!first_time) { - PAJE_PROCESS_POP_STATE(process); - MSG_RETURN(MSG_TRANSFER_FAILURE); - } - } - xbt_assert3(!(h_simdata->sleeping[channel]), - "A process (%s(%d)) is already blocked on channel %d", - h_simdata->sleeping[channel]->name, - h_simdata->sleeping[channel]->simdata->PID, - channel); - h_simdata->sleeping[channel] = process; /* I'm waiting. Wake me up when you're ready */ - if(max_duration>0) { - __MSG_process_block(max_duration,""); - } else { - __MSG_process_block(-1,""); - } - h_simdata->sleeping[channel] = NULL; - first_time = 0; - if(surf_workstation_resource->extension_public->get_state(h_simdata->host) - == SURF_CPU_OFF) + if(xbt_fifo_size(h_simdata->mbox[channel])>0) { + if(!host) { + t = xbt_fifo_shift(h_simdata->mbox[channel]); + break; + } else { + xbt_fifo_foreach(h->simdata->mbox[channel],item,t,m_task_t) { + if(t->simdata->source==host) break; + } + if(item) { + xbt_fifo_remove_item(h->simdata->mbox[channel],item); + break; + } + } + } + + if(max_duration>0) { + if(!first_time) { + SIMIX_mutex_unlock(h->simdata->mutex); + h_simdata->sleeping[channel] = NULL; + SIMIX_cond_destroy(cond); + MSG_RETURN(MSG_TRANSFER_FAILURE); + } + } + xbt_assert1(!(h_simdata->sleeping[channel]),"A process is already blocked on channel %d", channel); + + cond = SIMIX_cond_init(); + h_simdata->sleeping[channel] = cond; + if (max_duration > 0) { + SIMIX_cond_wait_timeout(cond, h->simdata->mutex, max_duration); + } + else SIMIX_cond_wait(h_simdata->sleeping[channel],h->simdata->mutex); + + if(SIMIX_host_get_state(h_simdata->host)==0) MSG_RETURN(MSG_HOST_FAILURE); - /* OK, we should both be ready now. Are you there ? */ - } + + first_time = 0; + } + SIMIX_mutex_unlock(h->simdata->mutex); DEBUG1("OK, got a task (%s)", t->name); + /* clean conditional */ + if (cond) { + SIMIX_cond_destroy(cond); + h_simdata->sleeping[channel] = NULL; + } t_simdata = t->simdata; - /* *task = __MSG_task_copy(t); */ + t_simdata->receiver = process; *task=t; + SIMIX_mutex_lock(t_simdata->mutex); + /* Transfer */ t_simdata->using++; + /* create SIMIX action to the communication */ + t_simdata->comm = SIMIX_action_communicate(t_simdata->sender->simdata->host->simdata->host, + process->simdata->host->simdata->host,t->name, t_simdata->message_size, + t_simdata->rate); + /* if the process is suspend, create the action but stop its execution, it will be restart when the sender process resume */ + if (MSG_process_is_suspended(t_simdata->sender)) { + DEBUG1("Process sender (%s) suspended", t_simdata->sender->name); + SIMIX_action_set_priority(t_simdata->comm,0); + } + process->simdata->waiting_task = t; + SIMIX_register_action_to_condition(t_simdata->comm, t_simdata->cond); + SIMIX_register_condition_to_action(t_simdata->comm, t_simdata->cond); + SIMIX_cond_wait(t_simdata->cond,t_simdata->mutex); + process->simdata->waiting_task = NULL; + + /* the task has already finished and the pointer must be null*/ + if (t->simdata->sender) { + t->simdata->sender->simdata->waiting_task = NULL; + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + //t->simdata->comm = NULL; + //t->simdata->compute = NULL; + } + /* for this process, don't need to change in get function*/ + t->simdata->receiver = NULL; + SIMIX_mutex_unlock(t_simdata->mutex); - while(MSG_process_is_suspended(t_simdata->sender)) { - DEBUG1("Oooups, the sender (%s) has been suspended in the meantime. Let's wait for him", - t_simdata->sender->name); - task_to_wait_for = t_simdata->sender->simdata->waiting_task; - if(__MSG_process_isBlocked(t_simdata->sender)) { - DEBUG0("He's blocked. Let's wait for him to go in the suspended state"); - __MSG_process_unblock(t_simdata->sender); - task_to_wait_for->simdata->using++; - __MSG_task_wait_event(process, task_to_wait_for); - MSG_task_destroy(task_to_wait_for); - } else { - DEBUG0("He's suspended. Let's wait for him to go in the resumed state"); - task_to_wait_for->simdata->using++; - __MSG_task_wait_event(process, task_to_wait_for); - MSG_task_destroy(task_to_wait_for); - DEBUG0("He's resumed. He should block again. So let's free him."); - __MSG_process_unblock(t_simdata->sender); - break; - } - } - DEBUG0("Calling SURF for communication creation"); - t_simdata->comm = surf_workstation_resource->extension_public-> - communicate(MSG_process_get_host(t_simdata->sender)->simdata->host, - h->simdata->host, t_simdata->message_size,t_simdata->rate); - - surf_workstation_resource->common_public->action_set_data(t_simdata->comm,t); - - if(__MSG_process_isBlocked(t_simdata->sender)) { - DEBUG1("Unblocking %s",t_simdata->sender->name); - __MSG_process_unblock(t_simdata->sender); - } - - PAJE_PROCESS_PUSH_STATE(process,"C",t); - - do { - DEBUG0("Waiting for action termination"); - __MSG_task_wait_event(process, t); - state=surf_workstation_resource->common_public->action_get_state(t_simdata->comm); - } while (state==SURF_ACTION_RUNNING); - DEBUG0("Action terminated"); - - if(t->simdata->using>1) { - xbt_fifo_unshift(msg_global->process_to_run,process); - xbt_context_yield(); - } - - PAJE_PROCESS_POP_STATE(process); - PAJE_COMM_STOP(process,t,channel); - if(state == SURF_ACTION_DONE) { - if(surf_workstation_resource->common_public->action_free(t_simdata->comm)) - t_simdata->comm = NULL; + if(SIMIX_action_get_state(t_simdata->comm) == SURF_ACTION_DONE) { + //t_simdata->comm = NULL; + SIMIX_action_destroy(t_simdata->comm); + t_simdata->comm = NULL; MSG_RETURN(MSG_OK); - } else if(surf_workstation_resource->extension_public->get_state(h_simdata->host) - == SURF_CPU_OFF) { - if(surf_workstation_resource->common_public->action_free(t_simdata->comm)) - t_simdata->comm = NULL; + } else if (SIMIX_host_get_state(h_simdata->host)==0) { + //t_simdata->comm = NULL; + SIMIX_action_destroy(t_simdata->comm); + t_simdata->comm = NULL; MSG_RETURN(MSG_HOST_FAILURE); - } else { - if(surf_workstation_resource->common_public->action_free(t_simdata->comm)) - t_simdata->comm = NULL; + } else { + //t_simdata->comm = NULL; + SIMIX_action_destroy(t_simdata->comm); + t_simdata->comm = NULL; MSG_RETURN(MSG_TRANSFER_FAILURE); } -} +} + /** \ingroup msg_gos_functions * \brief Listen on a channel and wait for receiving a task. * @@ -240,8 +230,10 @@ int MSG_task_Iprobe(m_channel_t channel) m_host_t h = NULL; xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); - DEBUG2("Probing on channel %d (%s)", channel,h->name); CHECK_HOST(); + + DEBUG2("Probing on channel %d (%s)", channel,h->name); + h = MSG_host_self(); return(xbt_fifo_get_first_item(h->simdata->mbox[channel])!=NULL); } @@ -263,12 +255,13 @@ int MSG_task_probe_from(m_channel_t channel) xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); CHECK_HOST(); + h = MSG_host_self(); DEBUG2("Probing on channel %d (%s)", channel,h->name); item = xbt_fifo_get_first_item(h->simdata->mbox[channel]); - if (!item || !(t = xbt_fifo_get_item_content(item))) + if ( (!item) || (!(t = xbt_fifo_get_item_content(item))) ) return -1; return MSG_process_get_PID(t->simdata->sender); @@ -291,60 +284,61 @@ int MSG_task_probe_from(m_channel_t channel) and #MSG_OK otherwise. */ MSG_error_t MSG_channel_select_from(m_channel_t channel, double max_duration, - int *PID) + int *PID) { - m_host_t h = NULL; - simdata_host_t h_simdata = NULL; - xbt_fifo_item_t item; - m_task_t t; - int first_time = 1; - m_process_t process = MSG_process_self(); - - xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); - if(PID) { - *PID = -1; - } + m_host_t h = NULL; + simdata_host_t h_simdata = NULL; + xbt_fifo_item_t item; + m_task_t t; + int first_time = 1; + smx_cond_t cond; + + xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); + if(PID) { + *PID = -1; + } - if(max_duration==0.0) { - *PID = MSG_task_probe_from(channel); - MSG_RETURN(MSG_OK); - } else { - CHECK_HOST(); - h = MSG_host_self(); - h_simdata = h->simdata; - - DEBUG2("Probing on channel %d (%s)", channel,h->name); - while(!(item = xbt_fifo_get_first_item(h->simdata->mbox[channel]))) { - if(max_duration>0) { - if(!first_time) { - MSG_RETURN(MSG_OK); + if(max_duration==0.0) { + *PID = MSG_task_probe_from(channel); + MSG_RETURN(MSG_OK); + } else { + CHECK_HOST(); + h = MSG_host_self(); + h_simdata = h->simdata; + + DEBUG2("Probing on channel %d (%s)", channel,h->name); + while(!(item = xbt_fifo_get_first_item(h->simdata->mbox[channel]))) { + if(max_duration>0) { + if(!first_time) { + MSG_RETURN(MSG_OK); + } + } + SIMIX_mutex_lock(h_simdata->mutex); + xbt_assert1(!(h_simdata->sleeping[channel]), + "A process is already blocked on this channel %d", channel); + cond = SIMIX_cond_init(); + h_simdata->sleeping[channel] = cond; /* I'm waiting. Wake me up when you're ready */ + if(max_duration>0) { + SIMIX_cond_wait_timeout(cond,h_simdata->mutex, max_duration); + } else { + SIMIX_cond_wait(cond,h_simdata->mutex); + } + SIMIX_cond_destroy(cond); + SIMIX_mutex_unlock(h_simdata->mutex); + if(SIMIX_host_get_state(h_simdata->host)==0) { + MSG_RETURN(MSG_HOST_FAILURE); + } + h_simdata->sleeping[channel] = NULL; + first_time = 0; + } + if (!item || !(t = xbt_fifo_get_item_content(item))) { + MSG_RETURN(MSG_OK); + } + if(PID) { + *PID = MSG_process_get_PID(t->simdata->sender); + } + MSG_RETURN(MSG_OK); } - } - xbt_assert2(!(h_simdata->sleeping[channel]), - "A process (%s(%d)) is already blocked on this channel", - h_simdata->sleeping[channel]->name, - h_simdata->sleeping[channel]->simdata->PID); - h_simdata->sleeping[channel] = process; /* I'm waiting. Wake me up when you're ready */ - if(max_duration>0) { - __MSG_process_block(max_duration,""); - } else { - __MSG_process_block(-1,""); - } - if(surf_workstation_resource->extension_public->get_state(h_simdata->host) - == SURF_CPU_OFF) { - MSG_RETURN(MSG_HOST_FAILURE); - } - h_simdata->sleeping[channel] = NULL; - first_time = 0; - } - if (!item || !(t = xbt_fifo_get_item_content(item))) { - MSG_RETURN(MSG_OK); - } - if(PID) { - *PID = MSG_process_get_PID(t->simdata->sender); - } - MSG_RETURN(MSG_OK); - } } @@ -413,13 +407,12 @@ int MSG_task_probe_from_host(int channel, m_host_t host) MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest, m_channel_t channel, double max_duration) { + + m_process_t process = MSG_process_self(); simdata_task_t task_simdata = NULL; - e_surf_action_state_t state = SURF_ACTION_NOT_IN_THE_SYSTEM; m_host_t local_host = NULL; m_host_t remote_host = NULL; - int first_time = 1; - CHECK_HOST(); xbt_assert1((channel>=0) && (channel < msg_global->max_channel),"Invalid channel %d",channel); @@ -437,83 +430,65 @@ MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest, DEBUG4("Trying to send a task (%g kB) from %s to %s on channel %d", task->simdata->message_size/1000,local_host->name, remote_host->name, channel); + SIMIX_mutex_lock(remote_host->simdata->mutex); xbt_fifo_push(((simdata_host_t) remote_host->simdata)-> mbox[channel], task); - PAJE_COMM_START(process,task,channel); - + if(remote_host->simdata->sleeping[channel]) { DEBUG0("Somebody is listening. Let's wake him up!"); - __MSG_process_unblock(remote_host->simdata->sleeping[channel]); + SIMIX_cond_signal(remote_host->simdata->sleeping[channel]); } + SIMIX_mutex_unlock(remote_host->simdata->mutex); process->simdata->put_host = dest; process->simdata->put_channel = channel; - while(!(task_simdata->comm)) { - if(max_duration>0) { - if(!first_time) { - xbt_fifo_remove(((simdata_host_t) remote_host->simdata)->mbox[channel], + SIMIX_mutex_lock(task->simdata->mutex); + // DEBUG4("Task sent (%g kB) from %s to %s on channel %d, waiting...", task->simdata->message_size/1000,local_host->name, remote_host->name, channel); + + process->simdata->waiting_task = task; + if (max_duration >0) { + SIMIX_cond_wait_timeout(task->simdata->cond,task->simdata->mutex,max_duration); + /* verify if the timeout happened and the communication didn't started yet */ + if (task->simdata->comm==NULL) { + task->simdata->using--; + process->simdata->waiting_task = NULL; + xbt_fifo_remove(((simdata_host_t) remote_host->simdata)->mbox[channel], task); - PAJE_PROCESS_POP_STATE(process); - PAJE_COMM_STOP(process,task,channel); - MSG_RETURN(MSG_TRANSFER_FAILURE); - } - } - DEBUG0("Communication not initiated yet. Let's block!"); - if(max_duration>0) - __MSG_process_block(max_duration,task->name); - else - __MSG_process_block(-1,task->name); - - first_time = 0; - - if(surf_workstation_resource->extension_public-> - get_state(local_host->simdata->host) == SURF_CPU_OFF) { - xbt_fifo_remove(((simdata_host_t) remote_host->simdata)->mbox[channel], - task); - PAJE_PROCESS_POP_STATE(process); - PAJE_COMM_STOP(process,task,channel); - MSG_task_destroy(task); - MSG_RETURN(MSG_HOST_FAILURE); - } - } - DEBUG0("Registering to this communication"); - surf_workstation_resource->common_public->action_use(task_simdata->comm); - process->simdata->put_host = NULL; - process->simdata->put_channel = -1; - - - PAJE_PROCESS_PUSH_STATE(process,"C",task); - - state=surf_workstation_resource->common_public->action_get_state(task_simdata->comm); - while (state==SURF_ACTION_RUNNING) { - DEBUG0("Waiting for action termination"); - __MSG_task_wait_event(process, task); - state=surf_workstation_resource->common_public->action_get_state(task_simdata->comm); - } - DEBUG0("Action terminated"); - task->simdata->rate=-1.0; /* Sets the rate back to default */ + if (task->simdata->receiver) { + task->simdata->receiver->simdata->waiting_task = NULL; + } + task->simdata->sender = NULL; + SIMIX_mutex_unlock(task->simdata->mutex); + MSG_RETURN(MSG_TRANSFER_FAILURE); + } + } + else { + SIMIX_cond_wait(task->simdata->cond,task->simdata->mutex); + } - PAJE_PROCESS_POP_STATE(process); + DEBUG1("Action terminated %s",task->name); + task->simdata->using--; + process->simdata->waiting_task = NULL; + /* the task has already finished and the pointer must be null*/ + if (task->simdata->receiver) { + task->simdata->receiver->simdata->waiting_task = NULL; + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + // task->simdata->comm = NULL; + //task->simdata->compute = NULL; + } + task->simdata->sender = NULL; + SIMIX_mutex_unlock(task->simdata->mutex); - if(state == SURF_ACTION_DONE) { - if(surf_workstation_resource->common_public->action_free(task_simdata->comm)) - task_simdata->comm = NULL; - MSG_task_destroy(task); + if(SIMIX_action_get_state(task->simdata->comm) == SURF_ACTION_DONE) { MSG_RETURN(MSG_OK); - } else if(surf_workstation_resource->extension_public->get_state(local_host->simdata->host) - == SURF_CPU_OFF) { - if(surf_workstation_resource->common_public->action_free(task_simdata->comm)) - task_simdata->comm = NULL; - MSG_task_destroy(task); + } else if (SIMIX_host_get_state(local_host->simdata->host)==0) { MSG_RETURN(MSG_HOST_FAILURE); } else { - if(surf_workstation_resource->common_public->action_free(task_simdata->comm)) - task_simdata->comm = NULL; - MSG_task_destroy(task); MSG_RETURN(MSG_TRANSFER_FAILURE); } } + /** \ingroup msg_gos_functions * \brief Put a task on a channel of an host and waits for the end of the * transmission. @@ -574,73 +549,52 @@ MSG_error_t MSG_task_put_bounded(m_task_t task, */ MSG_error_t MSG_task_execute(m_task_t task) { - m_process_t process = MSG_process_self(); - MSG_error_t res; - - DEBUG1("Computing on %s", process->simdata->host->name); - - __MSG_task_execute(process, task); - - PAJE_PROCESS_PUSH_STATE(process,"E",task); - res = __MSG_wait_for_computation(process,task); - PAJE_PROCESS_POP_STATE(process); - return res; -} - -void __MSG_task_execute(m_process_t process, m_task_t task) -{ - simdata_task_t simdata = NULL; - + simdata_task_t simdata = NULL; + m_process_t self = MSG_process_self(); CHECK_HOST(); simdata = task->simdata; xbt_assert0((!simdata->compute)&&(task->simdata->using==1), "This task is executed somewhere else. Go fix your code!"); + + DEBUG1("Computing on %s", MSG_process_self()->simdata->host->name); simdata->using++; - simdata->compute = surf_workstation_resource->extension_public-> - execute(MSG_process_get_host(process)->simdata->host, - simdata->computation_amount); - surf_workstation_resource->common_public-> - set_priority(simdata->compute, simdata->priority); - - surf_workstation_resource->common_public->action_set_data(simdata->compute,task); - simdata->using--; -} + SIMIX_mutex_lock(simdata->mutex); + simdata->compute = SIMIX_action_execute(SIMIX_host_self(), task->name, simdata->computation_amount); + SIMIX_action_set_priority(simdata->compute, simdata->priority); -MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task) -{ - e_surf_action_state_t state = SURF_ACTION_NOT_IN_THE_SYSTEM; - simdata_task_t simdata = task->simdata; + self->simdata->waiting_task = task; + SIMIX_register_action_to_condition(simdata->compute, simdata->cond); + SIMIX_register_condition_to_action(simdata->compute, simdata->cond); + SIMIX_cond_wait(simdata->cond, simdata->mutex); + self->simdata->waiting_task = NULL; - XBT_IN4("(%p(%s) %p(%s))",process,process->name,task,task->name); - simdata->using++; - do { - __MSG_task_wait_event(process, task); - state=surf_workstation_resource->common_public->action_get_state(simdata->compute); - } while (state==SURF_ACTION_RUNNING); + SIMIX_mutex_unlock(simdata->mutex); simdata->using--; - - if(state == SURF_ACTION_DONE) { - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; - simdata->computation_amount = 0.0; - XBT_OUT; + if(SIMIX_action_get_state(task->simdata->compute) == SURF_ACTION_DONE) { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->computation_amount = 0.0; + simdata->comm = NULL; + simdata->compute = NULL; MSG_RETURN(MSG_OK); - } else if(surf_workstation_resource->extension_public-> - get_state(MSG_process_get_host(process)->simdata->host) - == SURF_CPU_OFF) { - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; - XBT_OUT; + } else if (SIMIX_host_get_state(SIMIX_host_self())==0) { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->comm = NULL; + simdata->compute = NULL; MSG_RETURN(MSG_HOST_FAILURE); - } else { - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; - XBT_OUT; + } else { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->comm = NULL; + simdata->compute = NULL; MSG_RETURN(MSG_TASK_CANCELLED); } } + + /** \ingroup m_task_management * \brief Creates a new #m_task_t (a parallel one....). * @@ -667,23 +621,29 @@ m_task_t MSG_parallel_task_create(const char *name, double *communication_amount, void *data) { + int i; simdata_task_t simdata = xbt_new0(s_simdata_task_t,1); m_task_t task = xbt_new0(s_m_task_t,1); - int i; + task->simdata = simdata; /* Task structure */ task->name = xbt_strdup(name); - task->simdata = simdata; task->data = data; /* Simulator Data */ - simdata->sleeping = xbt_dynar_new(sizeof(m_process_t),NULL); + simdata->computation_amount = 0; + simdata->message_size = 0; + simdata->cond = SIMIX_cond_init(); + simdata->mutex = SIMIX_mutex_init(); + simdata->compute = NULL; + simdata->comm = NULL; simdata->rate = -1.0; simdata->using = 1; simdata->sender = NULL; + simdata->receiver = NULL; simdata->source = NULL; + simdata->host_nb = host_nb; - simdata->host_list = xbt_new0(void *, host_nb); simdata->comp_amount = computation_amount; simdata->comm_amount = communication_amount; @@ -692,45 +652,58 @@ m_task_t MSG_parallel_task_create(const char *name, simdata->host_list[i] = host_list[i]->simdata->host; return task; + } -static void __MSG_parallel_task_execute(m_process_t process, m_task_t task) +MSG_error_t MSG_parallel_task_execute(m_task_t task) { - simdata_task_t simdata = NULL; - + simdata_task_t simdata = NULL; + m_process_t self = MSG_process_self(); CHECK_HOST(); simdata = task->simdata; + xbt_assert0((!simdata->compute)&&(task->simdata->using==1), + "This task is executed somewhere else. Go fix your code!"); xbt_assert0(simdata->host_nb,"This is not a parallel task. Go to hell."); + + DEBUG1("Computing on %s", MSG_process_self()->simdata->host->name); + simdata->using++; + SIMIX_mutex_lock(simdata->mutex); + simdata->compute = SIMIX_action_parallel_execute(task->name, simdata->host_nb, simdata->host_list, simdata->comp_amount, simdata->comm_amount, 1.0, -1.0); - simdata->compute = surf_workstation_resource->extension_public-> - execute_parallel_task(task->simdata->host_nb, - task->simdata->host_list, - task->simdata->comp_amount, - task->simdata->comm_amount, - 1.0, - -1.0); - if(simdata->compute) - surf_workstation_resource->common_public->action_set_data(simdata->compute,task); -} + self->simdata->waiting_task = task; + SIMIX_register_action_to_condition(simdata->compute, simdata->cond); + SIMIX_register_condition_to_action(simdata->compute, simdata->cond); + SIMIX_cond_wait(simdata->cond, simdata->mutex); + self->simdata->waiting_task = NULL; -MSG_error_t MSG_parallel_task_execute(m_task_t task) -{ - m_process_t process = MSG_process_self(); - MSG_error_t res; - DEBUG0("Computing on a tons of guys"); - - __MSG_parallel_task_execute(process, task); + SIMIX_mutex_unlock(simdata->mutex); + simdata->using--; - if(task->simdata->compute) - res = __MSG_wait_for_computation(process,task); - else - res = MSG_OK; + if(SIMIX_action_get_state(task->simdata->compute) == SURF_ACTION_DONE) { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->computation_amount = 0.0; + simdata->comm = NULL; + simdata->compute = NULL; + MSG_RETURN(MSG_OK); + } else if (SIMIX_host_get_state(SIMIX_host_self())==0) { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->comm = NULL; + simdata->compute = NULL; + MSG_RETURN(MSG_HOST_FAILURE); + } else { + /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */ + SIMIX_action_destroy(task->simdata->compute); + simdata->comm = NULL; + simdata->compute = NULL; + MSG_RETURN(MSG_TASK_CANCELLED); + } - return res; } @@ -743,53 +716,40 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task) */ MSG_error_t MSG_process_sleep(double nb_sec) { - e_surf_action_state_t state = SURF_ACTION_NOT_IN_THE_SYSTEM; - m_process_t process = MSG_process_self(); - m_task_t dummy = NULL; - simdata_task_t simdata = NULL; - - xbt_assert1(nb_sec>=0,"Invalid duration %g",nb_sec); - - CHECK_HOST(); - dummy = MSG_task_create("MSG_sleep", nb_sec, 0.0, NULL); - simdata = dummy->simdata; - - simdata->compute = surf_workstation_resource->extension_public-> - sleep(MSG_process_get_host(process)->simdata->host, - simdata->computation_amount); - surf_workstation_resource->common_public->action_set_data(simdata->compute,dummy); - - - simdata->using++; - do { - __MSG_task_wait_event(process, dummy); - state=surf_workstation_resource->common_public->action_get_state(simdata->compute); - } while (state==SURF_ACTION_RUNNING); - simdata->using--; - - if(state == SURF_ACTION_DONE) { - if(surf_workstation_resource->extension_public-> - get_state(MSG_process_get_host(process)->simdata->host) - == SURF_CPU_OFF) { - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; - MSG_RETURN(MSG_HOST_FAILURE); - } - if(__MSG_process_isBlocked(process)) { - __MSG_process_unblock(MSG_process_self()); - } - if(surf_workstation_resource->extension_public-> - get_state(MSG_process_get_host(process)->simdata->host) - == SURF_CPU_OFF) { - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; + smx_action_t act_sleep; + m_process_t proc = MSG_process_self(); + smx_mutex_t mutex; + smx_cond_t cond; + /* create action to sleep */ + act_sleep = SIMIX_action_sleep(SIMIX_process_get_host(proc->simdata->smx_process),nb_sec); + + mutex = SIMIX_mutex_init(); + SIMIX_mutex_lock(mutex); + /* create conditional and register action to it */ + cond = SIMIX_cond_init(); + + SIMIX_register_condition_to_action(act_sleep, cond); + SIMIX_register_action_to_condition(act_sleep, cond); + SIMIX_cond_wait(cond,mutex); + SIMIX_mutex_unlock(mutex); + + /* remove variables */ + SIMIX_cond_destroy(cond); + SIMIX_mutex_destroy(mutex); + + if(SIMIX_action_get_state(act_sleep) == SURF_ACTION_DONE) { + if(SIMIX_host_get_state(SIMIX_host_self()) == SURF_CPU_OFF) { + SIMIX_action_destroy(act_sleep); MSG_RETURN(MSG_HOST_FAILURE); } - if(surf_workstation_resource->common_public->action_free(simdata->compute)) - simdata->compute = NULL; - MSG_task_destroy(dummy); - MSG_RETURN(MSG_OK); - } else MSG_RETURN(MSG_HOST_FAILURE); + } + else { + SIMIX_action_destroy(act_sleep); + MSG_RETURN(MSG_HOST_FAILURE); + } + + + MSG_RETURN(MSG_OK); } /** \ingroup msg_gos_functions @@ -798,13 +758,8 @@ MSG_error_t MSG_process_sleep(double nb_sec) */ static int MSG_get_msgload(void) { - m_process_t process; - - CHECK_HOST(); - - xbt_assert0(0, "This function is still to be specified correctly (what do you mean by 'load', exactly?). In the meantime, please don't use it"); - process = MSG_process_self(); - return xbt_fifo_size(process->simdata->host->simdata->process_list); + xbt_die("not implemented yet"); + return 0; } /** \ingroup msg_gos_functions diff --git a/src/msg/host.c b/src/msg/host.c index ecc5b47adf..0916b9edf1 100644 --- a/src/msg/host.c +++ b/src/msg/host.c @@ -1,19 +1,19 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" /** \defgroup m_host_management Management functions of Hosts * \brief This section describes the host structure of MSG - */ - -/** \addtogroup m_host_management + * * \htmlonly \endhtmlonly * (#m_host_t) and the functions for managing it. * @@ -27,14 +27,14 @@ */ /********************************* Host **************************************/ -m_host_t __MSG_host_create(const char *name, - void *workstation, - void *data) +m_host_t __MSG_host_create(smx_host_t workstation, void *data) { + const char * name; simdata_host_t simdata = xbt_new0(s_simdata_host_t,1); m_host_t host = xbt_new0(s_m_host_t,1); int i; + name = SIMIX_host_get_name(workstation); /* Host structure */ host->name = xbt_strdup(name); host->simdata = simdata; @@ -45,14 +45,14 @@ m_host_t __MSG_host_create(const char *name, simdata->mbox = xbt_new0(xbt_fifo_t, msg_global->max_channel); for (i = 0; i < msg_global->max_channel; i++) simdata->mbox[i] = xbt_fifo_new(); - simdata->sleeping = xbt_new0(m_process_t, msg_global->max_channel); - simdata->process_list = xbt_fifo_new(); - /* Update global variables */ - - xbt_fifo_unshift(msg_global->host, host); - - PAJE_HOST_NEW(host); + + simdata->sleeping = xbt_new0(smx_cond_t, msg_global->max_channel); + simdata->mutex = SIMIX_mutex_init(); + SIMIX_host_set_data(workstation, host); + /* Update global variables */ + xbt_fifo_unshift(msg_global->host, host); + return host; } @@ -64,7 +64,7 @@ m_host_t __MSG_host_create(const char *name, or not and attach \a data to \a host if it is possible. */ MSG_error_t MSG_host_set_data(m_host_t host, void *data) -{ +{ xbt_assert0((host!=NULL), "Invalid parameters"); xbt_assert0((host->data == NULL), "Data already set"); @@ -127,19 +127,15 @@ void __MSG_host_destroy(m_host_t host) xbt_assert0((host != NULL), "Invalid parameters"); - PAJE_HOST_FREE(host); - /* Clean Simulator data */ + /* SIMIX host will be cleaned when MSG_clean calls SIMIX_clean */ simdata = (host)->simdata; for (i = 0; i < msg_global->max_channel; i++) xbt_fifo_free(simdata->mbox[i]); free(simdata->mbox); free(simdata->sleeping); - xbt_assert0((xbt_fifo_size(simdata->process_list)==0), - "Some process are still running on this host"); - xbt_fifo_free(simdata->process_list); - + SIMIX_mutex_destroy(simdata->mutex); free(simdata); /* Clean host structure */ @@ -175,7 +171,6 @@ int MSG_get_host_msgload(m_host_t h) xbt_assert0(0, "Not implemented yet"); return(0); -/* return(surf_workstation_resource->extension_public->get_load(h->simdata->host)); */ } /** \ingroup m_host_management @@ -186,8 +181,7 @@ double MSG_get_host_speed(m_host_t h) { xbt_assert0((h!= NULL), "Invalid parameters"); - return(surf_workstation_resource-> - extension_public->get_speed(h->simdata->host,1.0)); + return(SIMIX_host_get_speed(h->simdata->host)); } /** \ingroup msg_gos_functions @@ -197,14 +191,6 @@ double MSG_get_host_speed(m_host_t h) */ int MSG_host_is_avail (m_host_t h) { - e_surf_cpu_state_t cpustate; xbt_assert0((h!= NULL), "Invalid parameters"); - - cpustate = - surf_workstation_resource->extension_public->get_state(h->simdata->host); - - xbt_assert0((cpustate == SURF_CPU_ON || cpustate == SURF_CPU_OFF), - "Invalid cpu state"); - - return (cpustate==SURF_CPU_ON); + return (SIMIX_host_get_state(h->simdata->host)); } diff --git a/src/msg/m_process.c b/src/msg/m_process.c index d49a58ac30..70f458b4a1 100644 --- a/src/msg/m_process.c +++ b/src/msg/m_process.c @@ -1,20 +1,20 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, - "Logging specific to MSG (process)"); + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)"); /** \defgroup m_process_management Management Functions of Agents * \brief This section describes the agent structure of MSG - */ -/** \addtogroup m_process_management * (#m_process_t) and the functions for managing it. * \htmlonly \endhtmlonly * @@ -42,21 +42,17 @@ m_process_t MSG_process_create(const char *name, static void MSG_process_cleanup(void *arg) { - - while(((m_process_t)arg)->simdata->paje_state) { - PAJE_PROCESS_POP_STATE((m_process_t)arg); - } - - PAJE_PROCESS_FREE(arg); - - xbt_fifo_remove(msg_global->process_list, arg); - xbt_fifo_remove(msg_global->process_to_run, arg); - xbt_fifo_remove(((m_process_t) arg)->simdata->host->simdata->process_list, arg); - free(((m_process_t) arg)->name); - ((m_process_t) arg)->name = NULL; - free(((m_process_t) arg)->simdata); - ((m_process_t) arg)->simdata = NULL; - free(arg); + /* arg is a pointer to a simix process, we can get the msg process with the field data */ + m_process_t proc = ((smx_process_t)arg)->data; + xbt_fifo_remove(msg_global->process_list, proc); + SIMIX_process_cleanup(arg); + free(proc->name); + proc->name = NULL; + free(proc->simdata); + proc->simdata = NULL; + free(proc); + + return; } /** \ingroup m_process_management @@ -83,31 +79,37 @@ static void MSG_process_cleanup(void *arg) * \see m_process_t * \return The new corresponding object. */ + + + +m_process_t __MSG_process_create_with_arguments(const char *name, + m_process_code_t code, void *data, + char * hostname, int argc, char **argv) +{ + m_host_t host = MSG_get_host_by_name(hostname); + return MSG_process_create_with_arguments(name,code,data,host,argc,argv); +} + m_process_t MSG_process_create_with_arguments(const char *name, m_process_code_t code, void *data, m_host_t host, int argc, char **argv) { simdata_process_t simdata = xbt_new0(s_simdata_process_t,1); m_process_t process = xbt_new0(s_m_process_t,1); - m_process_t self = NULL; - xbt_assert0(((code != NULL) && (host != NULL)), "Invalid parameters"); - /* Simulator Data */ + /* Simulator Data */ simdata->PID = msg_global->PID++; + simdata->waiting_task = NULL; simdata->host = host; - simdata->waiting_task = NULL; simdata->argc = argc; simdata->argv = argv; - simdata->context = xbt_context_new(code, NULL, NULL, - MSG_process_cleanup, process, - simdata->argc, simdata->argv); - - if((self=msg_global->current_process)) { - simdata->PPID = MSG_process_get_PID(self); - } else { - simdata->PPID = -1; - } + simdata->smx_process = SIMIX_process_create(name, (smx_process_code_t)code, (void*)process, host->name, argc, argv, MSG_process_cleanup ); + + if (SIMIX_process_self()) { + simdata->PPID = MSG_process_get_PID(SIMIX_process_self()->data); + } + else simdata->PPID = -1; simdata->last_errno=MSG_OK; @@ -116,19 +118,7 @@ m_process_t MSG_process_create_with_arguments(const char *name, process->simdata = simdata; process->data = data; - xbt_fifo_unshift(host->simdata->process_list, process); - - /* *************** FIX du current_process !!! *************** */ - self = msg_global->current_process; - xbt_context_start(process->simdata->context); - msg_global->current_process = self; - - xbt_fifo_unshift(msg_global->process_list, process); - DEBUG2("Inserting %s(%s) in the to_run list",process->name, - host->name); - xbt_fifo_unshift(msg_global->process_to_run, process); - - PAJE_PROCESS_NEW(process); + xbt_fifo_unshift(msg_global->process_list, process); return process; } @@ -140,53 +130,24 @@ m_process_t MSG_process_create_with_arguments(const char *name, */ void MSG_process_kill(m_process_t process) { - int i; simdata_process_t p_simdata = process->simdata; - simdata_host_t h_simdata= p_simdata->host->simdata; - int _cursor; - m_process_t proc = NULL; - DEBUG3("Killing %s(%d) on %s",process->name, p_simdata->PID, - p_simdata->host->name); - - for (i=0; imax_channel; i++) { - if (h_simdata->sleeping[i] == process) { - h_simdata->sleeping[i] = NULL; - break; - } - } - - if(p_simdata->waiting_task) { - xbt_dynar_foreach(p_simdata->waiting_task->simdata->sleeping,_cursor,proc) { - if(proc==process) - xbt_dynar_remove_at(p_simdata->waiting_task->simdata->sleeping,_cursor,&proc); - } - if(p_simdata->waiting_task->simdata->compute) - surf_workstation_resource->common_public-> - action_free(p_simdata->waiting_task->simdata->compute); - else if (p_simdata->waiting_task->simdata->comm) { - surf_workstation_resource->common_public-> - action_change_state(p_simdata->waiting_task->simdata->comm,SURF_ACTION_FAILED); - surf_workstation_resource->common_public-> - action_free(p_simdata->waiting_task->simdata->comm); - } else { - xbt_die("UNKNOWN STATUS. Please report this bug."); - } - } + DEBUG3("Killing %s(%d) on %s",process->name, p_simdata->PID, p_simdata->host->name); - if ((i==msg_global->max_channel) && (process!=MSG_process_self()) && - (!p_simdata->waiting_task)) { - xbt_die("UNKNOWN STATUS. Please report this bug."); + if(p_simdata->waiting_task) { + DEBUG1("Canceling waiting task %s",p_simdata->waiting_task->name); + if(p_simdata->waiting_task->simdata->compute) { + SIMIX_action_cancel(p_simdata->waiting_task->simdata->compute); + } + else if (p_simdata->waiting_task->simdata->comm) { + SIMIX_action_cancel(p_simdata->waiting_task->simdata->comm); + } } - xbt_fifo_remove(msg_global->process_to_run,process); xbt_fifo_remove(msg_global->process_list,process); - xbt_context_kill(process->simdata->context); + SIMIX_process_kill(process->simdata->smx_process); - if(process==MSG_process_self()) { - /* I just killed myself */ - xbt_context_yield(); - } + return; } /** \ingroup m_process_management @@ -197,18 +158,7 @@ void MSG_process_kill(m_process_t process) */ MSG_error_t MSG_process_change_host(m_process_t process, m_host_t host) { - simdata_process_t simdata = NULL; - - /* Sanity check */ - - xbt_assert0(((process) && (process->simdata) - && (host)), "Invalid parameters"); - simdata = process->simdata; - - xbt_fifo_remove(simdata->host->simdata->process_list,process); - simdata->host = host; - xbt_fifo_unshift(host->simdata->process_list,process); - + xbt_die("MSG_process_change_host - not implemented yet - maybe useless function"); return MSG_OK; } @@ -342,7 +292,14 @@ int MSG_process_self_PPID(void) */ m_process_t MSG_process_self(void) { - return msg_global ? msg_global->current_process : NULL; + smx_process_t proc = SIMIX_process_self(); + if (proc != NULL) { + return (m_process_t)proc->data; + } + else { + return NULL; + } + } /** \ingroup m_process_management @@ -353,51 +310,11 @@ m_process_t MSG_process_self(void) */ MSG_error_t MSG_process_suspend(m_process_t process) { - simdata_process_t simdata = NULL; - simdata_task_t simdata_task = NULL; - - XBT_IN2("(%p(%s))", process, process->name); - - xbt_assert0(((process) && (process->simdata)), "Invalid parameters"); - - PAJE_PROCESS_PUSH_STATE(process,"S",NULL); - - if(process!=MSG_process_self()) { - simdata = process->simdata; - - xbt_assert0(simdata->waiting_task,"Process not waiting for anything else. Weird !"); - - simdata_task = simdata->waiting_task->simdata; - - simdata->suspended = 1; - if(simdata->blocked) { - XBT_OUT; - return MSG_OK; - } - - xbt_assert0(((simdata_task->compute)||(simdata_task->comm))&& - !((simdata_task->compute)&&(simdata_task->comm)), - "Got a problem in deciding which action to choose !"); - simdata->suspended = 1; - if(simdata_task->compute) - surf_workstation_resource->common_public->suspend(simdata_task->compute); - else - surf_workstation_resource->common_public->suspend(simdata_task->comm); - } else { - m_task_t dummy = MSG_TASK_UNINITIALIZED; - dummy = MSG_task_create("suspended", 0.0, 0, NULL); - - simdata = process->simdata; - simdata->suspended = 1; - __MSG_task_execute(process,dummy); - surf_workstation_resource->common_public->suspend(dummy->simdata->compute); - __MSG_wait_for_computation(process,dummy); - simdata->suspended = 0; - - MSG_task_destroy(dummy); - } - XBT_OUT; - return MSG_OK; + xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters"); + CHECK_HOST(); + + SIMIX_process_suspend(process->simdata->smx_process); + MSG_RETURN(MSG_OK); } /** \ingroup m_process_management @@ -408,47 +325,11 @@ MSG_error_t MSG_process_suspend(m_process_t process) */ MSG_error_t MSG_process_resume(m_process_t process) { - simdata_process_t simdata = NULL; - simdata_task_t simdata_task = NULL; xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters"); CHECK_HOST(); - XBT_IN2("(%p(%s))", process, process->name); - - if(process == MSG_process_self()) { - XBT_OUT; - MSG_RETURN(MSG_OK); - } - - simdata = process->simdata; - - if(simdata->blocked) { - PAJE_PROCESS_POP_STATE(process); - - simdata->suspended = 0; /* He'll wake up by itself */ - XBT_OUT; - MSG_RETURN(MSG_OK); - } - - if(!(simdata->waiting_task)) { - xbt_assert0(0,"Process not waiting for anything else. Weird !"); - XBT_OUT; - return MSG_WARNING; - } - simdata_task = simdata->waiting_task->simdata; - - - if(simdata_task->compute) { - surf_workstation_resource->common_public->resume(simdata_task->compute); - PAJE_PROCESS_POP_STATE(process); - } - else { - PAJE_PROCESS_POP_STATE(process); - surf_workstation_resource->common_public->resume(simdata_task->comm); - } - - XBT_OUT; + SIMIX_process_resume(process->simdata->smx_process); MSG_RETURN(MSG_OK); } @@ -461,76 +342,6 @@ MSG_error_t MSG_process_resume(m_process_t process) int MSG_process_is_suspended(m_process_t process) { xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters"); - - return (process->simdata->suspended); -} - -int __MSG_process_block(double max_duration, const char *info) -{ - m_process_t process = MSG_process_self(); - m_task_t dummy = MSG_TASK_UNINITIALIZED; - char blocked_name[512]; - snprintf(blocked_name,512,"blocked [%s] (%s:%s)", - info, process->name, process->simdata->host->name); - - XBT_IN1(": max_duration=%g",max_duration); - - dummy = MSG_task_create(blocked_name, 0.0, 0, NULL); - - PAJE_PROCESS_PUSH_STATE(process,"B",NULL); - - process->simdata->blocked=1; - __MSG_task_execute(process,dummy); - surf_workstation_resource->common_public->suspend(dummy->simdata->compute); - if(max_duration>=0) - surf_workstation_resource->common_public->set_max_duration(dummy->simdata->compute, - max_duration); - __MSG_wait_for_computation(process,dummy); - MSG_task_destroy(dummy); - process->simdata->blocked=0; - - if(process->simdata->suspended) { - DEBUG0("I've been suspended in the meantime"); - MSG_process_suspend(process); - DEBUG0("I've been resumed, let's keep going"); - } - - PAJE_PROCESS_POP_STATE(process); - - XBT_OUT; - return 1; -} - -MSG_error_t __MSG_process_unblock(m_process_t process) -{ - simdata_process_t simdata = NULL; - simdata_task_t simdata_task = NULL; - - xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters"); - CHECK_HOST(); - - XBT_IN2(": %s unblocking %s", MSG_process_self()->name,process->name); - - simdata = process->simdata; - if(!(simdata->waiting_task)) { - xbt_assert0(0,"Process not waiting for anything else. Weird !"); - XBT_OUT; - return MSG_WARNING; - } - simdata_task = simdata->waiting_task->simdata; - - xbt_assert0(simdata->blocked,"Process not blocked"); - - surf_workstation_resource->common_public->resume(simdata_task->compute); - - XBT_OUT; - - MSG_RETURN(MSG_OK); + return SIMIX_process_is_suspended(process->simdata->smx_process); } -int __MSG_process_isBlocked(m_process_t process) -{ - xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters"); - - return (process->simdata->blocked); -} diff --git a/src/msg/msg_config.c b/src/msg/msg_config.c index d3e3498cb1..811d1b5931 100644 --- a/src/msg/msg_config.c +++ b/src/msg/msg_config.c @@ -1,68 +1,16 @@ -/* $Id$ */ - -/* msg_config.c - support for MSG user configuration */ - -/* Copyright (c) 2005 Martin Quinson. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ /* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "private.h" + +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" -#include "gras_config.h" - -int _msg_init_status = 0; /* 0: beginning of time; - 1: pre-inited (cfg_set created); - 2: inited (running) */ -xbt_cfg_t _msg_cfg_set = NULL; - -/* callback of the surf_workstation_model variable */ -static void _msg_cfg_cb__surf_workstation_model(const char *name, int pos) { - char *val; - - xbt_assert0(_msg_init_status<2, "Cannot change the model after the initialization"); - - val = xbt_cfg_get_string (_msg_cfg_set, name); - -#ifdef USE_GTNETS - xbt_assert1(!strcmp(val, "CLM03") || - !strcmp(val, "KCCFLN05") || - !strcmp(val, "GTNETS"), - "Unknown workstation model: %s (either 'CLM03', 'KCCFLN05', or 'GTNETS'",val); -#else - xbt_assert1(!strcmp(val, "CLM03") || - !strcmp(val, "KCCFLN05"), - "Unknown workstation model: %s (either 'CLM03' or 'KCCFLN05'",val); -#endif - -} - -/* create the config set and register what should be */ -void msg_config_init(void) { - - if (_msg_init_status) - return; /* Already inited, nothing to do */ - - _msg_init_status = 1; - _msg_cfg_set = xbt_cfg_new(); - - xbt_cfg_register (_msg_cfg_set, - "surf_workstation_model", xbt_cfgelm_string, 1,1, - &_msg_cfg_cb__surf_workstation_model,NULL); - - xbt_cfg_set_string(_msg_cfg_set,"surf_workstation_model", "KCCFLN05"); -} - -void msg_config_finalize(void) { - - if (!_msg_init_status) - return; /* Not initialized yet. Nothing to do */ - - xbt_cfg_free(&_msg_cfg_set); - _msg_init_status = 0; -} +#include "simix/simix.h" /** \brief set a configuration variable * @@ -75,16 +23,12 @@ void msg_config_finalize(void) { * Example: * MSG_config("surf_workstation_model","KCCFLN05"); */ -void -MSG_config(const char *name, ...) { +void MSG_config(const char *name, ...) +{ va_list pa; - - if (!_msg_init_status) { - msg_config_init(); - } /* xbt_cfg_dump("msg_cfg_set","",_msg_cfg_set);*/ va_start(pa,name); - xbt_cfg_set_vargs(_msg_cfg_set,name,pa); + SIMIX_config(name,pa); va_end(pa); - + return; } diff --git a/src/msg/private.h b/src/msg/private.h index ea7e5190d2..e78420d889 100644 --- a/src/msg/private.h +++ b/src/msg/private.h @@ -1,15 +1,18 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2004,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - + #ifndef METASIMGRID_PRIVATE_H #define METASIMGRID_PRIVATE_H #include #include "msg/msg.h" +#include "simix/simix.h" #include "surf/surf.h" #include "xbt/fifo.h" #include "xbt/dynar.h" @@ -17,27 +20,27 @@ #include "xbt/dict.h" #include "xbt/context.h" #include "xbt/config.h" -#include "xbt/mallocator.h" /**************** datatypes **********************************/ typedef struct simdata_host { - void *host; /* SURF modeling */ + smx_host_t host; /* SURF modeling */ xbt_fifo_t *mbox; /* array of FIFOs used as a mailboxes */ - m_process_t *sleeping; /* array of process used to know whether a local process is - waiting for a communication on a channel */ - xbt_fifo_t process_list; + smx_cond_t *sleeping; /* array of conditions on which the processes sleep if they are waiting for a communication on a channel */ + smx_mutex_t mutex; /* mutex to access the host */ } s_simdata_host_t; /********************************* Task **************************************/ typedef struct simdata_task { - surf_action_t compute; /* SURF modeling of computation */ - surf_action_t comm; /* SURF modeling of communication */ + smx_action_t compute; /* SURF modeling of computation */ + smx_action_t comm; /* SURF modeling of communication */ double message_size; /* Data size */ double computation_amount; /* Computation size */ - xbt_dynar_t sleeping; /* process to wake-up */ + smx_cond_t cond; + smx_mutex_t mutex; /* Task mutex */ m_process_t sender; + m_process_t receiver; m_host_t source; double priority; double rate; @@ -53,18 +56,15 @@ typedef struct simdata_task { typedef struct simdata_process { m_host_t host; /* the host on which the process is running */ - xbt_context_t context; /* the context that executes the scheduler fonction */ + smx_process_t smx_process; int PID; /* used for debugging purposes */ int PPID; /* The parent PID */ - m_task_t waiting_task; - int blocked; - int suspended; m_host_t put_host; /* used for debugging purposes */ m_channel_t put_channel; /* used for debugging purposes */ + m_task_t waiting_task; int argc; /* arguments number if any */ char **argv; /* arguments table if any */ MSG_error_t last_errno; /* the last value returned by a MSG_function */ - int paje_state; /* the number of states stacked with Paje */ } s_simdata_process_t; typedef struct process_arg { @@ -80,29 +80,14 @@ typedef struct process_arg { /************************** Global variables ********************************/ typedef struct MSG_Global { xbt_fifo_t host; - xbt_fifo_t process_to_run; xbt_fifo_t process_list; int max_channel; - m_process_t current_process; - xbt_dict_t registered_functions; - FILE *paje_output; - int paje_maxPID; int PID; int session; - xbt_mallocator_t task_mallocator; - xbt_mallocator_t task_simdata_mallocator; } s_MSG_Global_t, *MSG_Global_t; extern MSG_Global_t msg_global; -/************************** Configuration support ********************************/ -void msg_config_init(void); /* create the config set, call this before use! */ -void msg_config_finalize(void); /* destroy the config set, call this at cleanup. */ -extern int _msg_init_status; /* 0: beginning of time; - 1: pre-inited (cfg_set created); - 2: inited (running) */ -extern xbt_cfg_t _msg_cfg_set; - /*************************************************************/ #define PROCESS_SET_ERRNO(val) (MSG_process_self()->simdata->last_errno=val) @@ -110,68 +95,18 @@ extern xbt_cfg_t _msg_cfg_set; #define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0) /* #define CHECK_ERRNO() ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */ -#define CHECK_HOST() xbt_assert0(surf_workstation_resource->extension_public-> \ - get_state(MSG_host_self()->simdata->host)==SURF_CPU_ON,\ +#define CHECK_HOST() xbt_assert0(SIMIX_host_get_state(SIMIX_host_self())==1,\ "Host failed, you cannot call this function.") -m_host_t __MSG_host_create(const char *name, void *workstation, - void *data); -void __MSG_host_destroy(m_host_t host); -void __MSG_task_execute(m_process_t process, m_task_t task); -MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task); -MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task); +m_host_t __MSG_host_create(smx_host_t workstation, void *data); -int __MSG_process_block(double max_duration, const char *info); -MSG_error_t __MSG_process_unblock(m_process_t process); -int __MSG_process_isBlocked(m_process_t process); +void __MSG_host_destroy(m_host_t host); void __MSG_display_process_status(void); -m_task_t task_mallocator_new_f(void); -void task_mallocator_free_f(m_task_t task); -void task_mallocator_reset_f(m_task_t task); - - - -#define PAJE_PROCESS_STATE(process,state)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"10 %f S_t %p %s\n",\ - surf_get_clock(), (process),(state)) -#define PAJE_PROCESS_PUSH_STATE(process,state,task)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"11 %f S_t %p %s \"%s\"\n",\ - surf_get_clock(), (process),(state),(task)?((m_task_t)(task))->name:" ") -#define PAJE_PROCESS_POP_STATE(process)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"12 %f S_t %p\n",\ - surf_get_clock(), (process)) - -#define PAJE_PROCESS_FREE(process)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"8 %f %p P_t\n", \ - surf_get_clock(), (process)) -#define PAJE_PROCESS_NEW(process)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"7 %f %p P_t %p \"%s %d (%d)\"\n", \ - surf_get_clock(), (process), (process)->simdata->host, \ - (process)->name, (process)->simdata->PID, msg_global->session) -#define PAJE_COMM_START(process,task,channel)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,\ - "16 %f Comm CUR \"CHANNEL_%d %s\" %p %p\n", \ - surf_get_clock(), channel, task->name, (process), task) -#define PAJE_COMM_STOP(process,task,channel)\ - if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,\ - "17 %f Comm CUR \"CHANNEL_%d %s\" %p %p\n", \ - surf_get_clock(), channel, task->name, (process), task) -#define PAJE_HOST_NEW(host)\ - if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"7 %f %p H_t CUR \"%s\"\n",surf_get_clock(), \ - host, host->name) -#define PAJE_HOST_FREE(host)\ - if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"8 %f %p H_t\n",surf_get_clock(), host); +m_process_t __MSG_process_create_with_arguments(const char *name, + m_process_code_t code, void *data, + char * hostname, int argc, char **argv); #endif diff --git a/src/msg/task.c b/src/msg/task.c index d058cbe476..a9483d8fb2 100644 --- a/src/msg/task.c +++ b/src/msg/task.c @@ -1,18 +1,18 @@ -/* $Id$ */ - -/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */ +/* $Id$ */ + +/* Copyright (c) 2002-2007 Arnaud Legrand. */ +/* Copyright (c) 2007 Bruno Donassolo. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "private.h" +#include "msg/private.h" #include "xbt/sysdep.h" #include "xbt/log.h" /** \defgroup m_task_management Managing functions of Tasks * \brief This section describes the task structure of MSG - */ -/** \addtogroup m_task_management * (#m_task_t) and the functions for managing it. * \htmlonly \endhtmlonly * @@ -47,21 +47,29 @@ m_task_t MSG_task_create(const char *name, double compute_duration, double message_size, void *data) { - m_task_t task = xbt_mallocator_get(msg_global->task_mallocator); - simdata_task_t simdata = task->simdata; - + m_task_t task = xbt_new(s_m_task_t,1); + simdata_task_t simdata = xbt_new(s_simdata_task_t,1); + task->simdata = simdata; /* Task structure */ task->name = xbt_strdup(name); task->data = data; /* Simulator Data */ - simdata->sleeping = xbt_dynar_new(sizeof(m_process_t),NULL); simdata->computation_amount = compute_duration; simdata->message_size = message_size; simdata->rate = -1.0; simdata->priority = 1.0; simdata->using = 1; simdata->sender = NULL; + simdata->receiver = NULL; + simdata->cond = SIMIX_cond_init(); + simdata->mutex = SIMIX_mutex_init(); + simdata->compute = NULL; + simdata->comm = NULL; + + simdata->host_list = NULL; + simdata->comp_amount = NULL; + simdata->comm_amount = NULL; return task; } @@ -121,26 +129,29 @@ const char *MSG_task_get_name(m_task_t task) */ MSG_error_t MSG_task_destroy(m_task_t task) { - surf_action_t action = NULL; + smx_action_t action = NULL; xbt_assert0((task != NULL), "Invalid parameter"); + /* why? if somebody is using, then you can't free! ok... but will return MSG_OK? when this task will be destroyed? isn't the user code wrong? */ task->simdata->using--; if(task->simdata->using>0) return MSG_OK; - xbt_assert0((xbt_dynar_length(task->simdata->sleeping)==0), - "Task still used. There is a problem. Cannot destroy it now!"); - if(task->name) free(task->name); - xbt_dynar_free(&(task->simdata->sleeping)); + SIMIX_cond_destroy(task->simdata->cond); + SIMIX_mutex_destroy(task->simdata->mutex); action = task->simdata->compute; - if(action) action->resource_type->common_public->action_free(action); + if(action) SIMIX_action_destroy(action); action = task->simdata->comm; - if(action) action->resource_type->common_public->action_free(action); + if(action) SIMIX_action_destroy(action); + /* parallel tasks only */ if(task->simdata->host_list) xbt_free(task->simdata->host_list); + + /* free main structures */ + xbt_free(task->simdata); + xbt_free(task); - xbt_mallocator_release(msg_global->task_mallocator, task); return MSG_OK; } @@ -155,11 +166,11 @@ MSG_error_t MSG_task_cancel(m_task_t task) xbt_assert0((task != NULL), "Invalid parameter"); if(task->simdata->compute) { - surf_workstation_resource->common_public->action_cancel(task->simdata->compute); + SIMIX_action_cancel(task->simdata->compute); return MSG_OK; } if(task->simdata->comm) { - surf_workstation_resource->common_public->action_cancel(task->simdata->comm); + SIMIX_action_cancel(task->simdata->comm); return MSG_OK; } @@ -170,7 +181,8 @@ MSG_error_t MSG_task_cancel(m_task_t task) * \brief Returns the computation amount needed to process a task #m_task_t. * Once a task has been processed, this amount is thus set to 0... */ -double MSG_task_get_compute_duration(m_task_t task) { +double MSG_task_get_compute_duration(m_task_t task) +{ xbt_assert0((task != NULL) && (task->simdata != NULL), "Invalid parameter"); return task->simdata->computation_amount; @@ -185,7 +197,7 @@ double MSG_task_get_remaining_computation(m_task_t task) xbt_assert0((task != NULL) && (task->simdata != NULL), "Invalid parameter"); if(task->simdata->compute) { - return task->simdata->compute->remains; + return SIMIX_action_get_remains(task->simdata->compute); } else { return task->simdata->computation_amount; } @@ -195,31 +207,13 @@ double MSG_task_get_remaining_computation(m_task_t task) * \brief Returns the size of the data attached to a task #m_task_t. * */ -double MSG_task_get_data_size(m_task_t task) { +double MSG_task_get_data_size(m_task_t task) +{ xbt_assert0((task != NULL) && (task->simdata != NULL), "Invalid parameter"); return task->simdata->message_size; } -MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task) -{ - int _cursor; - m_process_t proc = NULL; - - xbt_assert0(((task != NULL) - && (task->simdata != NULL)), "Invalid parameters"); - - xbt_dynar_push(task->simdata->sleeping, &process); - process->simdata->waiting_task = task; - xbt_context_yield(); - process->simdata->waiting_task = NULL; - xbt_dynar_foreach(task->simdata->sleeping,_cursor,proc) { - if(proc==process) - xbt_dynar_remove_at(task->simdata->sleeping,_cursor,&proc); - } - - return MSG_OK; -} /** \ingroup m_task_management @@ -228,32 +222,12 @@ MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task) * cpu power than the other ones. * */ -void MSG_task_set_priority(m_task_t task, double priority) { +void MSG_task_set_priority(m_task_t task, double priority) +{ xbt_assert0((task != NULL) && (task->simdata != NULL), "Invalid parameter"); task->simdata->priority = 1/priority; if(task->simdata->compute) - surf_workstation_resource->common_public-> - set_priority(task->simdata->compute, task->simdata->priority); -} - -/* Mallocator functions */ -m_task_t task_mallocator_new_f(void) { - m_task_t task = xbt_new(s_m_task_t, 1); - simdata_task_t simdata = xbt_new0(s_simdata_task_t, 1); - task->simdata = simdata; - return task; + SIMIX_action_set_priority(task->simdata->compute, task->simdata->priority); } -void task_mallocator_free_f(m_task_t task) { - xbt_assert0((task != NULL), "Invalid parameter"); - - xbt_free(task->simdata); - xbt_free(task); - - return; -} - -void task_mallocator_reset_f(m_task_t task) { - memset(task->simdata, 0, sizeof(s_simdata_task_t)); -} -- 2.20.1