X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3248c64c65a5750a7b9cbf23f5896e9a7a0f8374..cd31471b40c49ec4e41867bbb35580c2f54d1ee4:/doc/FAQ.doc diff --git a/doc/FAQ.doc b/doc/FAQ.doc index c3c34f1c91..a6e162ec4a 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -1068,22 +1068,32 @@ you still don't see how to do it, please come back to us... \subsubsection faq_MIA_asynchronous I want to do asynchronous communications in MSG -Up until now, there is no asynchronous communications in MSG. However, -you can create as many process as you want so you should be able to do -whatever you want... I've written a queue module to help implementing -some asynchronous communications at low cost (creating thousands of -process only to handle communications may be problematic in term of -performance at some point). I'll add it in the distribution asap. +In the past (version <= 3.4), there was no function to perform asynchronous communications. +It could easily be implemented by creating new process when needed though. Since version 3.5, +we have introduced the following functions: + - MSG_task_isend() + - MSG_task_irecv() + - MSG_comm_test() + - MSG_comm_wait() + - MSG_comm_waitall() + - MSG_comm_waitany() + - MSG_comm_destroy() + +We refer you to the description of these functions for more details on their usage as well +as to the exemple section on \ref MSG_ex_asynchronous_communications. \subsubsection faq_MIA_thread_synchronization I need to synchronize my MSG processes -You obviously cannot use pthread_mutexes of pthread_conds. The best -thing would be to propose similar structures. Unfortunately, we -haven't found time to do it yet. However you can try to play with -MSG_process_suspend() and MSG_process_resume(). You can even do some -synchronization with fake communications (using MSG_task_get(), +You obviously cannot use pthread_mutexes of pthread_conds since we handle every +scheduling related decision within SimGrid. + +In the past (version <=3.3.4) you could do it by playing with +MSG_process_suspend() and MSG_process_resume() or with fake communications (using MSG_task_get(), MSG_task_put() and MSG_task_Iprobe()). +Since version 3.4, you can use classical synchronization structures. See page \ref XBT_synchro or simply check in +include/xbt/synchro_core.h. + \subsubsection faq_MIA_host_load Where is the get_host_load function hidden in MSG? There is no such thing because its semantic wouldn't be really @@ -2304,21 +2314,21 @@ so you can exchange any kind of data ( tables, matrix, strings … ) between pr \li set Hosts \verbatim - simgrid.Host.new("Tremblay",98095000); - simgrid.Host.new("Jupiter",76296000); - simgrid.Host.new("Fafard",76296000); - simgrid.Host.new("Ginette",48492000); - simgrid.Host.new("Bourassa",48492000); + simgrid.Host.new{id="Tremblay",power=98095000}; + simgrid.Host.new{id="Jupiter",power=76296000}; + simgrid.Host.new{id="Fafard",power=76296000}; + simgrid.Host.new{id="Ginette",power=48492000}; + simgrid.Host.new{id="Bourassa",power=48492000}; \endverbatim - we use simgrid.Host.new(host_id,power) to instanciate our hosts. + we use simgrid.Host.new{id=id_host,power=power_host} to instanciate our hosts. \li set Links \verbatim for i=0,11 do - simgrid.Link.new(i,252750+ i*768,0.000270544+i*0.087); -- some crazy values ;) + simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087}; -- some crazy values ;) end \endverbatim - we used simgrid.Link.new(link_id,bandwidth,latency) with a simple for loop to create all links we need ( much easier than XML hein ? ) + we used simgrid.Link.new{id=link_id,bandwidth=bw,latency=lat} with a simple for loop to create all links we need (much easier than XML hein ?) \li set Routes \verbatim