From: Arnaud Giersch Date: Tue, 27 Jun 2023 06:46:56 +0000 (+0200) Subject: Remove deprecated features for next release (3.35). X-Git-Tag: v3.35~178^2~8 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/04e36999261b79d41c11a5c004c6c5e667a94a34 Remove deprecated features for next release (3.35). --- diff --git a/MANIFEST.in b/MANIFEST.in index 76abec2d71..069d5896a6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index 7237a505fb..4e35aad538 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -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)= diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index f39ff67466..d458ddc060 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -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; diff --git a/include/simgrid/host.h b/include/simgrid/host.h index e828dced4f..57c0a94f0c 100644 --- a/include/simgrid/host.h +++ b/include/simgrid/host.h @@ -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 diff --git a/include/simgrid/s4u/Engine.hpp b/include/simgrid/s4u/Engine.hpp index 46f7ae204c..d92987dfa5 100644 --- a/include/simgrid/s4u/Engine.hpp +++ b/include/simgrid/s4u/Engine.hpp @@ -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 index aa70ca6b87..0000000000 --- a/include/simgrid/simix.h +++ /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 - -// 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 diff --git a/include/xbt/base.h b/include/xbt/base.h index e17f19da91..7f39cc7df7 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -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 index 0881f549b8..0000000000 --- a/src/deprecated.cpp +++ /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 - -#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335) -#include - -#include - -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(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(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 activities; - for (size_t i = 0; i < count; i++) - activities.push_back(static_cast(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 activities; - for (size_t i = 0; i < count; i++) - activities.push_back(static_cast(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; -} diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index 2aa9dbcf0f..4bb9afddc2 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -86,11 +86,6 @@ const std::vector& 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()) { diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 91da3536e1..62b4b121b8 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -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* 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 diff --git a/teshsuite/xbt/cmdline/cmdline.c b/teshsuite/xbt/cmdline/cmdline.c index 52c7828a36..01e988087a 100644 --- a/teshsuite/xbt/cmdline/cmdline.c +++ b/teshsuite/xbt/cmdline/cmdline.c @@ -6,9 +6,6 @@ #include "simgrid/engine.h" #include -#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) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 9b9aaa8e06..20baa0b82e 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -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