Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Seal objects at Engine::run
[simgrid.git] / src / kernel / resource / DiskImpl.cpp
index cbc75c2..fda3775 100644 (file)
@@ -108,6 +108,9 @@ DiskImpl* DiskImpl::set_write_bandwidth_profile(profile::Profile* profile)
 
 void DiskImpl::seal()
 {
+  if (is_sealed())
+    return;
+
   xbt_assert(this->get_model(), "Cannot seal Disk (%s) without setting the model first", get_cname());
   lmm::System* maxmin_system = get_model()->get_maxmin_system();
   this->set_read_constraint(maxmin_system->constraint_new(this, read_bw_.peak * read_bw_.scale))