Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove or deprecate now useless code
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 6 Mar 2019 08:08:18 +0000 (09:08 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 6 Mar 2019 08:08:18 +0000 (09:08 +0100)
14 files changed:
include/simgrid/simix.h
src/kernel/activity/ExecImpl.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/s4u_VirtualMachine.cpp
src/s4u/s4u_Actor.cpp
src/simix/ActorImpl.cpp
src/simix/libsmx.cpp
src/simix/popping_generated.cpp
src/simix/simcalls.py
src/simix/smx_global.cpp
src/simix/smx_host.cpp [deleted file]
src/simix/smx_host_private.hpp [deleted file]
src/surf/sg_platf.cpp
tools/cmake/DefinePackages.cmake

index 05f0e26..4bdd8e8 100644 (file)
@@ -175,9 +175,6 @@ XBT_ATTRIB_DEPRECATED_v325("Please use CommImpl::finish") XBT_PUBLIC void SIMIX_
 
 /******************************* Host simcalls ********************************/
 #ifdef __cplusplus
 
 /******************************* Host simcalls ********************************/
 #ifdef __cplusplus
-XBT_PUBLIC smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb,
-                                                           const sg_host_t* host_list, const double* flops_amount,
-                                                           const double* bytes_amount, double rate, double timeout);
 XBT_PUBLIC e_smx_state_t simcall_execution_wait(const smx_activity_t& execution);
 XBT_PUBLIC e_smx_state_t simcall_execution_test(const smx_activity_t& execution);
 #endif
 XBT_PUBLIC e_smx_state_t simcall_execution_wait(const smx_activity_t& execution);
 XBT_PUBLIC e_smx_state_t simcall_execution_test(const smx_activity_t& execution);
 #endif
@@ -280,6 +277,11 @@ SG_END_DECL()
 XBT_ATTRIB_DEPRECATED_v325("Please use Exec::start()") XBT_PUBLIC smx_activity_t
     simcall_execution_start(const std::string& name, const std::string& category, double flops_amount, double priority,
                             double bound, sg_host_t host);
 XBT_ATTRIB_DEPRECATED_v325("Please use Exec::start()") XBT_PUBLIC smx_activity_t
     simcall_execution_start(const std::string& name, const std::string& category, double flops_amount, double priority,
                             double bound, sg_host_t host);
+
+// Should be deprecated in v325 too but is still used in other deprecated calls
+XBT_PUBLIC smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb,
+                                                           const sg_host_t* host_list, const double* flops_amount,
+                                                           const double* bytes_amount, double rate, double timeout);
 #endif
 
 #endif
 #endif
 
 #endif
index b33bd1c..d0ff6ae 100644 (file)
@@ -7,7 +7,6 @@
 #include "simgrid/Exception.hpp"
 #include "simgrid/modelchecker.h"
 #include "src/mc/mc_replay.hpp"
 #include "simgrid/Exception.hpp"
 #include "simgrid/modelchecker.h"
 #include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/surf_interface.hpp"
index a921bcf..803ec9f 100644 (file)
@@ -6,7 +6,6 @@
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/include/surf/surf.hpp"
 #include "src/simix/ActorImpl.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/include/surf/surf.hpp"
 #include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/kernel/activity/ExecImpl.hpp"
 #include "xbt/asserts.h" // xbt_log_no_loc
 
 #include "src/kernel/activity/ExecImpl.hpp"
 #include "xbt/asserts.h" // xbt_log_no_loc
 
index 45a9899..d2c56be 100644 (file)
@@ -8,7 +8,6 @@
 #include "src/include/surf/surf.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/plugins/vm/VmHostExt.hpp"
 #include "src/include/surf/surf.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/plugins/vm/VmHostExt.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/surf/cpu_cas01.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines");
 #include "src/surf/cpu_cas01.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines");
index 21398a2..ed619e0 100644 (file)
@@ -10,7 +10,6 @@
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/VirtualMachine.hpp"
 #include "src/kernel/activity/ExecImpl.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/VirtualMachine.hpp"
 #include "src/kernel/activity/ExecImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/surf/HostImpl.hpp"
 
 #include "src/simix/smx_private.hpp"
 #include "src/surf/HostImpl.hpp"
 
index b5d78bb..e0328fd 100644 (file)
@@ -15,7 +15,6 @@
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/mc/remote/Client.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/mc/remote/Client.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 
index a714780..16347e9 100644 (file)
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 #include "popping_bodies.cpp"
 
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 #include "popping_bodies.cpp"
 
-/**
- * @ingroup simix_process_management
- * @brief Creates a synchro that may involve parallel computation on
- * several hosts and communication between them.
- *
- * @param name Name of the execution synchro to create
- * @param host_nb Number of hosts where the synchro will be executed
- * @param host_list Array (of size host_nb) of hosts where the synchro will be executed
- * @param flops_amount Array (of size host_nb) of computation amount of hosts (in bytes)
- * @param bytes_amount Array (of size host_nb * host_nb) representing the communication
- * amount between each pair of hosts
- * @param rate the SURF action rate
- * @param timeout timeout
- * @return A new SIMIX execution synchronization
- */
-smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb, const sg_host_t* host_list,
-                                                const double* flops_amount, const double* bytes_amount, double rate,
-                                                double timeout)
-{
-  /* Check that we are not mixing VMs and PMs in the parallel task */
-  bool is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[0]));
-  for (int i = 1; i < host_nb; i++) {
-    bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]));
-    xbt_assert(is_a_vm == tmp_is_a_vm, "parallel_execute: mixing VMs and PMs is not supported (yet).");
-  }
-
-  /* checking for infinite values */
-  for (int i = 0 ; i < host_nb ; ++i) {
-    if (flops_amount != nullptr)
-      xbt_assert(std::isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
-    if (bytes_amount != nullptr) {
-      for (int j = 0 ; j < host_nb ; ++j) {
-        xbt_assert(std::isfinite(bytes_amount[i + host_nb * j]),
-                   "bytes_amount[%d+%d*%d] is not finite!", i, host_nb, j);
-      }
-    }
-  }
-
-  xbt_assert(std::isfinite(rate), "rate is not finite!");
-  return simgrid::simix::simcall([name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout] {
-    return SIMIX_execution_parallel_start(std::move(name), host_nb, host_list, flops_amount, bytes_amount, rate,
-                                          timeout);
-  });
-}
-
 /**
  * @ingroup simix_host_management
  * @brief Waits for the completion of an execution synchro and destroy it.
 /**
  * @ingroup simix_host_management
  * @brief Waits for the completion of an execution synchro and destroy it.
@@ -425,6 +379,7 @@ void simcall_execution_set_bound(smx_activity_t exec, double bound)
       [exec, bound] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->set_bound(bound); });
 }
 
       [exec, bound] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->set_bound(bound); });
 }
 
+// deprecated
 smx_activity_t simcall_execution_start(const std::string& name, const std::string& category, double flops_amount,
                                        double priority, double bound, sg_host_t host)
 {
 smx_activity_t simcall_execution_start(const std::string& name, const std::string& category, double flops_amount,
                                        double priority, double bound, sg_host_t host)
 {
@@ -436,6 +391,47 @@ smx_activity_t simcall_execution_start(const std::string& name, const std::strin
   });
 }
 
   });
 }
 
+// deprecated
+smx_activity_t simcall_execution_parallel_start(const std::string& name, int host_nb, const sg_host_t* host_list,
+                                                const double* flops_amount, const double* bytes_amount, double rate,
+                                                double timeout)
+{
+  /* Check that we are not mixing VMs and PMs in the parallel task */
+  bool is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[0]));
+  for (int i = 1; i < host_nb; i++) {
+    bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]));
+    xbt_assert(is_a_vm == tmp_is_a_vm, "parallel_execute: mixing VMs and PMs is not supported (yet).");
+  }
+
+  /* checking for infinite values */
+  for (int i = 0; i < host_nb; ++i) {
+    if (flops_amount != nullptr)
+      xbt_assert(std::isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
+    if (bytes_amount != nullptr) {
+      for (int j = 0; j < host_nb; ++j) {
+        xbt_assert(std::isfinite(bytes_amount[i + host_nb * j]), "bytes_amount[%d+%d*%d] is not finite!", i, host_nb,
+                   j);
+      }
+    }
+  }
+  xbt_assert(std::isfinite(rate), "rate is not finite!");
+
+  std::vector<simgrid::s4u::Host*> hosts;
+  std::vector<double> flops_parallel_amount;
+  std::vector<double> bytes_parallel_amount;
+  for (int i = 0; i < host_nb; i++) {
+    hosts.push_back(host_list[i]);
+    flops_parallel_amount.push_back(flops_amount[i]);
+    for (int j = 0; j < host_nb; j++)
+      bytes_parallel_amount.push_back(bytes_amount[i]);
+  }
+  return simgrid::simix::simcall([name, hosts, flops_parallel_amount, bytes_parallel_amount, timeout] {
+    return simgrid::kernel::activity::ExecImplPtr(new simgrid::kernel::activity::ExecImpl(std::move(name), ""))
+        ->set_timeout(timeout)
+        ->start(hosts, flops_parallel_amount, bytes_parallel_amount);
+  });
+}
+
 // deprecated
 void SIMIX_comm_finish(smx_activity_t synchro)
 {
 // deprecated
 void SIMIX_comm_finish(smx_activity_t synchro)
 {
index 2227301..9306f6c 100644 (file)
@@ -20,7 +20,6 @@
 #include "src/mc/mc_forward.hpp"
 #endif
 #include "src/kernel/activity/ConditionVariableImpl.hpp"
 #include "src/mc/mc_forward.hpp"
 #endif
 #include "src/kernel/activity/ConditionVariableImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
index d214ff1..3d71623 100755 (executable)
@@ -313,7 +313,6 @@ if __name__ == '__main__':
     fd.write('#include "src/mc/mc_forward.hpp"\n')
     fd.write('#endif\n')
     fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\n')
     fd.write('#include "src/mc/mc_forward.hpp"\n')
     fd.write('#endif\n')
     fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\n')
-    fd.write('#include "src/simix/smx_host_private.hpp"\n')
 
     fd.write('\n')
     fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n')
 
     fd.write('\n')
     fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n')
index 6e72b43..82d46ab 100644 (file)
@@ -16,7 +16,6 @@
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/mc/mc_record.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/mc/mc_record.hpp"
 #include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/surf/StorageImpl.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/surf/StorageImpl.hpp"
 #include "src/surf/xml/platf.hpp"
diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp
deleted file mode 100644 (file)
index 7b69ef0..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "mc/mc.h"
-#include "smx_private.hpp"
-#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/mc/mc_replay.hpp"
-#include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts");
-
-simgrid::kernel::activity::ExecImplPtr
-SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* host_list, const double* flops_amount,
-                               const double* bytes_amount, double rate, double timeout)
-{
-  simgrid::kernel::activity::ExecImplPtr exec =
-      simgrid::kernel::activity::ExecImplPtr(new simgrid::kernel::activity::ExecImpl(std::move(name), ""));
-
-  std::vector<simgrid::s4u::Host*> hosts;
-  for (int i = 0; i < host_nb; i++)
-    hosts.push_back(host_list[i]);
-  /* set surf's synchro */
-  if (not MC_is_active() && not MC_record_replay_is_active()) {
-    exec->surf_action_ = surf_host_model->execute_parallel(hosts, flops_amount, bytes_amount, rate);
-    if (exec->surf_action_ != nullptr) {
-      exec->surf_action_->set_data(exec.get());
-    }
-  }
-
-  XBT_DEBUG("Create parallel execute synchro %p", exec.get());
-
-  return exec;
-}
-
diff --git a/src/simix/smx_host_private.hpp b/src/simix/smx_host_private.hpp
deleted file mode 100644 (file)
index 84c4840..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SIMIX_HOST_PRIVATE_HPP
-#define SIMIX_HOST_PRIVATE_HPP
-
-#include "src/simix/ActorImpl.hpp"
-
-#include <boost/intrusive/list.hpp>
-
-XBT_PRIVATE simgrid::kernel::activity::ExecImplPtr
-SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* host_list, const double* flops_amount,
-                               const double* bytes_amount, double rate, double timeout);
-
-#endif
index 1abeb14..c67c9e6 100644 (file)
@@ -19,7 +19,6 @@
 #include "src/include/simgrid/sg_config.hpp"
 #include "src/include/surf/surf.hpp"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/include/simgrid/sg_config.hpp"
 #include "src/include/surf/surf.hpp"
 #include "src/kernel/EngineImpl.hpp"
-#include "src/simix/smx_host_private.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/xml/platf_private.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/surf/HostImpl.hpp"
 #include "src/surf/xml/platf_private.hpp"
index d629a24..b7ef956 100644 (file)
@@ -25,7 +25,6 @@ set(EXTRA_DIST
   src/simix/popping_generated.cpp
   src/simix/popping_enum.h
   src/simix/popping_accessors.hpp
   src/simix/popping_generated.cpp
   src/simix/popping_enum.h
   src/simix/popping_accessors.hpp
-  src/simix/smx_host_private.hpp
   src/simix/smx_private.hpp
   src/smpi/colls/coll_tuned_topo.hpp
   src/smpi/colls/colls_private.hpp
   src/simix/smx_private.hpp
   src/smpi/colls/coll_tuned_topo.hpp
   src/smpi/colls/colls_private.hpp
@@ -384,7 +383,6 @@ set(SIMIX_SRC
   src/simix/smx_deployment.cpp
   src/simix/smx_environment.cpp
   src/simix/smx_global.cpp
   src/simix/smx_deployment.cpp
   src/simix/smx_environment.cpp
   src/simix/smx_global.cpp
-  src/simix/smx_host.cpp
   src/simix/ActorImpl.cpp
   src/simix/ActorImpl.hpp
   src/simix/popping.cpp
   src/simix/ActorImpl.cpp
   src/simix/ActorImpl.hpp
   src/simix/popping.cpp