Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
test that the node is well installed before trying to run
[simgrid.git] / include / simgrid / msg.h
index 72baeeb..6296f2b 100644 (file)
@@ -221,16 +221,10 @@ XBT_PUBLIC(void) MSG_config(const char *key, const char *value);
  *
  *  We allow to link against compiled versions that differ in the patch level.
  */
-#define MSG_init(argc,argv)  {                                          \
-    int ver_major,ver_minor,ver_patch;                                  \
-    sg_version(&ver_major,&ver_minor,&ver_patch);                       \
-    if ((ver_major != SIMGRID_VERSION_MAJOR) ||                         \
-        (ver_minor != SIMGRID_VERSION_MINOR)) {                         \
-      fprintf(stderr,"FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, and then linked against SimGrid %d.%d.%d. Please fix this.\n", \
-              SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH,ver_major,ver_minor,ver_patch); \
-    }                                                                   \
-    MSG_init_nocheck(argc,argv);                                        \
-  }
+#define MSG_init(argc,argv)  do {                                                          \
+       sg_version_check(SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);\
+    MSG_init_nocheck(argc,argv);                                                        \
+  } while (0)
 
 XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv);
 XBT_PUBLIC(msg_error_t) MSG_main(void);
@@ -321,8 +315,8 @@ XBT_PUBLIC(void)   MSG_host_set_pstate(msg_host_t h, int pstate);
 XBT_PUBLIC(int)    MSG_host_get_pstate(msg_host_t host);
 XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(void);
 XBT_PUBLIC(int) MSG_get_host_number(void);
-XBT_PUBLIC(void) MSG_host_get_params(msg_host_t ind_pm, ws_params_t params);
-XBT_PUBLIC(void) MSG_host_set_params(msg_host_t ind_pm, ws_params_t params);
+XBT_PUBLIC(void) MSG_host_get_params(msg_host_t ind_pm, vm_params_t params);
+XBT_PUBLIC(void) MSG_host_set_params(msg_host_t ind_pm, vm_params_t params);
 XBT_PUBLIC(xbt_dict_t) MSG_host_get_mounted_storage_list(msg_host_t host);
 XBT_PUBLIC(xbt_dynar_t) MSG_host_get_attached_storage_list(msg_host_t host);
 XBT_PUBLIC(xbt_dict_t) MSG_host_get_storage_content(msg_host_t host);
@@ -667,17 +661,17 @@ void MSG_vm_set_property(msg_vm_t, char* key, void* data)
 
 void MSG_vm_setMemoryUsed(msg_vm_t vm, double size);
 void MSG_vm_setCpuUsed(msg_vm_t vm, double inducedLoad);
-  // inducedLoad: un pourcentage (>100 si ca charge plus d'un coeur;
-  //                              <100 si c'est pas CPU intensive)
-  // Contraintes à poser:
+  // inducedLoad: a percentage (>100 if it loads more than one core;
+  //                            <100 if it's not CPU intensive)
+  // Required contraints:
   //   HOST_Power >= CpuUsedVm (\forall VM) + CpuUsedTask (\forall Task)
-  //   VM_coreAmount >= Load de toutes les tasks
+  //   VM_coreAmount >= Load of all tasks
 */
 
   /*
 xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_host(msg_host_t)
 xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
-+ des fonctions de filtrage sur les dynar
++ filtering functions on dynars
 */
 #include "simgrid/instr.h"