Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics (indentation, codefactor.io).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 30 Jun 2022 08:17:10 +0000 (10:17 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 30 Jun 2022 08:37:54 +0000 (10:37 +0200)
[ci-skip]

examples/c/cloud-migration/cloud-migration.c
examples/python/exec-ptask/exec-ptask.py
src/kernel/routing/NetZoneImpl.cpp
src/s4u/s4u_Host.cpp

index 5319ebb..6d8f7b5 100644 (file)
@@ -34,7 +34,7 @@ static void migration_worker_main(int argc, char* argv[])
   const char* dst_pm_name = argv[2];
 
   sg_host_t src_pm = sg_host_self();
-  sg_vm_t vm       = (sg_vm_t)sg_vm_by_name(src_pm,vm_name);
+  sg_vm_t vm       = (sg_vm_t)sg_vm_by_name(src_pm, vm_name);
   sg_host_t dst_pm = sg_host_by_name(dst_pm_name);
 
   vm_migrate(vm, dst_pm);
index d5ddb6a..4b2da92 100644 (file)
@@ -76,11 +76,11 @@ def runner():
     this_actor.info("    What was already done is removed, and the load of the removed host is shared between remaining ones.")
     for i in range(2):
         # remove what we've done so far, for both comm and compute load
-        computation_amounts[i]   *= remaining_ratio
+        computation_amounts[i] *= remaining_ratio
         communication_amounts[i] *= remaining_ratio
         # The work from 1 must be shared between 2 remaining ones. 1/2=50% of extra work for each
-        computation_amounts[i]   *= 1.5;
-        communication_amounts[i] *= 1.5;
+        computation_amounts[i] *= 1.5
+        communication_amounts[i] *= 1.5
     hosts = hosts[:2]
     computation_amounts = computation_amounts[:2]
     remaining_comm = communication_amounts[1]
index 885e4e5..fe2c721 100644 (file)
@@ -344,8 +344,8 @@ resource::SplitDuplexLinkImpl* NetZoneImpl::get_split_duplex_link_by_name_or_nul
 resource::HostImpl* NetZoneImpl::get_host_by_name_or_null(const std::string& name) const
 {
   auto host_it = hosts_.find(name);
-  if(host_it != hosts_.end())
-        return host_it->second;
+  if (host_it != hosts_.end())
+    return host_it->second;
 
   for (const auto* child : children_) {
     auto* host = child->get_host_by_name_or_null(name);
index 237a129..35357f8 100644 (file)
@@ -373,8 +373,9 @@ VirtualMachine* Host::create_vm(const std::string& name, int core_amount, size_t
       [this, &name, core_amount, ramsize] { return this->pimpl_->create_vm(name, core_amount, ramsize); });
 }
 
-VirtualMachine* Host::vm_by_name_or_null(const std::string& name) {
-    simgrid::kernel::resource::VirtualMachineImpl* vm=this->pimpl_->get_vm_by_name_or_null(name);
+VirtualMachine* Host::vm_by_name_or_null(const std::string& name)
+{
+  simgrid::kernel::resource::VirtualMachineImpl* vm = this->pimpl_->get_vm_by_name_or_null(name);
   return vm ? vm->get_iface() : nullptr;
 }