Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove deprecated features for next release.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 28 Mar 2021 13:50:57 +0000 (15:50 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 29 Mar 2021 18:42:10 +0000 (20:42 +0200)
MANIFEST.in
docs/source/Doxyfile
include/simgrid/Exception.hpp
include/simgrid/host.h
include/simgrid/simix.h
include/xbt/base.h
include/xbt/synchro.h [deleted file]
src/plugins/host_energy.cpp
src/s4u/s4u_Host.cpp
src/simix/libsmx.cpp
tools/cmake/DefinePackages.cmake

index d97b8e5..f45069b 100644 (file)
@@ -2051,7 +2051,6 @@ include include/xbt/replay.hpp
 include include/xbt/signal.hpp
 include include/xbt/str.h
 include include/xbt/string.hpp
-include include/xbt/synchro.h
 include include/xbt/sysdep.h
 include include/xbt/system_error.hpp
 include include/xbt/utility.hpp
index e352050..588e2ae 100644 (file)
@@ -63,7 +63,6 @@ PREDEFINED             += \
     XBT_ATTRIB_NORETURN= \
     XBT_ATTRIB_UNUSED= \
     XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s,c,l)= \
-    XBT_ATTRIB_DEPRECATED_v328(m)= \
     XBT_ATTRIB_DEPRECATED_v329(m)= \
     XBT_ATTRIB_DEPRECATED_v330(m)= \
     XBT_ATTRIB_DEPRECATED_v331(m)=
index 000a0e2..fa3d7aa 100644 (file)
@@ -123,8 +123,6 @@ private:
 /** Exception raised when a timeout elapsed */
 DECLARE_SIMGRID_EXCEPTION(TimeoutException);
 
-using TimeoutError XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::TimeoutException") = TimeoutException;
-
 /** Exception raised when a host fails */
 DECLARE_SIMGRID_EXCEPTION(HostFailureException);
 
@@ -194,7 +192,4 @@ private:
 };
 
 } // namespace simgrid
-
-using xbt_ex XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::Exception") = simgrid::Exception;
-
 #endif
index ced19be..d8ff8f4 100644 (file)
@@ -46,7 +46,6 @@ XBT_PUBLIC const char* sg_host_get_name(const_sg_host_t host);
  */
 XBT_PUBLIC void* sg_host_get_data(const_sg_host_t host);
 XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_get_data()") XBT_PUBLIC void* sg_host_data(const_sg_host_t host);
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_get_data()") XBT_PUBLIC void* sg_host_user(sg_host_t host);
 /** @brief Set the user data of a #sg_host_t.
  *
  * This functions attach @a data to @a host.
@@ -54,9 +53,6 @@ XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_get_data()") XBT_PUBLIC void* sg_
 XBT_PUBLIC void sg_host_set_data(sg_host_t host, void* userdata);
 XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_set_data()") XBT_PUBLIC
     void sg_host_data_set(sg_host_t host, void* userdata);
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_set_data()") XBT_PUBLIC
-    void sg_host_user_set(sg_host_t host, void* userdata);
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_set_data(h, NULL)") XBT_PUBLIC void sg_host_user_destroy(sg_host_t host);
 #endif
 
 // ========= storage related functions ============
index cfd127b..189c36b 100644 (file)
@@ -130,12 +130,6 @@ XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Exec::test()") XBT_PUBLIC
 SG_BEGIN_DECL
 XBT_ATTRIB_DEPRECATED_v329("This function will be removed") void simcall_process_set_data(smx_actor_t process,
                                                                                           void* data);
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_actor_suspend()") XBT_PUBLIC
-    void simcall_process_suspend(smx_actor_t process);
-
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_actor_join()") XBT_PUBLIC
-    void simcall_process_join(smx_actor_t process, double timeout);
-
 XBT_ATTRIB_DEPRECATED_v329("Please use sg_actor_sleep_for()") XBT_PUBLIC
 #ifdef __cplusplus
     simgrid::kernel::activity::State
index a04230b..dec1d63 100644 (file)
@@ -53,8 +53,6 @@
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v328(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.27)")
 #define XBT_ATTRIB_DEPRECATED_v329(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.28)")
 #define XBT_ATTRIB_DEPRECATED_v330(mesg)                                                                               \
diff --git a/include/xbt/synchro.h b/include/xbt/synchro.h
deleted file mode 100644 (file)
index 62f34ec..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/* xbt/synchro.h -- Simulated synchronization                               */
-
-/* Copyright (c) 2009-2021. The SimGrid Team.                               */
-
-/* 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 XBT_SYNCHRO_H
-#define XBT_SYNCHRO_H
-
-#include "simgrid/cond.h"
-#include "simgrid/mutex.h"
-#include <xbt/misc.h> /* SG_BEGIN_DECL */
-
-#warning xbt/synchro.h is deprecated and will be removed in v3.28.
-
-SG_BEGIN_DECL
-
-/** @addtogroup XBT_synchro
- *  @brief XBT synchronization tools
- *
- *  This section describes the simulated synchronization mechanisms,
- *  that you can use in your simulation without deadlocks. See @ref
- *  faq_MIA_thread_synchronization for details.
- *
- *  @{
- */
-
-/** @brief Thread mutex data type (opaque object)
- *  @hideinitializer
- */
-typedef sg_mutex_t xbt_mutex_t;
-
-/** @brief Creates a new mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_mutex_init") static inline xbt_mutex_t xbt_mutex_init(void)
-{
-  return sg_mutex_init();
-}
-
-/** @brief Blocks onto the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_mutex_lock") static inline void xbt_mutex_acquire(xbt_mutex_t mutex)
-{
-  sg_mutex_lock(mutex);
-}
-
-/** @brief Tries to block onto the given mutex variable
- * Tries to lock a mutex, return 1 if the mutex is unlocked, else 0.
- * This function does not block and wait for the mutex to be unlocked.
- * @param mutex The mutex
- * @return 1 - mutex free, 0 - mutex used
- */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_mutex_try_lock") static inline int xbt_mutex_try_acquire(xbt_mutex_t mutex)
-{
-  return sg_mutex_try_lock(mutex);
-}
-
-/** @brief Releases the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_mutex_unlock") static inline void xbt_mutex_release(xbt_mutex_t mutex)
-{
-  sg_mutex_unlock(mutex);
-}
-
-/** @brief Destroys the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_mutex_destroy") static inline void xbt_mutex_destroy(xbt_mutex_t mutex)
-{
-  sg_mutex_destroy(mutex);
-}
-
-/** @brief Thread condition data type (opaque object)
- *  @hideinitializer
- */
-typedef sg_cond_t xbt_cond_t;
-
-/** @brief Creates a condition variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_init") static inline xbt_cond_t xbt_cond_init(void)
-{
-  return sg_cond_init();
-}
-
-/** @brief Blocks onto the given condition variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_wait") static inline void xbt_cond_wait(xbt_cond_t cond,
-                                                                                       xbt_mutex_t mutex)
-{
-  sg_cond_wait(cond, mutex);
-}
-
-/** @brief Blocks onto the given condition variable, but only for the given amount of time.
- *  @return 0 on success, 1 on timeout */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_wait_for") static inline int xbt_cond_timedwait(xbt_cond_t cond,
-                                                                                               xbt_mutex_t mutex,
-                                                                                               double delay)
-{
-  return sg_cond_wait_for(cond, mutex, delay);
-}
-
-/** @brief Signals the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_notify_one") static inline void xbt_cond_signal(xbt_cond_t cond)
-{
-  sg_cond_notify_one(cond);
-}
-
-/** @brief Broadcasts the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_notify_all") static inline void xbt_cond_broadcast(xbt_cond_t cond)
-{
-  sg_cond_notify_all(cond);
-}
-
-/** @brief Destroys the given mutex variable */
-XBT_ATTRIB_DEPRECATED_v328("Please use sg_cond_destroy") static inline void xbt_cond_destroy(xbt_cond_t cond)
-{
-  sg_cond_destroy(cond);
-}
-
-/** @} */
-
-SG_END_DECL
-#endif /* XBT_SYNCHRO_H */
index a1033c8..906718e 100644 (file)
@@ -206,15 +206,6 @@ HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host_(ptr)
   init_watts_range_list();
 
   const char* off_power_str = host_->get_property("wattage_off");
-  if (off_power_str == nullptr) {
-    off_power_str = host_->get_property("watt_off");
-
-    static bool warned = false;
-    if (off_power_str != nullptr && not warned) {
-      warned = true;
-      XBT_WARN("Please use 'wattage_off' instead of 'watt_off' to define the idle wattage of hosts in your XML.");
-    }
-  }
   if (off_power_str != nullptr) {
     try {
       this->watts_off_ = std::stod(std::string(off_power_str));
@@ -340,62 +331,6 @@ double HostEnergy::get_consumed_energy()
 
 void HostEnergy::init_watts_range_list()
 {
-  const char* old_prop = host_->get_property("watt_per_state");
-  if (old_prop != nullptr) {
-    std::vector<std::string> all_power_values;
-    boost::split(all_power_values, old_prop, boost::is_any_of(","));
-
-    xbt_assert(all_power_values.size() == (unsigned)host_->get_pstate_count(),
-               "Invalid XML file. Found %zu energetic profiles for %d pstates", all_power_values.size(),
-               host_->get_pstate_count());
-
-    // XBT_ATTRIB_DEPRECATED_v328: putting this macro name here so that we find it during the deprecation cleanups
-    std::string msg = "DEPRECATION WARNING: Property 'watt_per_state' will only work until v3.28.\n";
-    msg += std::string("The old syntax 'Idle:OneCore:AllCores' must be converted into 'Idle:Epsilon:AllCores' to "
-                       "properly model the consumption of non-whole tasks on mono-core hosts. Here are the values to "
-                       "use for host '") +
-           host_->get_cname() + "' in your XML file:\n";
-    msg += "     <prop id=\"wattage_per_state\" value=\"";
-    for (auto const& current_power_values_str : all_power_values) {
-      std::vector<std::string> current_power_values;
-      boost::split(current_power_values, current_power_values_str, boost::is_any_of(":"));
-      double p_idle = xbt_str_parse_double((current_power_values.at(0)).c_str(),
-                                           "Invalid obsolete XML file. Fix your watt_per_state property.");
-      double p_full;
-      double p_epsilon;
-
-      if (current_power_values.size() == 3) {
-        double p_one_core = xbt_str_parse_double((current_power_values.at(1)).c_str(),
-                                                 "Invalid obsolete XML file. Fix your watt_per_state property.");
-        p_full     = xbt_str_parse_double((current_power_values.at(2)).c_str(),
-                                      "Invalid obsolete XML file. Fix your watt_per_state property.");
-        if (host_->get_core_count() == 1) {
-          p_epsilon = p_full;
-        } else {
-          p_epsilon = p_one_core - ((p_full - p_one_core) / (host_->get_core_count() - 1));
-        }
-      } else { // consumption given with idle and full only
-        p_full = xbt_str_parse_double((current_power_values.at(1)).c_str(),
-                                      "Invalid obsolete XML file. Fix your watt_per_state property.");
-        if (host_->get_core_count() == 1) {
-          p_epsilon = p_full;
-        } else {
-          p_epsilon = p_idle;
-        }
-      }
-
-      PowerRange range(p_idle, p_epsilon, p_full);
-      power_range_watts_list_.push_back(range);
-
-      msg += std::to_string(p_idle) + ":" + std::to_string(p_epsilon) + ":" + std::to_string(p_full);
-      msg += ",";
-    }
-    msg.pop_back(); // Remove the extraneous ','
-    msg += "\" />";
-    XBT_WARN("%s", msg.c_str());
-    return;
-  }
-
   const char* all_power_values_str = host_->get_property("wattage_per_state");
   if (all_power_values_str == nullptr) {
     /* If no power values are given, we assume it's 0 everywhere */
index ab974c3..918d757 100644 (file)
@@ -395,18 +395,6 @@ void sg_host_data_set(sg_host_t host, void* userdata) // XBT_ATTRIB_DEPRECATED_v
 {
   sg_host_set_data(host, userdata);
 }
-void* sg_host_user(sg_host_t host) // XBT_ATTRIB_DEPRECATED_v328
-{
-  return host->get_data();
-}
-void sg_host_user_set(sg_host_t host, void* userdata) // XBT_ATTRIB_DEPRECATED_v328
-{
-  host->set_data(userdata);
-}
-void sg_host_user_destroy(sg_host_t host) // XBT_ATTRIB_DEPRECATED_v328
-{
-  host->set_data(nullptr);
-}
 
 // ========= Disk related functions ============
 void sg_host_get_disks(const_sg_host_t host, unsigned int* disk_count, sg_disk_t** disks)
index c329085..41a204b 100644 (file)
@@ -71,16 +71,6 @@ unsigned int simcall_execution_waitany_for(simgrid::kernel::activity::ExecImpl*
       &observer);
 }
 
-void simcall_process_join(smx_actor_t process, double timeout) // XBT_ATTRIB_DEPRECATED_v328
-{
-  simgrid::kernel::actor::ActorImpl::self()->join(process, timeout);
-}
-
-void simcall_process_suspend(smx_actor_t process) // XBT_ATTRIB_DEPRECATED_v328
-{
-  process->get_iface()->suspend();
-}
-
 simgrid::kernel::activity::State simcall_process_sleep(double duration) // XBT_ATTRIB_DEPRECATED_v329
 {
   simgrid::kernel::actor::ActorImpl::self()->sleep(duration);
index 3007a3a..f2c8d7e 100644 (file)
@@ -770,7 +770,6 @@ set(headers_to_install
   include/xbt/signal.hpp
   include/xbt/str.h
   include/xbt/string.hpp
-  include/xbt/synchro.h
   include/xbt/sysdep.h
   include/xbt/system_error.hpp
   include/xbt/utility.hpp