Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove deprecated features for next release (3.35).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 27 Jun 2023 06:46:56 +0000 (08:46 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 27 Jun 2023 06:46:56 +0000 (08:46 +0200)
12 files changed:
MANIFEST.in
docs/source/Doxyfile
include/simgrid/forward.h
include/simgrid/host.h
include/simgrid/s4u/Engine.hpp
include/simgrid/simix.h [deleted file]
include/xbt/base.h
src/deprecated.cpp [deleted file]
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Host.cpp
teshsuite/xbt/cmdline/cmdline.c
tools/cmake/DefinePackages.cmake

index 76abec2..069d589 100644 (file)
@@ -1966,7 +1966,6 @@ include include/simgrid/s4u/Semaphore.hpp
 include include/simgrid/s4u/Task.hpp
 include include/simgrid/s4u/VirtualMachine.hpp
 include include/simgrid/semaphore.h
-include include/simgrid/simix.h
 include include/simgrid/simix.hpp
 include include/simgrid/version.h.in
 include include/simgrid/vm.h
@@ -2025,7 +2024,6 @@ include src/dag/dax.dtd
 include src/dag/dax_dtd.c
 include src/dag/dax_dtd.h
 include src/dag/loaders.cpp
-include src/deprecated.cpp
 include src/instr/instr_config.cpp
 include src/instr/instr_interface.cpp
 include src/instr/instr_paje_containers.cpp
index 7237a50..4e35aad 100644 (file)
@@ -66,6 +66,5 @@ PREDEFINED             += \
     XBT_ATTRIB_NORETURN= \
     XBT_ATTRIB_UNUSED= \
     XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \
-    XBT_ATTRIB_DEPRECATED_v335(mesg)= \
     XBT_ATTRIB_DEPRECATED_v336(mesg)= \
     XBT_ATTRIB_DEPRECATED_v338(mesg)=
index f39ff67..d458ddc 100644 (file)
@@ -229,19 +229,7 @@ using s4u_Disk              = simgrid::s4u::Disk;
 using s4u_NetZone           = simgrid::s4u::NetZone;
 using s4u_VM                = simgrid::s4u::VirtualMachine;
 
-using smx_timer_t
-    XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::timer::Timer*") = simgrid::kernel::timer::Timer*;
-using smx_actor_t
-    XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::actor::ActorImpl*") = simgrid::kernel::actor::ActorImpl*;
 using smx_activity_t = simgrid::kernel::activity::ActivityImpl*;
-using smx_cond_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::ConditionVariableImpl*") =
-    simgrid::kernel::activity::ConditionVariableImpl*;
-using smx_mailbox_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::MailboxImpl*") =
-    simgrid::kernel::activity::MailboxImpl*;
-using smx_mutex_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::MutexImpl*") =
-    simgrid::kernel::activity::MutexImpl*;
-using smx_sem_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::SemaphoreImpl*") =
-    simgrid::kernel::activity::SemaphoreImpl*;
 #else
 
 typedef struct s4u_Actor s4u_Actor;
@@ -259,22 +247,14 @@ typedef struct s4u_Disk s4u_Disk;
 typedef struct s4u_NetZone s4u_NetZone;
 typedef struct s4u_VM s4u_VM;
 
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_timer* smx_timer_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_actor* smx_actor_t;
 typedef struct s_smx_activity* smx_activity_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_cond_t* smx_cond_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_mailbox* smx_mailbox_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_mutex* smx_mutex_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_sem* smx_sem_t;
 
 #endif
 
 /** Pointer to a SimGrid barrier object */
 typedef s4u_Barrier* sg_bar_t;
 /** Constant pointer to a SimGrid barrier object */
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef const s4u_Barrier* const_sg_bar_t;
 typedef s4u_Comm* sg_comm_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef const s4u_Comm* const_sg_comm_t;
 typedef s4u_Exec* sg_exec_t;
 typedef const s4u_Exec* const_sg_exec_t;
 typedef s4u_ConditionVariable* sg_cond_t;
index e828dce..57c0a94 100644 (file)
@@ -115,9 +115,6 @@ XBT_PUBLIC double sg_host_get_route_latency(const_sg_host_t from, const_sg_host_
 XBT_PUBLIC double sg_host_get_route_bandwidth(const_sg_host_t from, const_sg_host_t to);
 XBT_PUBLIC void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount);
 
-XBT_ATTRIB_DEPRECATED_v335("Please manifest if you actually need this function") XBT_PUBLIC
-    void sg_host_dump(const_sg_host_t ws);
-
 XBT_PUBLIC void sg_host_get_actor_list(const_sg_host_t host, xbt_dynar_t whereto);
 SG_END_DECL
 
index 46f7ae2..d92987d 100644 (file)
@@ -40,9 +40,6 @@ public:
   ~Engine();
 #endif
 
-  /** Finalize the default engine and all its dependencies */
-  XBT_ATTRIB_DEPRECATED_v335("Users are not supposed to shutdown the Engine") void shutdown();
-
   /** Run the simulation until its end */
   void run() const;
 
diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h
deleted file mode 100644 (file)
index aa70ca6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2007-2023. 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 SIMGRID_SIMIX_H
-#define SIMGRID_SIMIX_H
-
-#include <simgrid/forward.h>
-
-// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v335)
-#ifndef SIMIX_H_NO_DEPRECATED_WARNING
-#warning simgrid/simix.h is deprecated and will be removed in v3.35.
-#endif
-
-#ifdef __cplusplus
-
-/******************************************************************************/
-/*                            SIMIX simcalls                                  */
-/******************************************************************************/
-/* These functions are a system call-like interface to the simulation kernel. */
-/* They can also be called from maestro's context, and they are thread safe.  */
-/******************************************************************************/
-
-/************************** Communication simcalls ****************************/
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::send()") XBT_PUBLIC
-    void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                           double task_size, double rate, void* src_buff, size_t src_buff_size,
-                           bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                           void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                           double timeout);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::isend()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
-    simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                       double task_size, double rate, void* src_buff, size_t src_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void (*clean_fun)(void*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       bool detached);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::recv()") XBT_PUBLIC
-    void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                           void* dst_buff, size_t* dst_buff_size,
-                           bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                           void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                           double timeout, double rate);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::irecv()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
-    simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                       void* dst_buff, size_t* dst_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double rate);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_any_for()") XBT_PUBLIC ssize_t
-    simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count, double timeout);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_for()") XBT_PUBLIC
-    void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test()") XBT_PUBLIC
-    bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test_any()") XBT_PUBLIC ssize_t
-    simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count);
-
-#endif
-#endif
index e17f19d..7f39cc7 100644 (file)
@@ -42,8 +42,6 @@
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v335(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.34)")
 #define XBT_ATTRIB_DEPRECATED_v336(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.35)")
 #define XBT_ATTRIB_DEPRECATED_v338(mesg)                                                                               \
diff --git a/src/deprecated.cpp b/src/deprecated.cpp
deleted file mode 100644 (file)
index 0881f54..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/* This file only contains deprecated code, and will die with v3.25           */
-
-/* Copyright (c) 2010-2023. 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 "simgrid/config.h"
-#include "simgrid/modelchecker.h"
-#include "src/kernel/EngineImpl.hpp"
-#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/actor/SimcallObserver.hpp"
-#include "src/mc/mc_replay.hpp"
-#include <simgrid/s4u/Activity.hpp>
-
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335)
-#include <simgrid/simix.h>
-
-#include <cmath>
-
-void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                       double task_size, double rate, void* src_buff, size_t src_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for send");
-  simgrid::s4u::Comm::send(sender, mbox->get_iface(), task_size, rate, src_buff, src_buff_size, match_fun,
-                           copy_data_fun, data, timeout);
-}
-
-simgrid::kernel::activity::ActivityImplPtr
-simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                   double task_size, double rate, void* src_buff, size_t src_buff_size,
-                   bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void (*clean_fun)(void*),
-                   void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                   bool detached) // XBT_ATTRIB_DEPRECATED_v335
-{
-  /* checking for infinite values */
-  xbt_assert(std::isfinite(task_size), "task_size is not finite!");
-  xbt_assert(std::isfinite(rate), "rate is not finite!");
-
-  xbt_assert(mbox, "No rendez-vous point defined for isend");
-
-  simgrid::kernel::actor::CommIsendSimcall observer(sender, mbox, task_size, rate,
-                                                    static_cast<unsigned char*>(src_buff), src_buff_size, match_fun,
-                                                    clean_fun, copy_data_fun, data, detached);
-  return simgrid::kernel::actor::simcall_answered(
-      [&observer] { return simgrid::kernel::activity::CommImpl::isend(&observer); });
-}
-
-void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                       void* dst_buff, size_t* dst_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double timeout, double rate) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for recv");
-  simgrid::s4u::Comm::recv(receiver, mbox->get_iface(), dst_buff, dst_buff_size, match_fun, copy_data_fun, data,
-                           timeout, rate);
-}
-
-simgrid::kernel::activity::ActivityImplPtr
-simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                   void* dst_buff, size_t* dst_buff_size,
-                   bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                   void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                   double rate) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for irecv");
-
-  simgrid::kernel::actor::CommIrecvSimcall observer(receiver, mbox, static_cast<unsigned char*>(dst_buff),
-                                                    dst_buff_size, match_fun, copy_data_fun, data, rate);
-  return simgrid::kernel::actor::simcall_answered(
-      [&observer] { return simgrid::kernel::activity::CommImpl::irecv(&observer); });
-}
-
-ssize_t simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count,
-                             double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  std::vector<simgrid::kernel::activity::ActivityImpl*> activities;
-  for (size_t i = 0; i < count; i++)
-    activities.push_back(static_cast<simgrid::kernel::activity::ActivityImpl*>(comms[i]));
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityWaitanySimcall observer{issuer, activities, timeout};
-  ssize_t changed_pos = simgrid::kernel::actor::simcall_blocking(
-      [&observer] {
-        simgrid::kernel::activity::ActivityImpl::wait_any_for(observer.get_issuer(), observer.get_activities(),
-                                                              observer.get_timeout());
-      },
-      &observer);
-  if (changed_pos != -1)
-    activities.at(changed_pos)->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-  return changed_pos;
-}
-
-ssize_t simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count) // XBT_ATTRIB_DEPRECATED_v335
-{
-  if (count == 0)
-    return -1;
-  std::vector<simgrid::kernel::activity::ActivityImpl*> activities;
-  for (size_t i = 0; i < count; i++)
-    activities.push_back(static_cast<simgrid::kernel::activity::ActivityImpl*>(comms[i]));
-
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityTestanySimcall observer{issuer, activities};
-  ssize_t changed_pos = simgrid::kernel::actor::simcall_blocking(
-      [&observer] {
-        simgrid::kernel::activity::ActivityImpl::test_any(observer.get_issuer(), observer.get_activities());
-      },
-      &observer);
-  if (changed_pos != -1)
-    comms[changed_pos]->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-  return changed_pos;
-}
-
-void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(std::isfinite(timeout), "timeout is not finite!");
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::simcall_blocking([issuer, comm, timeout] { comm->wait_for(issuer, timeout); });
-}
-
-bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm) // XBT_ATTRIB_DEPRECATED_v335
-{
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityTestSimcall observer{issuer, comm};
-  if (simgrid::kernel::actor::simcall_blocking([&observer] { observer.get_activity()->test(observer.get_issuer()); },
-                                               &observer)) {
-    comm->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-    return true;
-  }
-  return false;
-}
index 2aa9dbc..4bb9afd 100644 (file)
@@ -86,11 +86,6 @@ const std::vector<std::string>& Engine::get_cmdline() const
   return pimpl_->get_cmdline();
 }
 
-void Engine::shutdown() // XBT_ATTRIB_DEPRECATED_v335
-{
-  delete Engine::instance_;
-}
-
 double Engine::get_clock()
 {
   if (MC_is_active() || MC_record_replay_is_active()) {
index 91da353..62b4b12 100644 (file)
@@ -681,22 +681,6 @@ void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
   simgrid::s4u::Comm::sendto(from, to, byte_amount);
 }
 
-/** @brief Displays debugging information about a host */
-void sg_host_dump(const_sg_host_t host) // XBT_ATTRIB_DEPRECATED_v335
-{
-  XBT_INFO("Displaying host %s", host->get_cname());
-  XBT_INFO("  - speed: %.0f", host->get_speed());
-  XBT_INFO("  - available speed: %.2f", sg_host_get_available_speed(host));
-  const std::unordered_map<std::string, std::string>* props = host->get_properties();
-
-  if (not props->empty()) {
-    XBT_INFO("  - properties:");
-    for (auto const& [key, value] : *props) {
-      XBT_INFO("    %s->%s", key.c_str(), value.c_str());
-    }
-  }
-}
-
 /** @brief Return the list of actors attached to a host.
  *
  * @param host a host
index 52c7828..01e9880 100644 (file)
@@ -6,9 +6,6 @@
 #include "simgrid/engine.h"
 #include <xbt.h>
 
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335)
-#include "simgrid/simix.h" // we don't need it, but someone must check that this file is actually usable in plain C
-
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this test");
 
 int main(int argc, char** argv)
index 9b9aaa8..20baa0b 100644 (file)
@@ -305,8 +305,6 @@ set(NS3_SRC
   )
 
 set(KERNEL_SRC
-  src/deprecated.cpp
-
   src/kernel/EngineImpl.cpp
   src/kernel/EngineImpl.hpp
 
@@ -667,7 +665,6 @@ set(headers_to_install
   include/simgrid/mailbox.h
   include/simgrid/modelchecker.h
   include/simgrid/forward.h
-  include/simgrid/simix.h
   include/simgrid/simix.hpp
   include/simgrid/kernel/ProfileBuilder.hpp
   include/simgrid/kernel/Timer.hpp