Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Msg_file refactoring
authorPierre Veyre <pierre.veyre@cc.in2p3.fr>
Thu, 6 Mar 2014 15:01:51 +0000 (16:01 +0100)
committerPierre Veyre <pierre.veyre@cc.in2p3.fr>
Thu, 6 Mar 2014 15:01:51 +0000 (16:01 +0100)
20 files changed:
examples/msg/io/file.c
examples/msg/io/file_unlink.c
include/msg/datatypes.h
include/msg/msg.h
include/simgrid/simix.h
include/surf/surf_routing.h
src/msg/msg_global.c
src/msg/msg_io.c
src/msg/msg_private.h
src/simix/simcalls.in
src/simix/simcalls_generated_args_getter_setter.h
src/simix/simcalls_generated_body.c
src/simix/simcalls_generated_case.c
src/simix/simcalls_generated_enum.h
src/simix/simcalls_generated_res_getter_setter.h
src/simix/simcalls_generated_string.c
src/simix/smx_user.c
src/surf/storage_interface.cpp
src/surf/surf_interface.cpp
src/surf/surf_routing.cpp

index 1da705b..fc62fac 100644 (file)
@@ -49,20 +49,21 @@ int host(int argc, char *argv[])
     file = MSG_file_open(mount,FILENAME4, NULL);
   else xbt_die("FILENAME NOT DEFINED %s",MSG_process_get_name(MSG_process_self()));
 
     file = MSG_file_open(mount,FILENAME4, NULL);
   else xbt_die("FILENAME NOT DEFINED %s",MSG_process_get_name(MSG_process_self()));
 
-  XBT_INFO("\tOpen file '%s'",file->fullname);
+  const char* filename = MSG_file_get_name(file);
+  XBT_INFO("\tOpen file '%s'",filename);
 
   read = MSG_file_read(file, 10000000);     // Read for 10MB
 
   read = MSG_file_read(file, 10000000);     // Read for 10MB
-  XBT_INFO("\tHave read    %llu on %s",read,file->fullname);
+  XBT_INFO("\tHave read    %llu on %s",read,filename);
 
   write = MSG_file_write(file, 100000);  // Write for 100KB
 
   write = MSG_file_write(file, 100000);  // Write for 100KB
-  XBT_INFO("\tHave written %llu on %s",write,file->fullname);
+  XBT_INFO("\tHave written %llu on %s",write,filename);
 
   read = MSG_file_read(file, 110000);     // Read for 110KB
 
   read = MSG_file_read(file, 110000);     // Read for 110KB
-  XBT_INFO("\tHave read    %llu on %s (of size %llu)",read,file->fullname,
+  XBT_INFO("\tHave read    %llu on %s (of size %llu)",read,filename,
       MSG_file_get_size(file));
 
       MSG_file_get_size(file));
 
-  XBT_INFO("\tClose file '%s'",file->fullname);
   MSG_file_close(file);
   MSG_file_close(file);
+  XBT_INFO("\tClose file '%s'",filename);
 
   free(mount);
   return 0;
 
   free(mount);
   return 0;
index 49f0523..599caef 100644 (file)
@@ -38,7 +38,7 @@ int host(int argc, char *argv[])
   file = MSG_file_open(mount,FILENAME1, NULL);
 
   // Unlink the file
   file = MSG_file_open(mount,FILENAME1, NULL);
 
   // Unlink the file
-  XBT_INFO("\tUnlink file '%s'",file->fullname);
+  XBT_INFO("\tUnlink file '%s'",MSG_file_get_name(file));
   MSG_file_unlink(file);
 
   // Re Open the file wich is in fact created
   MSG_file_unlink(file);
 
   // Re Open the file wich is in fact created
@@ -47,10 +47,10 @@ int host(int argc, char *argv[])
 
   // Write into the new file
   write = MSG_file_write(file,100000);  // Write for 100Ko
 
   // Write into the new file
   write = MSG_file_write(file,100000);  // Write for 100Ko
-  XBT_INFO("\tHave written %llu on %s",write,file->fullname);
+  XBT_INFO("\tHave written %llu on %s",write,MSG_file_get_name(file));
 
   // Close the file
 
   // Close the file
-  XBT_INFO("\tClose file '%s'",file->fullname);
+  XBT_INFO("\tClose file '%s'",MSG_file_get_name(file));
   MSG_file_close(file);
 
   xbt_dict_t dict_ls;
   MSG_file_close(file);
 
   xbt_dict_t dict_ls;
index ed95a57..e69f229 100644 (file)
@@ -97,29 +97,49 @@ static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){
 }
 
 /* ******************************** File ************************************ */
 }
 
 /* ******************************** File ************************************ */
+//typedef struct simdata_file *simdata_file_t;
+//
+//typedef struct s_msg_file_info {
+//  sg_size_t size;
+//  char* mount_point;
+//  char* storageId;
+//  char* storage_type;
+//  char* content_type;
+//} s_msg_file_info_t, *msg_file_info_t;
+//
+//typedef struct msg_file {
+//  char *fullname;               /**< @brief file full name (path+name)*/
+//  simdata_file_t simdata;       /**< @brief simulator data  */
+//  msg_file_info_t info;
+//} s_msg_file_t;
+//
+///** @brief File datatype.
+// *  @ingroup msg_file_management
+// *
+// *  You should consider this as an opaque object.
+// */
+//
+//typedef struct msg_file *msg_file_t;
+extern int MSG_FILE_LEVEL;
 typedef struct simdata_file *simdata_file_t;
 
 typedef struct simdata_file *simdata_file_t;
 
-typedef struct s_msg_file_info {
+typedef xbt_dictelm_t msg_file_t;
+typedef s_xbt_dictelm_t s_msg_file_t;
+
+typedef struct msg_file_priv  {
+  const char *fullname;
   sg_size_t size;
   char* mount_point;
   char* storageId;
   char* storage_type;
   char* content_type;
   sg_size_t size;
   char* mount_point;
   char* storageId;
   char* storage_type;
   char* content_type;
-} s_msg_file_info_t, *msg_file_info_t;
-
-typedef struct msg_file {
-  char *fullname;               /**< @brief file full name (path+name)*/
-  simdata_file_t simdata;       /**< @brief simulator data  */
-  msg_file_info_t info;
-} s_msg_file_t;
+  void *data;
+  simdata_file_t simdata;
+} s_msg_file_priv_t, *msg_file_priv_t;
 
 
-/** @brief File datatype.
- *  @ingroup msg_file_management
- *
- *  You should consider this as an opaque object.
- */
-
-typedef struct msg_file *msg_file_t;
+static inline msg_file_priv_t MSG_file_priv(msg_file_t file){
+  return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL);
+}
 
 /* ******************************** Storage ************************************ */
 /* TODO: PV: to comment */
 
 /* ******************************** Storage ************************************ */
 /* TODO: PV: to comment */
@@ -139,6 +159,10 @@ typedef struct msg_storage_priv  {
   void * dummy;
 } s_msg_storage_priv_t, *msg_storage_priv_t;
 
   void * dummy;
 } s_msg_storage_priv_t, *msg_storage_priv_t;
 
+static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
+  return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
+}
+
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task *simdata_gpu_task_t;
 
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task *simdata_gpu_task_t;
 
index 9f983ca..df90084 100644 (file)
@@ -95,6 +95,8 @@ XBT_PUBLIC(xbt_dict_t) MSG_file_ls(const char *mount, const char *path);
 XBT_PUBLIC(msg_error_t) MSG_file_seek(msg_file_t fd, sg_size_t offset, int origin);
 XBT_PUBLIC(sg_size_t) MSG_file_tell (msg_file_t fd);
 XBT_PUBLIC(void) __MSG_file_get_info(msg_file_t fd);
 XBT_PUBLIC(msg_error_t) MSG_file_seek(msg_file_t fd, sg_size_t offset, int origin);
 XBT_PUBLIC(sg_size_t) MSG_file_tell (msg_file_t fd);
 XBT_PUBLIC(void) __MSG_file_get_info(msg_file_t fd);
+XBT_PUBLIC(void) __MSG_file_priv_free(msg_file_priv_t priv);
+XBT_PUBLIC(const char *) MSG_file_get_name(msg_file_t storage);
 /************************** Storage handling ***********************************/
 XBT_PUBLIC(msg_host_t) MSG_get_storage_by_name(const char *name);
 XBT_PUBLIC(const char *) MSG_storage_get_name(msg_storage_t storage);
 /************************** Storage handling ***********************************/
 XBT_PUBLIC(msg_host_t) MSG_get_storage_by_name(const char *name);
 XBT_PUBLIC(const char *) MSG_storage_get_name(msg_storage_t storage);
index 91a6269..cb6ff49 100644 (file)
@@ -69,7 +69,6 @@ typedef struct s_smx_cond *smx_cond_t;
 typedef struct s_smx_sem *smx_sem_t;
 
 /********************************** File *************************************/
 typedef struct s_smx_sem *smx_sem_t;
 
 /********************************** File *************************************/
-
 typedef struct s_smx_file *smx_file_t;
 
 /********************************** Storage *************************************/
 typedef struct s_smx_file *smx_file_t;
 
 /********************************** Storage *************************************/
@@ -79,8 +78,6 @@ typedef struct s_smx_storage_priv *smx_storage_priv_t;
 /********************************** Action *************************************/
 typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized action handlers */
 
 /********************************** Action *************************************/
 typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized action handlers */
 
-
-
 /* ****************************** Process *********************************** */
 /** @brief Process datatype
     @ingroup simix_process_management
 /* ****************************** Process *********************************** */
 /** @brief Process datatype
     @ingroup simix_process_management
@@ -286,10 +283,6 @@ XBT_PUBLIC(int) SIMIX_comm_has_send_match(smx_rdv_t rdv, int (*match_fun)(void*,
 XBT_PUBLIC(int) SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
 XBT_PUBLIC(void) SIMIX_comm_finish(smx_action_t action);
 
 XBT_PUBLIC(int) SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
 XBT_PUBLIC(void) SIMIX_comm_finish(smx_action_t action);
 
-/*********************************** File *************************************/
-XBT_PUBLIC(void*) SIMIX_file_get_data(smx_file_t fd);
-XBT_PUBLIC(void) SIMIX_file_set_data(smx_file_t fd, void *data);
-
 /******************************************************************************/
 /*                            SIMIX simcalls                                  */
 /******************************************************************************/
 /******************************************************************************/
 /*                            SIMIX simcalls                                  */
 /******************************************************************************/
@@ -509,7 +502,7 @@ XBT_PUBLIC(void*) SIMIX_storage_get_data(smx_storage_t storage);
 XBT_PUBLIC(void) SIMIX_storage_set_data(smx_storage_t storage, void *data);
 XBT_PUBLIC(xbt_dict_t) SIMIX_storage_get_content(smx_storage_t storage);
 XBT_PUBLIC(xbt_dict_t) simcall_storage_get_content(smx_storage_t storage);
 XBT_PUBLIC(void) SIMIX_storage_set_data(smx_storage_t storage, void *data);
 XBT_PUBLIC(xbt_dict_t) SIMIX_storage_get_content(smx_storage_t storage);
 XBT_PUBLIC(xbt_dict_t) simcall_storage_get_content(smx_storage_t storage);
-XBT_PUBLIC(const char*) SIMIX_storage_get_name(smx_host_t host);
+XBT_PUBLIC(const char*) SIMIX_storage_get_name(smx_storage_t storage);
 XBT_PUBLIC(sg_size_t) SIMIX_storage_get_size(smx_storage_t storage);
 XBT_PUBLIC(void) simcall_storage_file_rename(smx_storage_t storage, const char* src,  const char* dest);
 /************************** AS router   **********************************/
 XBT_PUBLIC(sg_size_t) SIMIX_storage_get_size(smx_storage_t storage);
 XBT_PUBLIC(void) simcall_storage_file_rename(smx_storage_t storage, const char* src,  const char* dest);
 /************************** AS router   **********************************/
index 5c0e90c..a7a5a50 100644 (file)
@@ -39,7 +39,7 @@ XBT_PUBLIC(xbt_lib_t) storage_lib;
 XBT_PUBLIC(int) ROUTING_STORAGE_LEVEL;        //Routing storage level
 XBT_PUBLIC(int) ROUTING_STORAGE_HOST_LEVEL;
 XBT_PUBLIC(int) SURF_STORAGE_LEVEL;  // Surf storage level
 XBT_PUBLIC(int) ROUTING_STORAGE_LEVEL;        //Routing storage level
 XBT_PUBLIC(int) ROUTING_STORAGE_HOST_LEVEL;
 XBT_PUBLIC(int) SURF_STORAGE_LEVEL;  // Surf storage level
-
+XBT_PUBLIC(xbt_lib_t) file_lib;
 XBT_PUBLIC(xbt_lib_t) storage_type_lib;
 XBT_PUBLIC(int) ROUTING_STORAGE_TYPE_LEVEL;   //Routing storage_type level
 
 XBT_PUBLIC(xbt_lib_t) storage_type_lib;
 XBT_PUBLIC(int) ROUTING_STORAGE_TYPE_LEVEL;   //Routing storage_type level
 
index eee4578..52d88d8 100644 (file)
@@ -71,7 +71,7 @@ void MSG_init_nocheck(int *argc, char **argv) {
   XBT_DEBUG("ADD MSG LEVELS");
   MSG_HOST_LEVEL = xbt_lib_add_level(host_lib, (void_f_pvoid_t) __MSG_host_priv_free);
   MSG_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, (void_f_pvoid_t) __MSG_storage_destroy);
   XBT_DEBUG("ADD MSG LEVELS");
   MSG_HOST_LEVEL = xbt_lib_add_level(host_lib, (void_f_pvoid_t) __MSG_host_priv_free);
   MSG_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, (void_f_pvoid_t) __MSG_storage_destroy);
-
+  MSG_FILE_LEVEL = xbt_lib_add_level(file_lib, (void_f_pvoid_t) __MSG_file_destroy);
   if(sg_cfg_get_boolean("clean_atexit")) atexit(MSG_exit);
 }
 
   if(sg_cfg_get_boolean("clean_atexit")) atexit(MSG_exit);
 }
 
index 0037056..36361fc 100644 (file)
@@ -19,15 +19,17 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_io, msg,
 
 /********************************* File **************************************/
 void __MSG_file_get_info(msg_file_t fd){
 
 /********************************* File **************************************/
 void __MSG_file_get_info(msg_file_t fd){
-  xbt_dynar_t info = simcall_file_get_info(fd->simdata->smx_file);
+
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  xbt_dynar_t info = simcall_file_get_info(priv->simdata->smx_file);
   sg_size_t *psize;
 
   sg_size_t *psize;
 
-  fd->info->content_type = xbt_dynar_pop_as(info, char *);
-  fd->info->storage_type = xbt_dynar_pop_as(info, char *);
-  fd->info->storageId = xbt_dynar_pop_as(info, char *);
-  fd->info->mount_point = xbt_dynar_pop_as(info, char *);
+  priv->content_type = xbt_dynar_pop_as(info, char *);
+  priv->storage_type = xbt_dynar_pop_as(info, char *);
+  priv->storageId = xbt_dynar_pop_as(info, char *);
+  priv->mount_point = xbt_dynar_pop_as(info, char *);
   psize = xbt_dynar_pop_as(info, sg_size_t*);
   psize = xbt_dynar_pop_as(info, sg_size_t*);
-  fd->info->size = *psize;
+  priv->size = *psize;
   xbt_free(psize);
   xbt_dynar_free_container(&info);
 }
   xbt_free(psize);
   xbt_dynar_free_container(&info);
 }
@@ -41,8 +43,8 @@ void __MSG_file_get_info(msg_file_t fd){
  */
 msg_error_t MSG_file_set_data(msg_file_t fd, void *data)
 {
  */
 msg_error_t MSG_file_set_data(msg_file_t fd, void *data)
 {
-  SIMIX_file_set_data(fd->simdata->smx_file,data);
-
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  priv->data = data;
   return MSG_OK;
 }
 
   return MSG_OK;
 }
 
@@ -55,7 +57,8 @@ msg_error_t MSG_file_set_data(msg_file_t fd, void *data)
  */
 void *MSG_file_get_data(msg_file_t fd)
 {
  */
 void *MSG_file_get_data(msg_file_t fd)
 {
-  return SIMIX_file_get_data(fd->simdata->smx_file);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return priv->data;
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -65,9 +68,10 @@ void *MSG_file_get_data(msg_file_t fd)
  */
 
 void MSG_file_dump (msg_file_t fd){
  */
 
 void MSG_file_dump (msg_file_t fd){
-//   THROW_UNIMPLEMENTED;
   /* Update the cached information first */
   __MSG_file_get_info(fd);
   /* Update the cached information first */
   __MSG_file_get_info(fd);
+
+  msg_file_priv_t priv = MSG_file_priv(fd);
   XBT_INFO("File Descriptor information:\n"
            "\t\tFull name: '%s'\n"
            "\t\tSize: %llu\n"
   XBT_INFO("File Descriptor information:\n"
            "\t\tFull name: '%s'\n"
            "\t\tSize: %llu\n"
@@ -75,9 +79,9 @@ void MSG_file_dump (msg_file_t fd){
            "\t\tStorage Id: '%s'\n"
            "\t\tStorage Type: '%s'\n"
            "\t\tContent Type: '%s'",
            "\t\tStorage Id: '%s'\n"
            "\t\tStorage Type: '%s'\n"
            "\t\tContent Type: '%s'",
-           fd->fullname, fd->info->size, fd->info->mount_point,
-           fd->info->storageId, fd->info->storage_type,
-           fd->info->content_type);
+           priv->fullname, priv->size, priv->mount_point,
+           priv->storageId, priv->storage_type,
+           priv->content_type);
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -89,7 +93,8 @@ void MSG_file_dump (msg_file_t fd){
  */
 sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 {
  */
 sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 {
-  return simcall_file_read(fd->simdata->smx_file, size);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return simcall_file_read(priv->simdata->smx_file, size);
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -101,7 +106,8 @@ sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
  */
 sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 {
  */
 sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 {
-  return simcall_file_write(fd->simdata->smx_file, size);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return simcall_file_write(priv->simdata->smx_file, size);
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -113,15 +119,24 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
  *
  * \return An #msg_file_t associated to the file
  */
  *
  * \return An #msg_file_t associated to the file
  */
-msg_file_t MSG_file_open(const char* mount, const char* fullname, void* data)
+msg_file_t MSG_file_open(const char* mount,const char* fullname, void* data)
 {
 {
-  msg_file_t file = xbt_new(s_msg_file_t,1);
-  file->fullname = xbt_strdup(fullname);
-  file->simdata = xbt_new0(s_simdata_file_t,1);
-  file->info = xbt_new0(s_msg_file_info_t,1);
-  file->simdata->smx_file = simcall_file_open(mount, fullname);
-  SIMIX_file_set_data(file->simdata->smx_file, data);
-  return file;
+  msg_file_priv_t priv = xbt_new(s_msg_file_priv_t, 1);
+  priv->data = data;
+  priv->fullname = xbt_strdup(fullname);
+  priv->simdata = xbt_new0(s_simdata_file_t,1);
+  priv->simdata->smx_file = simcall_file_open(mount, fullname);
+  xbt_lib_set(file_lib, fullname, MSG_FILE_LEVEL, priv);
+  return (msg_file_t) xbt_lib_get_elm_or_null(file_lib, fullname);
+}
+
+/**
+ * \brief Frees private data of a file (internal call only)
+ */
+void __MSG_file_priv_free(msg_file_priv_t priv)
+{
+  xbt_free(&priv->simdata->smx_file);
+  free(priv);
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -132,11 +147,9 @@ msg_file_t MSG_file_open(const char* mount, const char* fullname, void* data)
  */
 int MSG_file_close(msg_file_t fd)
 {
  */
 int MSG_file_close(msg_file_t fd)
 {
-  int res = simcall_file_close(fd->simdata->smx_file);
-  free(fd->fullname);
-  xbt_free(fd->simdata);
-  xbt_free(fd->info);
-  xbt_free(fd);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  int res = simcall_file_close(priv->simdata->smx_file);
+  xbt_lib_unset(file_lib, priv->fullname, MSG_FILE_LEVEL, 1);
   return res;
 }
 
   return res;
 }
 
@@ -148,11 +161,8 @@ int MSG_file_close(msg_file_t fd)
  */
 int MSG_file_unlink(msg_file_t fd)
 {
  */
 int MSG_file_unlink(msg_file_t fd)
 {
-  int res = simcall_file_unlink(fd->simdata->smx_file);
-  free(fd->fullname);
-  xbt_free(fd->simdata);
-  xbt_free(fd->info);
-  xbt_free(fd);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  int res = simcall_file_unlink(priv->simdata->smx_file);
   return res;
 }
 
   return res;
 }
 
@@ -163,7 +173,8 @@ int MSG_file_unlink(msg_file_t fd)
  * \return the size of the file (as a #sg_size_t)
  */
 sg_size_t MSG_file_get_size(msg_file_t fd){
  * \return the size of the file (as a #sg_size_t)
  */
 sg_size_t MSG_file_get_size(msg_file_t fd){
-  return simcall_file_get_size(fd->simdata->smx_file);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return simcall_file_get_size(priv->simdata->smx_file);
 }
 
 /** \ingroup msg_file_management
 }
 
 /** \ingroup msg_file_management
@@ -190,7 +201,7 @@ xbt_dict_t MSG_file_ls(const char *mount, const char *path)
   return simcall_file_ls(mount, path);
 }
 
   return simcall_file_ls(mount, path);
 }
 
-/*
+/**
  * \ingroup msg_file_management
  * \brief Set the file position indicator in the msg_file_t by adding offset bytes
  * to the position specified by origin (either SEEK_SET, SEEK_CUR, or SEEK_END).
  * \ingroup msg_file_management
  * \brief Set the file position indicator in the msg_file_t by adding offset bytes
  * to the position specified by origin (either SEEK_SET, SEEK_CUR, or SEEK_END).
@@ -208,11 +219,11 @@ xbt_dict_t MSG_file_ls(const char *mount, const char *path)
  */
 msg_error_t MSG_file_seek(msg_file_t fd, sg_size_t offset, int origin)
 {
  */
 msg_error_t MSG_file_seek(msg_file_t fd, sg_size_t offset, int origin)
 {
-  //THROW_UNIMPLEMENTED;
-  return simcall_file_seek(fd->simdata->smx_file, offset, origin);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return simcall_file_seek(priv->simdata->smx_file, offset, origin);
 }
 
 }
 
-/*
+/**
  * \ingroup msg_file_management
  * \brief Returns the current value of the position indicator of the file
  *
  * \ingroup msg_file_management
  * \brief Returns the current value of the position indicator of the file
  *
@@ -222,10 +233,23 @@ msg_error_t MSG_file_seek(msg_file_t fd, sg_size_t offset, int origin)
  */
 sg_size_t MSG_file_tell(msg_file_t fd)
 {
  */
 sg_size_t MSG_file_tell(msg_file_t fd)
 {
-  return simcall_file_tell(fd->simdata->smx_file);
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return simcall_file_tell(priv->simdata->smx_file);
+}
+
+const char *MSG_file_get_name(msg_file_t fd) {
+  xbt_assert((fd != NULL), "Invalid parameters");
+  msg_file_priv_t priv = MSG_file_priv(fd);
+  return priv->fullname;
 }
 
 
 }
 
 
+/*
+ * \brief Destroys a file (internal call only)
+ */
+void __MSG_file_destroy(msg_file_priv_t file) {
+  xbt_free(file);
+}
 /********************************* Storage **************************************/
 
 /** @addtogroup msg_storage_management
 /********************************* Storage **************************************/
 
 /** @addtogroup msg_storage_management
@@ -246,10 +270,10 @@ msg_storage_t __MSG_storage_create(smx_storage_t storage)
  * \brief Destroys a storage (internal call only)
  */
 void __MSG_storage_destroy(msg_storage_priv_t storage) {
  * \brief Destroys a storage (internal call only)
  */
 void __MSG_storage_destroy(msg_storage_priv_t storage) {
-
   free(storage);
 }
 
   free(storage);
 }
 
+
 /** \ingroup msg_storage_management
  *
  * \brief Returns the name of the #msg_storage_t.
 /** \ingroup msg_storage_management
  *
  * \brief Returns the name of the #msg_storage_t.
@@ -374,7 +398,7 @@ sg_size_t MSG_storage_get_size(msg_storage_t storage)
   return SIMIX_storage_get_size(storage);
 }
 
   return SIMIX_storage_get_size(storage);
 }
 
-/*
+/**
  * \ingroup msg_storage_management
  *
  * \brief Rename the file in the contents of its associated storage.
  * \ingroup msg_storage_management
  *
  * \brief Rename the file in the contents of its associated storage.
@@ -385,7 +409,7 @@ msg_error_t MSG_storage_file_rename(msg_storage_t storage, const char* src,  con
   return MSG_OK;
 }
 
   return MSG_OK;
 }
 
-/*
+/**
  * \ingroup msg_storage_management
  * \brief Move a file to another location. Depending on the values of dest, dest, mount,
  * and fullname, this move can be local or remote and, within a host, on the same
  * \ingroup msg_storage_management
  * \brief Move a file to another location. Depending on the values of dest, dest, mount,
  * and fullname, this move can be local or remote and, within a host, on the same
index d4cc33b..1d2eb8f 100644 (file)
@@ -50,11 +50,6 @@ typedef struct simdata_file {
   smx_file_t smx_file;
 } s_simdata_file_t;
 
   smx_file_t smx_file;
 } s_simdata_file_t;
 
-/********************************* Storage **************************************/
-typedef struct simdata_storage {
-  smx_storage_t smx_storage;
-} s_simdata_storage_t;
-
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task {
   double computation_amount;    /* Computation size */
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task {
   double computation_amount;    /* Computation size */
@@ -146,6 +141,7 @@ msg_host_t __MSG_host_create(smx_host_t workstation);
 msg_storage_t __MSG_storage_create(smx_storage_t storage);
 void __MSG_host_destroy(msg_host_t host);
 void __MSG_storage_destroy(msg_storage_priv_t host);
 msg_storage_t __MSG_storage_create(smx_storage_t storage);
 void __MSG_host_destroy(msg_host_t host);
 void __MSG_storage_destroy(msg_storage_priv_t host);
+void __MSG_file_destroy(msg_file_priv_t host);
 
 void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc);
 void MSG_process_create_from_SIMIX(smx_process_t *process, const char *name,
 
 void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc);
 void MSG_process_create_from_SIMIX(smx_process_t *process, const char *name,
index fcf133e..c270d9f 100644 (file)
@@ -68,7 +68,7 @@ process_auto_restart_set True (void) (process, void*, smx_process_t) (auto_resta
 process_restart True (void*, smx_process_t) (process, void*, smx_process_t)
 rdv_create True (void*, smx_rdv_t) (name, const char*)
 rdv_destroy True (void) (rdv, void*, smx_rdv_t)
 process_restart True (void*, smx_process_t) (process, void*, smx_process_t)
 rdv_create True (void*, smx_rdv_t) (name, const char*)
 rdv_destroy True (void) (rdv, void*, smx_rdv_t)
-rdv_get_by_name True (void*, smx_host_t) (name, const char*)
+#rdv_get_by_name True (void*, smx_host_t) (name, const char*)
 rdv_comm_count_by_host True (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, smx_host_t)
 rdv_get_head True (void*, smx_action_t) (rdv, void*, smx_rdv_t)
 rdv_set_receiver True (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t)
 rdv_comm_count_by_host True (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, smx_host_t)
 rdv_get_head True (void*, smx_action_t) (rdv, void*, smx_rdv_t)
 rdv_set_receiver True (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t)
@@ -107,8 +107,6 @@ sem_would_block True (int) (sem, void*, smx_sem_t)
 sem_acquire False (void) (sem, void*, smx_sem_t)
 sem_acquire_timeout False (void) (sem, void*, smx_sem_t) (timeout, double)
 sem_get_capacity True (int) (sem, void*, smx_sem_t)
 sem_acquire False (void) (sem, void*, smx_sem_t)
 sem_acquire_timeout False (void) (sem, void*, smx_sem_t) (timeout, double)
 sem_get_capacity True (int) (sem, void*, smx_sem_t)
-file_get_data True (void*) (fd, void*, smx_file_t)
-file_set_data True (void) (fd, void*, smx_file_t) (data, void*)
 file_read False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t)
 file_write False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t)
 file_open False (void*, smx_file_t) (mount, const char*) (path, const char*)
 file_read False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t)
 file_write False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t)
 file_open False (void*, smx_file_t) (mount, const char*) (path, const char*)
index af7235f..8daa23e 100644 (file)
@@ -606,12 +606,6 @@ static inline smx_rdv_t simcall_rdv_destroy__get__rdv(smx_simcall_t simcall){
 static inline void simcall_rdv_destroy__set__rdv(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
 static inline void simcall_rdv_destroy__set__rdv(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_rdv_get_by_name__get__name(smx_simcall_t simcall){
-  return  simcall->args[0].cc;
-}
-static inline void simcall_rdv_get_by_name__set__name(smx_simcall_t simcall, const char* arg){
-    simcall->args[0].cc = arg;
-}
 static inline smx_rdv_t simcall_rdv_comm_count_by_host__get__rdv(smx_simcall_t simcall){
   return (smx_rdv_t) simcall->args[0].dp;
 }
 static inline smx_rdv_t simcall_rdv_comm_count_by_host__get__rdv(smx_simcall_t simcall){
   return (smx_rdv_t) simcall->args[0].dp;
 }
@@ -1052,24 +1046,6 @@ static inline smx_sem_t simcall_sem_get_capacity__get__sem(smx_simcall_t simcall
 static inline void simcall_sem_get_capacity__set__sem(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
 static inline void simcall_sem_get_capacity__set__sem(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
-static inline smx_file_t simcall_file_get_data__get__fd(smx_simcall_t simcall){
-  return (smx_file_t) simcall->args[0].dp;
-}
-static inline void simcall_file_get_data__set__fd(smx_simcall_t simcall, void* arg){
-    simcall->args[0].dp = arg;
-}
-static inline smx_file_t simcall_file_set_data__get__fd(smx_simcall_t simcall){
-  return (smx_file_t) simcall->args[0].dp;
-}
-static inline void simcall_file_set_data__set__fd(smx_simcall_t simcall, void* arg){
-    simcall->args[0].dp = arg;
-}
-static inline void* simcall_file_set_data__get__data(smx_simcall_t simcall){
-  return  simcall->args[1].dp;
-}
-static inline void simcall_file_set_data__set__data(smx_simcall_t simcall, void* arg){
-    simcall->args[1].dp = arg;
-}
 static inline smx_file_t simcall_file_read__get__fd(smx_simcall_t simcall){
   return (smx_file_t) simcall->args[0].dp;
 }
 static inline smx_file_t simcall_file_read__get__fd(smx_simcall_t simcall){
   return (smx_file_t) simcall->args[0].dp;
 }
index b81e906..e1867e2 100644 (file)
     }    
     
   }
     }    
     
   }
-  inline static smx_host_t simcall_BODY_rdv_get_by_name(const char* name) {
-    smx_process_t self = SIMIX_process_self();
-    self->simcall.call = SIMCALL_RDV_GET_BY_NAME;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].cc = (const char*) name;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_pre(&self->simcall, 0);
-    }    
-    return self->simcall.result.dp;
-  }
   inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
   inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
     }    
     return self->simcall.result.i;
   }
     }    
     return self->simcall.result.i;
   }
-  inline static void* simcall_BODY_file_get_data(smx_file_t fd) {
-    smx_process_t self = SIMIX_process_self();
-    self->simcall.call = SIMCALL_FILE_GET_DATA;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) fd;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_pre(&self->simcall, 0);
-    }    
-    return self->simcall.result.dp;
-  }
-  inline static void simcall_BODY_file_set_data(smx_file_t fd, void* data) {
-    smx_process_t self = SIMIX_process_self();
-    self->simcall.call = SIMCALL_FILE_SET_DATA;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) fd;
-    self->simcall.args[1].dp = (void*) data;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_pre(&self->simcall, 0);
-    }    
-    
-  }
   inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size) {
     smx_process_t self = SIMIX_process_self();
     self->simcall.call = SIMCALL_FILE_READ;
   inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size) {
     smx_process_t self = SIMIX_process_self();
     self->simcall.call = SIMCALL_FILE_READ;
index 1fc92a5..970b648 100644 (file)
@@ -317,11 +317,6 @@ case SIMCALL_RDV_DESTROY:
       SIMIX_simcall_answer(simcall);
       break;  
 
       SIMIX_simcall_answer(simcall);
       break;  
 
-case SIMCALL_RDV_GET_BY_NAME:
-      simcall->result.dp = SIMIX_pre_rdv_get_by_name(simcall ,  simcall->args[0].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
 case SIMCALL_RDV_COMM_COUNT_BY_HOST:
       simcall->result.ui = SIMIX_pre_rdv_comm_count_by_host(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
       SIMIX_simcall_answer(simcall);
 case SIMCALL_RDV_COMM_COUNT_BY_HOST:
       simcall->result.ui = SIMIX_pre_rdv_comm_count_by_host(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
       SIMIX_simcall_answer(simcall);
@@ -501,16 +496,6 @@ case SIMCALL_SEM_GET_CAPACITY:
       SIMIX_simcall_answer(simcall);
       break;  
 
       SIMIX_simcall_answer(simcall);
       break;  
 
-case SIMCALL_FILE_GET_DATA:
-      simcall->result.dp = SIMIX_pre_file_get_data(simcall , (smx_file_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_SET_DATA:
-       SIMIX_pre_file_set_data(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
 case SIMCALL_FILE_READ:
        SIMIX_pre_file_read(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz);
        break;  
 case SIMCALL_FILE_READ:
        SIMIX_pre_file_read(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz);
        break;  
index 50460e2..ad73877 100644 (file)
@@ -68,7 +68,6 @@ SIMCALL_PROCESS_AUTO_RESTART_SET,
 SIMCALL_PROCESS_RESTART,
 SIMCALL_RDV_CREATE,
 SIMCALL_RDV_DESTROY,
 SIMCALL_PROCESS_RESTART,
 SIMCALL_RDV_CREATE,
 SIMCALL_RDV_DESTROY,
-SIMCALL_RDV_GET_BY_NAME,
 SIMCALL_RDV_COMM_COUNT_BY_HOST,
 SIMCALL_RDV_GET_HEAD,
 SIMCALL_RDV_SET_RECEIVER,
 SIMCALL_RDV_COMM_COUNT_BY_HOST,
 SIMCALL_RDV_GET_HEAD,
 SIMCALL_RDV_SET_RECEIVER,
@@ -107,8 +106,6 @@ SIMCALL_SEM_WOULD_BLOCK,
 SIMCALL_SEM_ACQUIRE,
 SIMCALL_SEM_ACQUIRE_TIMEOUT,
 SIMCALL_SEM_GET_CAPACITY,
 SIMCALL_SEM_ACQUIRE,
 SIMCALL_SEM_ACQUIRE_TIMEOUT,
 SIMCALL_SEM_GET_CAPACITY,
-SIMCALL_FILE_GET_DATA,
-SIMCALL_FILE_SET_DATA,
 SIMCALL_FILE_READ,
 SIMCALL_FILE_WRITE,
 SIMCALL_FILE_OPEN,
 SIMCALL_FILE_READ,
 SIMCALL_FILE_WRITE,
 SIMCALL_FILE_OPEN,
index 2e051f6..907e074 100644 (file)
@@ -259,12 +259,6 @@ static inline void simcall_rdv_create__set__result(smx_simcall_t simcall, void*
 }
 
 
 }
 
 
-static inline smx_host_t simcall_rdv_get_by_name__get__result(smx_simcall_t simcall){
-  return (smx_host_t) simcall->result.dp;
-}
-static inline void simcall_rdv_get_by_name__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
 static inline unsigned int simcall_rdv_comm_count_by_host__get__result(smx_simcall_t simcall){
   return  simcall->result.ui;
 }
 static inline unsigned int simcall_rdv_comm_count_by_host__get__result(smx_simcall_t simcall){
   return  simcall->result.ui;
 }
@@ -425,14 +419,6 @@ static inline int simcall_sem_get_capacity__get__result(smx_simcall_t simcall){
 static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, int result){
     simcall->result.i = result;
 }
 static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, int result){
     simcall->result.i = result;
 }
-static inline void* simcall_file_get_data__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_file_get_data__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
 static inline sg_size_t simcall_file_read__get__result(smx_simcall_t simcall){
   return  simcall->result.sgsz;
 }
 static inline sg_size_t simcall_file_read__get__result(smx_simcall_t simcall){
   return  simcall->result.sgsz;
 }
index 6bbf280..172281d 100644 (file)
@@ -68,7 +68,6 @@
 [SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
 [SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
 [SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
 [SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
 [SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
 [SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
-[SIMCALL_RDV_GET_BY_NAME] = "SIMCALL_RDV_GET_BY_NAME",
 [SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
 [SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
 [SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
 [SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
 [SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
 [SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
 [SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
 [SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
 [SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
 [SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
 [SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
 [SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
-[SIMCALL_FILE_GET_DATA] = "SIMCALL_FILE_GET_DATA",
-[SIMCALL_FILE_SET_DATA] = "SIMCALL_FILE_SET_DATA",
 [SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
 [SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
 [SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
 [SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
 [SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
 [SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
index 9b6720e..dadb47e 100644 (file)
@@ -1314,30 +1314,6 @@ int simcall_sem_get_capacity(smx_sem_t sem)
   return simcall_BODY_sem_get_capacity(sem);
 }
 
   return simcall_BODY_sem_get_capacity(sem);
 }
 
-/**
- * \ingroup simix_file_management
- * \brief Returns the user data associated to a file.
- *
- * \param fd A simix file
- * \return the user data of this file
- */
-void* simcall_file_get_data(smx_file_t fd)
-{
-  return simcall_BODY_file_get_data(fd);
-}
-
-/**
- * \ingroup simix_file_management
- * \brief Sets the user data associated to a file.
- *
- * \param fd A SIMIX file
- * \param data The user data to set
- */
-void simcall_file_set_data(smx_file_t fd, void *data)
-{
-  simcall_BODY_file_set_data(fd, data);
-}
-
 /**
  * \ingroup simix_file_management
  *
 /**
  * \ingroup simix_file_management
  *
index 4ddc3c9..c19e45c 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf,
                                 "Logging specific to the SURF storage module");
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf,
                                 "Logging specific to the SURF storage module");
 
+xbt_lib_t file_lib;
 xbt_lib_t storage_lib;
 int ROUTING_STORAGE_LEVEL;      //Routing for storagelevel
 int ROUTING_STORAGE_HOST_LEVEL;
 int SURF_STORAGE_LEVEL;
 xbt_lib_t storage_type_lib;
 int ROUTING_STORAGE_TYPE_LEVEL; //Routing for storage_type level
 xbt_lib_t storage_lib;
 int ROUTING_STORAGE_LEVEL;      //Routing for storagelevel
 int ROUTING_STORAGE_HOST_LEVEL;
 int SURF_STORAGE_LEVEL;
 xbt_lib_t storage_type_lib;
 int ROUTING_STORAGE_TYPE_LEVEL; //Routing for storage_type level
-
 xbt_dynar_t mount_list = NULL;
 StorageModelPtr surf_storage_model = NULL;
 
 xbt_dynar_t mount_list = NULL;
 StorageModelPtr surf_storage_model = NULL;
 
index 4b1889a..0f393e8 100644 (file)
@@ -385,6 +385,7 @@ void surf_init(int *argc, char **argv)
   as_router_lib = xbt_lib_new();
   storage_lib = xbt_lib_new();
   storage_type_lib = xbt_lib_new();
   as_router_lib = xbt_lib_new();
   storage_lib = xbt_lib_new();
   storage_type_lib = xbt_lib_new();
+  file_lib = xbt_lib_new();
   watched_hosts_lib = xbt_dict_new_homogeneous(NULL);
 
   XBT_DEBUG("Add routing levels");
   watched_hosts_lib = xbt_dict_new_homogeneous(NULL);
 
   XBT_DEBUG("Add routing levels");
index 3828ad2..455f3e8 100644 (file)
@@ -28,6 +28,7 @@ int SIMIX_HOST_LEVEL;           //Simix host level
 int SIMIX_STORAGE_LEVEL;        //Simix storage level
 int MSG_HOST_LEVEL;             //Msg host level
 int MSG_STORAGE_LEVEL;          //Msg storage level
 int SIMIX_STORAGE_LEVEL;        //Simix storage level
 int MSG_HOST_LEVEL;             //Msg host level
 int MSG_STORAGE_LEVEL;          //Msg storage level
+int MSG_FILE_LEVEL;             //Msg file level
 int SD_HOST_LEVEL;              //Simdag host level
 int SD_STORAGE_LEVEL;           //Simdag storage level
 int COORD_HOST_LEVEL=0;         //Coordinates level
 int SD_HOST_LEVEL;              //Simdag host level
 int SD_STORAGE_LEVEL;           //Simdag storage level
 int COORD_HOST_LEVEL=0;         //Coordinates level