Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove unvalidated Bconnection attribute
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 22 May 2017 21:39:09 +0000 (23:39 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 22 May 2017 21:39:09 +0000 (23:39 +0200)
examples/msg/io-remote/io-remote.tesh
examples/platforms/storage/remote_io.xml
examples/platforms/storage/storage.xml
src/surf/storage_interface.cpp
src/surf/storage_interface.hpp
src/surf/storage_n11.cpp
src/surf/storage_n11.hpp

index e0123be..46b251e 100644 (file)
@@ -44,9 +44,9 @@ $ ${bindir:=.}/io-remote$EXEEXT ${srcdir:=.}/storage/remote_io.xml ${srcdir:=.}/
 > [  0.001469] (4@ dave) Offset is now at: 0
 > [  0.001469] (4@ dave) Opened file 'c:\Windows\Professional.xml'
 > [  0.001469] (4@ dave) Try to write 31 MiB to 'c:\Windows\Professional.xml'
 > [  0.001469] (4@ dave) Offset is now at: 0
 > [  0.001469] (4@ dave) Opened file 'c:\Windows\Professional.xml'
 > [  0.001469] (4@ dave) Try to write 31 MiB to 'c:\Windows\Professional.xml'
-> [  0.003559] (1@alice) Have read 101663 from 'c:\Windows\setupact.log'. Offset is now at: 101663
-> [  0.003559] (1@alice) Seek back to the begining of the stream...
-> [  0.003559] (1@alice) Offset is now at: 0
+> [  0.003741] (1@alice) Have read 101663 from 'c:\Windows\setupact.log'. Offset is now at: 101663
+> [  0.003741] (1@alice) Seek back to the begining of the stream...
+> [  0.003741] (1@alice) Offset is now at: 0
 > [  0.276315] (3@ carl) Have read 12710497 from '/scratch/lib/libsimgrid.so.3.6.2'. Offset is now at: 12710497
 > [  0.276315] (3@ carl) Seek back to the begining of the stream...
 > [  0.276315] (3@ carl) Offset is now at: 0
 > [  0.276315] (3@ carl) Have read 12710497 from '/scratch/lib/libsimgrid.so.3.6.2'. Offset is now at: 12710497
 > [  0.276315] (3@ carl) Seek back to the begining of the stream...
 > [  0.276315] (3@ carl) Offset is now at: 0
@@ -55,10 +55,10 @@ $ ${bindir:=.}/io-remote$EXEEXT ${srcdir:=.}/storage/remote_io.xml ${srcdir:=.}/
 > [  0.387036] (2@  bob) Offset is now at: 0
 > [  0.387036] (2@  bob) Opened file '/scratch/doc/simgrid/examples/platforms/g5k.xml'
 > [  0.387036] (2@  bob) Try to write 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml'
 > [  0.387036] (2@  bob) Offset is now at: 0
 > [  0.387036] (2@  bob) Opened file '/scratch/doc/simgrid/examples/platforms/g5k.xml'
 > [  0.387036] (2@  bob) Try to write 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml'
-> [  0.528029] (4@ dave) Have written 32646144 bytes to 'c:\Windows\Professional.xml'.
-> [  0.528029] (4@ dave) Move 'c:\Windows\Professional.xml' (of size 32646144) from 'dave' to 'carl'
+> [  0.528211] (4@ dave) Have written 32646144 bytes to 'c:\Windows\Professional.xml'.
+> [  0.528211] (4@ dave) Move 'c:\Windows\Professional.xml' (of size 32646144) from 'dave' to 'carl'
 > [  0.819921] (2@  bob) Have written 17436672 bytes to '/scratch/doc/simgrid/examples/platforms/g5k.xml'.
 > [  0.819921] (2@  bob) Copy '/scratch/doc/simgrid/examples/platforms/g5k.xml' (of size 17436672) from 'bob' to 'alice'
 > [  0.819921] (2@  bob) Have written 17436672 bytes to '/scratch/doc/simgrid/examples/platforms/g5k.xml'.
 > [  0.819921] (2@  bob) Copy '/scratch/doc/simgrid/examples/platforms/g5k.xml' (of size 17436672) from 'bob' to 'alice'
-> [  1.843786] (0@     ) Init: 60 MiB used on 'Disk1'
-> [  1.843786] (0@     ) Init: 2297 MiB used on 'Disk2'
-> [  1.843786] (0@     ) Simulation time 1.84379
+> [  1.843969] (0@     ) Init: 60 MiB used on 'Disk1'
+> [  1.843969] (0@     ) Init: 2297 MiB used on 'Disk2'
+> [  1.843969] (0@     ) Simulation time 1.84397
index 069fdf9..16a0dfd 100644 (file)
@@ -9,7 +9,6 @@
     <storage_type id="SATA-II_HDD" size="500GB" content="content/small_content.txt">
       <model_prop id="Bread" value="92MBps"/> 
       <model_prop id="Bwrite" value="62MBps"/> 
     <storage_type id="SATA-II_HDD" size="500GB" content="content/small_content.txt">
       <model_prop id="Bread" value="92MBps"/> 
       <model_prop id="Bwrite" value="62MBps"/> 
-      <model_prop id="Bconnection" value="122MBps"/> 
     </storage_type>
 
     <storage id="Disk1" typeId="SATA-II_HDD" attach="carl"/>
     </storage_type>
 
     <storage id="Disk1" typeId="SATA-II_HDD" attach="carl"/>
index 9d1fa4f..1402e68 100644 (file)
@@ -9,13 +9,11 @@
     <storage_type id="single_HDD" size="500GiB" content="content/storage_content.txt">
       <model_prop id="Bwrite" value="30MBps" />
       <model_prop id="Bread" value="100MBps" />
     <storage_type id="single_HDD" size="500GiB" content="content/storage_content.txt">
       <model_prop id="Bwrite" value="30MBps" />
       <model_prop id="Bread" value="100MBps" />
-      <model_prop id="Bconnection" value="120MBps" />
     </storage_type>
 
     <storage_type id="single_SSD" size="500GiB" content="content/storage_content.txt">
       <model_prop id="Bwrite" value="60MBps" />
       <model_prop id="Bread" value="200MBps" />
     </storage_type>
 
     <storage_type id="single_SSD" size="500GiB" content="content/storage_content.txt">
       <model_prop id="Bwrite" value="60MBps" />
       <model_prop id="Bread" value="200MBps" />
-      <model_prop id="Bconnection" value="220MBps" />
     </storage_type>
 
     <storage id="Disk1" typeId="single_HDD" attach="bob" />
     </storage_type>
 
     <storage id="Disk1" typeId="single_HDD" attach="bob" />
index 1aef9a9..50c66f4 100644 (file)
@@ -50,8 +50,8 @@ StorageModel::~StorageModel(){
  ************/
 
 Storage::Storage(Model* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
  ************/
 
 Storage::Storage(Model* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
-                 double bconnection, const char* type_id, const char* content_name, sg_size_t size, const char* attach)
-    : Resource(model, name, lmm_constraint_new(maxminSystem, this, bconnection))
+                 const char* type_id, const char* content_name, sg_size_t size, const char* attach)
+    : Resource(model, name, lmm_constraint_new(maxminSystem, this, MAX(bread, bwrite)))
     , size_(size)
     , usedSize_(0)
     , typeId_(xbt_strdup(type_id))
     , size_(size)
     , usedSize_(0)
     , typeId_(xbt_strdup(type_id))
@@ -60,7 +60,7 @@ Storage::Storage(Model* model, const char* name, lmm_system_t maxminSystem, doub
   content_ = parseContent(content_name);
   attach_  = xbt_strdup(attach);
   turnOn();
   content_ = parseContent(content_name);
   attach_  = xbt_strdup(attach);
   turnOn();
-  XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
+  XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
   constraintRead_  = lmm_constraint_new(maxminSystem, this, bread);
   constraintWrite_ = lmm_constraint_new(maxminSystem, this, bwrite);
 }
   constraintRead_  = lmm_constraint_new(maxminSystem, this, bread);
   constraintWrite_ = lmm_constraint_new(maxminSystem, this, bwrite);
 }
index 42e8640..9e79f47 100644 (file)
@@ -80,8 +80,8 @@ class Storage : public simgrid::surf::Resource,
 public:
 
   /** @brief Storage constructor */
 public:
 
   /** @brief Storage constructor */
-  Storage(Model* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite, double bconnection,
-          const char* type_id, const char* content_name, sg_size_t size, const char* attach);
+  Storage(Model* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite, const char* type_id,
+      const char* content_name, sg_size_t size, const char* attach);
 
   ~Storage();
 
 
   ~Storage();
 
index b28b61e..8c4f4e8 100644 (file)
@@ -68,11 +68,9 @@ Storage* StorageN11Model::createStorage(const char* id, const char* type_id, con
       surf_parse_get_bandwidth(storage_type->model_properties->at("Bread").c_str(), "property Bread, storage", type_id);
   double Bwrite = surf_parse_get_bandwidth(storage_type->model_properties->at("Bwrite").c_str(),
                                            "property Bwrite, storage", type_id);
       surf_parse_get_bandwidth(storage_type->model_properties->at("Bread").c_str(), "property Bread, storage", type_id);
   double Bwrite = surf_parse_get_bandwidth(storage_type->model_properties->at("Bwrite").c_str(),
                                            "property Bwrite, storage", type_id);
-  double Bconnection = surf_parse_get_bandwidth(storage_type->model_properties->at("Bconnection").c_str(),
-                                                "property Bconnection, storage", type_id);
 
 
 Storage* storage = new StorageN11(this, id, maxminSystem_, Bread, Bwrite, Bconnection, type_id, (char*)content_name,
-                                    storage_type->size, (char*)attach);
Storage* storage = new StorageN11(this, id, maxminSystem_, Bread, Bwrite, type_id, (char*)content_name,
+                                   storage_type->size, (char*)attach);
   storageCreatedCallbacks(storage);
   xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
 
   storageCreatedCallbacks(storage);
   xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
 
@@ -162,10 +160,10 @@ void StorageN11Model::updateActionsState(double /*now*/, double delta)
  ************/
 
 StorageN11::StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
  ************/
 
 StorageN11::StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
-                       double bconnection, const char* type_id, char* content_name, sg_size_t size, char* attach)
-    : Storage(model, name, maxminSystem, bread, bwrite, bconnection, type_id, content_name, size, attach)
+                       const char* type_id, char* content_name, sg_size_t size, char* attach)
+    : Storage(model, name, maxminSystem, bread, bwrite, type_id, content_name, size, attach)
 {
 {
-  XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
+  XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
 }
 
 StorageAction *StorageN11::open(const char* mount, const char* path)
 }
 
 StorageAction *StorageN11::open(const char* mount, const char* path)
index 734b740..9c8d866 100644 (file)
@@ -40,8 +40,7 @@ public:
 class StorageN11 : public Storage {
 public:
   StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
 class StorageN11 : public Storage {
 public:
   StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
-             double bconnection, const char* type_id, char* content_name, sg_size_t size, char* attach);
-
+             const char* type_id, char* content_name, sg_size_t size, char* attach);
   StorageAction *open(const char* mount, const char* path);
   StorageAction *close(surf_file_t fd);
   StorageAction *ls(const char *path);
   StorageAction *open(const char* mount, const char* path);
   StorageAction *close(surf_file_t fd);
   StorageAction *ls(const char *path);