Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this parameter belongs to the plugin
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 May 2018 07:24:30 +0000 (09:24 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 May 2018 07:24:30 +0000 (09:24 +0200)
include/simgrid/msg.h
include/simgrid/plugins/file_system.h
src/plugins/file_system/s4u_FileSystem.cpp
src/simgrid/sg_config.cpp

index 173a1de..93a9c97 100644 (file)
@@ -148,9 +148,6 @@ XBT_PUBLIC void MSG_process_killall();
 XBT_PUBLIC void MSG_process_set_kill_time(msg_process_t process, double kill_time);
 XBT_PUBLIC void MSG_process_yield();
 
-/* ******************************** File ************************************ */
-typedef sg_file_t msg_file_t;
-XBT_PUBLIC_DATA int sg_storage_max_file_descriptors;
 
 /**
  * \brief @brief Communication action.
index 3b0de47..429d1a6 100644 (file)
@@ -12,6 +12,7 @@
 
 // C interface
 ////////////////
+typedef sg_file_t msg_file_t; // MSG backwards compatibility
 
 SG_BEGIN_DECL()
 XBT_PUBLIC void sg_storage_file_system_init();
index b1b6baf..d636541 100644 (file)
@@ -7,6 +7,7 @@
 #include "simgrid/plugins/file_system.h"
 #include "simgrid/s4u/Actor.hpp"
 #include "src/surf/HostImpl.hpp"
+#include "xbt/config.hpp"
 
 #include <algorithm>
 #include <boost/algorithm/string.hpp>
@@ -348,6 +349,10 @@ static void onHostCreation(simgrid::s4u::Host& host)
 /* **************************** Public interface *************************** */
 void sg_storage_file_system_init()
 {
+  sg_storage_max_file_descriptors = 1024;
+  simgrid::config::bind_flag(sg_storage_max_file_descriptors, "storage/max_file_descriptors",
+                             "Maximum number of concurrently opened files per host. Default is 1024");
+
   if (not FileSystemStorageExt::EXTENSION_ID.valid()) {
     FileSystemStorageExt::EXTENSION_ID = simgrid::s4u::Storage::extension_create<FileSystemStorageExt>();
     simgrid::s4u::Storage::onCreation.connect(&onStorageCreation);
@@ -407,7 +412,7 @@ void sg_file_set_data(sg_file_t fd, void* data)
 }
 
 /**
- * \brief Set the file position indicator in the msg_file_t by adding offset bytes
+ * \brief Set the file position indicator in the sg_file_t by adding offset bytes
  * to the position specified by origin (either SEEK_SET, SEEK_CUR, or SEEK_END).
  *
  * \param fd : file object that identifies the stream
index dc79bbd..b57ced9 100644 (file)
@@ -445,12 +445,6 @@ void sg_config_init(int *argc, char **argv)
   simgrid::config::declare_flag<std::string>("smpi/reduce", "Which collective to use for reduce", "");
 #endif // HAVE_SMPI
 
-  /* Storage */
-
-  sg_storage_max_file_descriptors = 1024;
-  simgrid::config::bind_flag(sg_storage_max_file_descriptors, "storage/max_file_descriptors",
-                             "Maximum number of concurrently opened files per host. Default is 1024");
-
   /* Others */
 
   simgrid::config::declare_flag<bool>(