Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New functionality: possibility for libraries to register globals on each process...
[simgrid.git] / src / msg / global.c
index 877d5f1..54e39b9 100644 (file)
@@ -14,7 +14,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(global, msg,
 MSG_Global_t msg_global = NULL;
 
 /* static void MarkAsFailed(m_task_t t, TBX_HashTable_t failedProcessList); */
-/* static xbt_fifo_t MSG_buildFailedHostList(long double a, long double b); */
+/* 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.
+ */
 
 /********************************* MSG **************************************/
 
@@ -27,7 +33,6 @@ void MSG_global_init(void)
   char **argv=NULL;
 
   CRITICAL0("Please stop using this function. Use MSG_global_init_args instead.");
-  DIE_IMPOSSIBLE;
   MSG_global_init_args(&argc,argv);
 }
 
@@ -225,6 +230,17 @@ void MSG_set_verbosity(MSG_outputmode_t mode)
   CRITICAL0("MSG_set_verbosity : Not implemented yet.");
 }
 
+/** \defgroup m_channel_management    Understanding channels
+ *  \brief This section briefly describes the channel notion of MSG
+ *  (#m_channel_t).
+ *
+ *  For convenience, the simulator provides the notion of channel
+ *  that is close to the tag notion in MPI. A channel is not a
+ *  socket. It doesn't need to be opened neither closed. It rather
+ *  corresponds to the ports opened on the different machines.
+ */
+
+
 /** \ingroup m_channel_management
  * \brief Set the number of channel in the simulation.
  *
@@ -257,7 +273,7 @@ MSG_error_t MSG_set_channel_number(int number)
    currently used only for the MSG_STORE_AND_FORWARD flavor and represents the
    granularity of the communications (i.e. the packet size).
  */
-MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, long double param)
+MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, double param)
 {
   CRITICAL0("MSG_set_sharing_policy: this function is now deprecated and useless. Store and forward does not exist anymore. Please stop using it.");
   
@@ -304,11 +320,11 @@ MSG_error_t MSG_main(void)
       xbt_context_schedule(process->simdata->context);
       msg_global->current_process = NULL;
     }
-    DEBUG1("%Lg : Calling surf_solve",MSG_getClock());
+    DEBUG1("%lg : Calling surf_solve",MSG_getClock());
     elapsed_time = surf_solve();
     DEBUG1("Elapsed_time %lg",elapsed_time);
 
-/*     fprintf(stderr, "====== %Lg =====\n",Now); */
+/*     fprintf(stderr, "====== %lg =====\n",Now); */
 /*     if (elapsed_time==0.0) { */
 /*       fprintf(stderr, "No change in time\n"); */
 /*     } */
@@ -448,7 +464,7 @@ MSG_error_t MSG_main(void)
   
 /* } */
 
-/* static xbt_fifo_t MSG_buildFailedHostList(long double begin, long double end) */
+/* static xbt_fifo_t MSG_buildFailedHostList(double begin, double end) */
 /* { */
 /*   xbt_fifo_t failedHostList = xbt_fifo_new(); */
 /*   m_host_t host = NULL; */
@@ -525,7 +541,7 @@ MSG_error_t MSG_clean(void)
 /** \ingroup msg_easier_life
  * \brief A clock (in second).
  */
-long double MSG_getClock(void) {
+double MSG_getClock(void) {
   return surf_get_clock();
 }