From: mquinson Date: Mon, 26 Apr 2004 10:14:05 +0000 (+0000) Subject: Update to reflect last code changes X-Git-Tag: v3.3~5262 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/88e99e0a899f7db13b4a270be4b1953b5e059f1f Update to reflect last code changes git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@84 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/cruft/doc/gras-docs.sgml b/cruft/doc/gras-docs.sgml index 5251291b80..5ca0b78dba 100644 --- a/cruft/doc/gras-docs.sgml +++ b/cruft/doc/gras-docs.sgml @@ -2,7 +2,6 @@ - @@ -37,7 +36,6 @@ Communication facilities &comm-datadesc; - &comm-dd-expert; &comm-socks; &comm-messages; @@ -295,8 +293,8 @@ In SG, it shouldn't be that difficult either ;) =item Write examples. ---> +--> GRAS toolbox diff --git a/cruft/doc/gras-sections.txt b/cruft/doc/gras-sections.txt index e9cb3bbcad..1e5eca671f 100644 --- a/cruft/doc/gras-sections.txt +++ b/cruft/doc/gras-sections.txt @@ -29,7 +29,7 @@ gras_log_default_appender CDEBUG6 CVERB6 CINFO6 -CWARNING6 +CWARN6 CERROR6 CCRITICAL6 @@ -37,7 +37,7 @@ CCRITICAL6 DEBUG6 VERB6 INFO6 -WARNING6 +WARN6 ERROR6 CRITICAL6 @@ -71,12 +71,12 @@ CINFO2 CINFO3 CINFO4 CINFO5 -CWARNING0 -CWARNING1 -CWARNING2 -CWARNING3 -CWARNING4 -CWARNING5 +CWARN0 +CWARN1 +CWARN2 +CWARN3 +CWARN4 +CWARN5 CERROR0 CERROR1 CERROR2 @@ -115,12 +115,12 @@ INFO2 INFO3 INFO4 INFO5 -WARNING0 -WARNING1 -WARNING2 -WARNING3 -WARNING4 -WARNING5 +WARN0 +WARN1 +WARN2 +WARN3 +WARN4 +WARN5 ERROR0 ERROR1 ERROR2 @@ -249,69 +249,33 @@ gras_cfgelm_type_t gras_cfg_get_type - - - - - -
comm_datadesc Data description -gras_datadesc_from_nws -gras_datadesc_parse -gras_datadesc_copy_data +gras_datadesc_by_name +gras_datadesc_by_symbol +gras_datadesc_import_nws gras_datadesc_declare_array gras_datadesc_declare_array_dyn gras_datadesc_declare_ref gras_datadesc_declare_ref_disc gras_datadesc_declare_struct -gras_datadesc_declare_struct_add_code -gras_datadesc_declare_struct_add_name +gras_datadesc_declare_struct_append_name gras_datadesc_declare_union -gras_datadesc_declare_union_add_code -gras_datadesc_declare_union_add_name -
- -
-comm_datadesc_expert -Advanced Data description -gras_datadesc_declare_array_cb -gras_datadesc_declare_ref_cb -gras_datadesc_declare_struct_add_code_cb -gras_datadesc_declare_struct_add_name_cb -gras_datadesc_declare_struct_cb -gras_datadesc_declare_union_add_code_cb -gras_datadesc_declare_union_add_name_cb -gras_datadesc_declare_union_cb +gras_datadesc_declare_union_append_name +gras_datadesc_cb_set_pre +gras_datadesc_cb_set_post -gras_dd_cbps_block_begin -gras_dd_cbps_block_end -gras_dd_cbps_get gras_dd_cbps_pop gras_dd_cbps_push gras_dd_cbps_set -
+gras_dd_cbps_get +gras_dd_cbps_block_begin +gras_dd_cbps_block_end -
-dd_internal -Implementation of data description -gras_ddt_free -gras_ddt_get_by_code -gras_ddt_get_by_name -gras_ddt_new_array -gras_ddt_new_from_nws -gras_ddt_new_ignored -gras_ddt_new_parse -gras_ddt_new_ref -gras_ddt_new_scalar -gras_ddt_new_struct -gras_ddt_new_struct_append -gras_ddt_new_union -gras_ddt_new_union_append -gras_ddt_register +gras_arch_selfid
@@ -321,33 +285,30 @@ gras_socket_client gras_socket_server gras_socket_close gras_socket_peer_name -gras_socket_peer_addr +gras_socket_peer_port +gras_socket_my_port
- - - - - - - - - - - - -
comm_messages Messages -gras_msgtype_register +gras_msgtype_declare +gras_msgtype_declare_v +gras_msgtype_by_name +gras_msgtype_by_namev + gras_cb_t gras_cb_register -gras_msg_new -gras_msg_free -gras_msg_handle +gras_cb_unregister + gras_msg_send gras_msg_wait +gras_msg_handle + + +gras_msg_recv +gras_msg_init +gras_msg_exit
@@ -371,45 +332,6 @@ gras_sleep gras_fs_fopen
- - -
-gras_private -gras_lock -gras_unlock -gras_msg_discard -FormatTypes -gras_datadesc_cmp -SIMPLE_TYPE_COUNT -
- -
-gras_rl -Real life specific stuff -grasMsgRecv -ConvertData -DataSize -DifferentFormat -DifferentOrder -DifferentSize -HomogenousConvertData -HomogenousDataSize -ReverseData - -headerDescriptorCount -countDescriptorCount -PEER_NAME_LEN -
- -
-gras_sg -CloseSocket -
- - - - -
cruft Cruft to ignore in the documentation diff --git a/cruft/doc/tmpl/comm_datadesc.sgml b/cruft/doc/tmpl/comm_datadesc.sgml index cbfbfc9017..1f92175c3b 100644 --- a/cruft/doc/tmpl/comm_datadesc.sgml +++ b/cruft/doc/tmpl/comm_datadesc.sgml @@ -2,7 +2,7 @@ Data description -Simple ways to describe data to exchange +Describing data to be exchanged @@ -14,7 +14,25 @@ Simple ways to describe data to exchange - + + + + + +@name: +@type: +@Returns: + + + + + + + +@name: + + + @@ -22,123 +40,167 @@ Simple ways to describe data to exchange @name: @desc: @howmany: -@code: -@Returns: - @dst: +@Returns: - + @name: -@Cdefinition: -@code: +@element_type: +@dynamic_size: +@dst: @Returns: -@def: -@dst: +@elm_type: +@code: - + @name: -@elm_type: -@size: +@referenced_type: +@dst: +@Returns: + +@ref_type: @code: - + @name: -@elm_type: -@dynamic_size: +@dst: +@Returns: + @code: - + +@struct_type: @name: -@ref_type: -@code: +@field_type_name: +@Returns: - + @name: -@discriminant: +@selector: +@dst: +@Returns: + @code: - + +@union_type: @name: -@code: +@field_type_name: +@Returns: - + -@struct_code: -@field_name: -@field_type_code: +@type: +@pre: - + -@struct_code: -@field_name: -@field_type_name: +@type: +@post: - + +@ps: @name: -@code: +@ddt: - + -@union_code: -@field_name: -@field_type_code: +@ps: +@name: +@data: +@ddt: - + -@union_code: -@field_name: -@field_type_name: +@ps: +@name: +@data: +@ddt: + + + + + + + +@ps: +@name: +@ddt: + + + + + + + +@ps: + + + + + + + +@ps: + + + + + + + +@Returns: diff --git a/cruft/doc/tmpl/comm_datadesc_expert.sgml b/cruft/doc/tmpl/comm_datadesc_expert.sgml deleted file mode 100644 index 14e6a156b4..0000000000 --- a/cruft/doc/tmpl/comm_datadesc_expert.sgml +++ /dev/null @@ -1,177 +0,0 @@ - -Advanced Data description - - -Advanced ways to describe data (for experts) - - - - - - - - - - - - - - - - -@name: -@element_type: -@fixed_size: -@dynamic_size: -@post: -@code: -@Returns: - - - - - - - -@name: -@referenced_type: -@discriminant: -@post: -@code: -@Returns: - - - - - - - -@struct_code: -@field_name: -@field_code: -@pre_cb: -@post_cb: -@Returns: - - - - - - - -@struct_code: -@field_name: -@field_type_name: -@pre_cb: -@post_cb: -@Returns: - - - - - - - -@name: -@pre_cb: -@post_cb: -@code: -@Returns: - - - - - - - -@union_code: -@field_name: -@field_code: -@pre_cb: -@post_cb: -@Returns: - - - - - - - -@union_code: -@field_name: -@field_type_name: -@pre_cb: -@post_cb: -@Returns: - - - - - - - -@name: -@field_count: -@post: -@code: -@Returns: - - - - - - - -@ps: - - - - - - - -@ps: - - - - - - - -@ps: -@name: -@ddt: - - - - - - - -@ps: -@name: -@ddt: - - - - - - - -@ps: -@name: -@data: -@ddt: - - - - - - - -@ps: -@name: -@data: -@ddt: - - diff --git a/cruft/doc/tmpl/comm_messages.sgml b/cruft/doc/tmpl/comm_messages.sgml index 0acbe22dc8..9b0f6d2117 100644 --- a/cruft/doc/tmpl/comm_messages.sgml +++ b/cruft/doc/tmpl/comm_messages.sgml @@ -14,65 +14,83 @@ Defining messages and callbacks, and sending/receiving messages. - + -@msgId: @name: -@sequence_count: -@Varargs: +@payload: +@dst: @Returns: - + -@msg: +@name: +@version: +@payload: +@dst: @Returns: - + -@message: -@TTL: -@cb: +@name: +@dst: @Returns: - + -@msgId: -@free_data_on_free: -@seqCount: -@Varargs: +@name: +@version: +@dst: @Returns: - + +@expeditor: +@payload_type: +@payload_data: +@Returns: + @msg: - + -@timeOut: +@msgtype: +@cb: @Returns: + +@message: +@TTL: + + + + + + + +@msgtype: +@cb: @@ -80,10 +98,14 @@ Defining messages and callbacks, and sending/receiving messages. +@sock: +@msgtype: +@payload: +@Returns: + @sd: @msg: @freeDirective: -@Returns: @@ -92,8 +114,21 @@ Defining messages and callbacks, and sending/receiving messages. @timeout: +@msgt_want: +@expeditor: +@payload: +@Returns: + @id: @message: + + + + + + + +@timeOut: @Returns: diff --git a/cruft/doc/tmpl/comm_socks.sgml b/cruft/doc/tmpl/comm_socks.sgml index 6bc7b7d6ce..807770c55c 100644 --- a/cruft/doc/tmpl/comm_socks.sgml +++ b/cruft/doc/tmpl/comm_socks.sgml @@ -51,3 +51,32 @@ Open/close sockets, and get info on peer. @Returns: + + + + + +@sock: +@Returns: + +@sd: + + + + + + + +@sock: +@Returns: + + + + + + + +@sock: +@Returns: + + diff --git a/cruft/doc/tmpl/gras-unused.sgml b/cruft/doc/tmpl/gras-unused.sgml index 4bd27dcd56..e14b0e6cfd 100644 --- a/cruft/doc/tmpl/gras-unused.sgml +++ b/cruft/doc/tmpl/gras-unused.sgml @@ -176,6 +176,66 @@ Handling sockets Sockets API + + + + + + + + + + + + + + + + + +comm_callbacks + + + + + + + + + + + + + + + + + + + +comm_cb + + + + + + + + + + + + + + + +Advanced ways to describe data (for experts) + + + +Advanced Data description + + @@ -236,6 +296,26 @@ config Data description callbacks persistant state + + + + + + + + + + + + + + + + + +Implementation of data description + + @@ -368,6 +448,125 @@ Overview gras + + + + + + + + + + + + + + + + + +gras_private + + + + + + + + + + + + + + + +Implementation of GRAS suited for real life. + + + +RL + + + + + SimGrid was designed to ease the comparison of algorithms and + heuristics. That way, a lot of complicated notion from the system layer + were volontary left off. For example, migrating a process from an host to + another is as easy as: MSG_process_change_host(process, new_host). + + + + No need to tell that performing this operation on real platform is really + harder. This simplification is a very good thing when you want to rapidly + prototype code, but makes things somehow more complicated in GRAS since + we want to have a realistic API, since it have to be implemented in + reality also. + + + + The best example of complexity in GRAS_SG induced by simplicity in + SimGrid is the sockets handling. There is no "socket" in SG, but only + m_channel_t. In contrary to sockets from RL, no special treatment is + needed for a process before writing or reading on/from a channel. So, a + given channel can be pooled by more than one process. Likewise, you can + send data to a channel that nobody is actually listening to. + + + + The SG implementation of GRAS repport as an error the fact that nobody is + listening to the socket when trying to open a socket, or send stuff using + a previously openned socket. That way, the SG version can be used to + debug all syncronization issues. For that, we store mainly the PID of + both the sender and the receiver in the socket structure, and then + resolve PID->process at the lastest moment. This search is a bit + expensive, but as long as there is no real garbage collection in SG, with + the information "dead process" within the structure, it's the only + solution to make sure that we won't dereference pointers to an old freed + structure when the process on the other side of the structure did finish + since the creation of the socket. + + + + As said in the overview, the processes can declare to hear on several + sockets, but all incoming messages are handled by the same loop. So, we + can use only one channel per process, and use a table on each host to + determine to which process a message should be delivered depending on the + socket number provided by the sender. + + + + + +RL, the implementation suited for real life. + + + + + + +Implementation of GRAS on top of the simulator. + + + +SG + + @@ -807,6 +1006,20 @@ Sockets @a4: @a5: + + + + + +@c: +@f: +@a1: +@a2: +@a3: +@a4: +@a5: +@a6: + @@ -827,6 +1040,17 @@ Sockets @waitForPeer: @Returns: + + + + + +@destination: +@source: +@description: +@length: +@sourceFormat: + @@ -872,6 +1096,29 @@ Sockets @STRUCT_TYPE: @LAST_TYPE: + + + + + +@whatType: +@Returns: + + + + + + +@Returns: + + + + + + +@whatType: +@Returns: + @@ -981,6 +1228,27 @@ Sockets + + + + + +@destination: +@source: +@whatType: +@repetitions: +@sourceFormat: + + + + + + +@whatType: +@repetitions: +@format: +@Returns: + @@ -1204,6 +1472,17 @@ Sockets @sd: @Returns: + + + + + +@destination: +@source: +@whatType: +@repetitions: +@format: + @@ -1221,6 +1500,12 @@ Sockets @repetitions: @offset: + + + + + + @@ -1269,6 +1554,19 @@ Sockets + + + + + +@f: +@a1: +@a2: +@a3: +@a4: +@a5: +@a6: + @@ -1424,6 +1722,16 @@ Sockets @Varargs: @Returns: + + + + + +@msg: +@timeout: +@Returns: +@sd: + @@ -1585,6 +1893,328 @@ Sockets @c: @data: + + + + + +@name: +@elm_type: +@size: +@code: + + + + + + +@name: +@element_type: +@fixed_size: +@dynamic_size: +@post: +@code: +@Returns: + + + + + + +@name: +@referenced_type: +@discriminant: +@post: +@code: +@Returns: + + + + + + +@name: +@discriminant: +@code: + + + + + + +@struct_code: +@field_name: +@field_type_code: + + + + + + +@struct_code: +@field_name: +@field_code: +@pre_cb: +@post_cb: +@Returns: + + + + + + +@struct_code: +@field_name: +@field_type_name: + + + + + + +@struct_code: +@field_name: +@field_type_name: +@pre_cb: +@post_cb: +@Returns: + + + + + + +@name: +@pre_cb: +@post_cb: +@code: +@Returns: + + + + + + +@union_code: +@field_name: +@field_type_code: + + + + + + +@union_code: +@field_name: +@field_code: +@pre_cb: +@post_cb: +@Returns: + + + + + + +@union_code: +@field_name: +@field_type_name: + + + + + + +@union_code: +@field_name: +@field_type_name: +@pre_cb: +@post_cb: +@Returns: + + + + + + +@name: +@field_count: +@post: +@code: +@Returns: + + + + + + +@name: +@desc: +@howmany: +@code: +@Returns: +@dst: + + + + + + +@name: +@Cdefinition: +@dst: +@Returns: +@code: +@def: + + + + + + +@type: + + + + + + +@code: +@type: +@Returns: + + + + + + +@name: +@type: +@Returns: + + + + + + +@name: +@element_type: +@fixed_size: +@dynamic_size: +@post: +@dst: +@Returns: + + + + + + +@name: +@desc: +@howmany: +@dst: +@Returns: + + + + + + +@name: +@default_value: +@free_func: +@size: +@alignment: +@post: +@dst: +@Returns: + + + + + + +@name: +@C_definition: +@dst: +@Returns: + + + + + + +@name: +@referenced_type: +@discriminant: +@post: +@dst: +@Returns: + + + + + + +@name: +@type: +@Returns: + + + + + + +@name: +@pre: +@post: +@dst: +@Returns: + + + + + + +@struct_type: +@name: +@field_type: +@pre: +@post: +@Returns: + + + + + + +@name: +@field_count: +@post: +@dst: +@Returns: + + + + + + +@union_type: +@name: +@field_type: +@pre: +@post: +@Returns: + + + + + + +@type: +@Returns: + @@ -1635,6 +2265,43 @@ Sockets @cat: @thresholdPriority: + + + + + +@sd: +@size: + + + + + + +@msg: + + + + + + +@msgId: +@free_data_on_free: +@seqCount: +@Varargs: +@Returns: + + + + + + +@msgId: +@name: +@sequence_count: +@Varargs: +@Returns: + @@ -1679,14 +2346,6 @@ Sockets @sock: @Returns: - - - - - -@sd: -@Returns: - diff --git a/cruft/doc/tmpl/gras_rl.sgml b/cruft/doc/tmpl/gras_rl.sgml index 65544a5c6c..5e633a53a3 100644 --- a/cruft/doc/tmpl/gras_rl.sgml +++ b/cruft/doc/tmpl/gras_rl.sgml @@ -14,18 +14,6 @@ Implementation of GRAS suited for real life. - - - - - -@msg: -@timeout: -@Returns: - -@sd: - - diff --git a/cruft/doc/tmpl/tbx_log.sgml b/cruft/doc/tmpl/tbx_log.sgml index 0d6f869148..fefcb249be 100644 --- a/cruft/doc/tmpl/tbx_log.sgml +++ b/cruft/doc/tmpl/tbx_log.sgml @@ -440,7 +440,7 @@ An easy-to-use, fast and flexible message logging architecture. @a6: - + @@ -527,7 +527,7 @@ An easy-to-use, fast and flexible message logging architecture. @a6: - +