From: Arnaud Giersch Date: Fri, 11 Oct 2019 11:59:39 +0000 (+0200) Subject: Remove features marked with XBT_ATTRIB_DEPRECATED_v325. X-Git-Tag: v3.25~547 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a73d204e173f35c0abb92b26e061929066b8b283 Remove features marked with XBT_ATTRIB_DEPRECATED_v325. --- diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 328c0013f7..ee539201ba 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1442,7 +1442,6 @@ PREDEFINED = __cplusplus \ XBT_PRIVATE= \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ - XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v327(m)= \ XBT_ATTRIB_DEPRECATED_v328(m)= diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index c6235c9d65..81e222e3fd 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -41,6 +41,5 @@ PREDEFINED += \ XBT_PRIVATE= \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ - XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v327(m)= \ XBT_ATTRIB_DEPRECATED_v328(m)= diff --git a/docs/source/app_msg.rst b/docs/source/app_msg.rst index daa47e1a54..3b525173be 100644 --- a/docs/source/app_msg.rst +++ b/docs/source/app_msg.rst @@ -111,7 +111,6 @@ Host Management .. doxygenfunction:: MSG_host_get_property_value .. doxygenfunction:: MSG_host_get_pstate .. doxygenfunction:: MSG_host_get_speed -.. doxygenfunction:: MSG_host_is_off .. doxygenfunction:: MSG_host_is_on .. doxygenfunction:: MSG_host_off .. doxygenfunction:: MSG_host_on @@ -155,7 +154,6 @@ Task structure of MSG :cpp:type:`msg_task_t` and associated functions. .. doxygenfunction:: MSG_task_listen_from .. doxygenfunction:: MSG_task_receive .. doxygenfunction:: MSG_task_receive_bounded -.. doxygenfunction:: MSG_task_receive_ext .. doxygenfunction:: MSG_task_receive_ext_bounded .. doxygenfunction:: MSG_task_receive_with_timeout .. doxygenfunction:: MSG_task_receive_with_timeout_bounded @@ -168,7 +166,6 @@ Task structure of MSG :cpp:type:`msg_task_t` and associated functions. .. doxygenfunction:: MSG_task_set_bound .. doxygenfunction:: MSG_task_set_bytes_amount .. doxygenfunction:: MSG_task_set_category -.. doxygenfunction:: MSG_task_set_copy_callback .. doxygenfunction:: MSG_task_set_data .. doxygenfunction:: MSG_task_set_flops_amount .. doxygenfunction:: MSG_task_set_name diff --git a/include/simgrid/host.h b/include/simgrid/host.h index fad40cd22f..5bf5f83963 100644 --- a/include/simgrid/host.h +++ b/include/simgrid/host.h @@ -104,7 +104,6 @@ XBT_PUBLIC void sg_host_set_pstate(sg_host_t host, int pstate); XBT_PUBLIC void sg_host_turn_on(sg_host_t host); XBT_PUBLIC void sg_host_turn_off(sg_host_t host); XBT_PUBLIC int sg_host_is_on(sg_host_t host); -XBT_ATTRIB_DEPRECATED_v325("Please use !sg_host_is_on()") XBT_PUBLIC int sg_host_is_off(sg_host_t host); /** @ingroup m_host_management * @brief Returns a xbt_dict_t consisting of the list of properties assigned to this host diff --git a/include/simgrid/kernel/resource/Resource.hpp b/include/simgrid/kernel/resource/Resource.hpp index ebab496355..9f2c97b720 100644 --- a/include/simgrid/kernel/resource/Resource.hpp +++ b/include/simgrid/kernel/resource/Resource.hpp @@ -60,8 +60,6 @@ public: /** @brief Check if the current Resource is active */ virtual bool is_on() const { return is_on_; } - /** @brief Check if the current Resource is shut down */ - XBT_ATTRIB_DEPRECATED_v325("Please use !is_on()") virtual bool is_off() const { return not is_on_; } /** @brief Turn on the current Resource */ virtual void turn_on() { is_on_ = true; } /** @brief Turn off the current Resource */ @@ -69,11 +67,6 @@ public: /** @brief setup the profile file with states events (ON or OFF). The profile must contain boolean values. */ virtual void set_state_profile(profile::Profile* profile); -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v325("Please use Resource::set_state_profile()") virtual void set_state_trace( - profile::Profile* profile) { set_state_profile(profile); } -#endif - private: std::string name_; Model* model_; diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 60aad3bcba..a481a3283e 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -132,7 +132,6 @@ XBT_PUBLIC void MSG_host_on(sg_host_t h); */ XBT_PUBLIC void MSG_host_off(sg_host_t h); XBT_PUBLIC int MSG_host_is_on(sg_host_t h); -XBT_ATTRIB_DEPRECATED_v325("Please use !MSG_host_is_on()") XBT_PUBLIC int MSG_host_is_off(sg_host_t h); XBT_PUBLIC xbt_dict_t MSG_host_get_properties(sg_host_t host); XBT_PUBLIC const char* MSG_host_get_property_value(sg_host_t host, const char* name); XBT_PUBLIC void MSG_host_set_property_value(sg_host_t host, const char* name, const char* value); @@ -362,10 +361,6 @@ XBT_PUBLIC void MSG_task_set_bytes_amount(msg_task_t task, double bytes_amount); XBT_PUBLIC double MSG_task_get_remaining_communication(msg_task_t task); XBT_PUBLIC double MSG_task_get_bytes_amount(msg_task_t task); -XBT_ATTRIB_DEPRECATED_v325("Getting a task from a specific host is no longer supported." - " Use MSG_task_receive_with_timeout instead.") XBT_PUBLIC msg_error_t - MSG_task_receive_ext(msg_task_t* task, const char* alias, double timeout, msg_host_t host); - XBT_PUBLIC msg_error_t MSG_task_receive_with_timeout(msg_task_t* task, const char* alias, double timeout); XBT_PUBLIC msg_error_t MSG_task_receive(msg_task_t* task, const char* alias); @@ -442,10 +437,6 @@ XBT_PUBLIC void MSG_barrier_destroy(msg_bar_t bar); XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar); /* ****************************************************************************************** */ -/* DO NOT USE this nasty pimple (unless if you're writing a binding) */ -XBT_ATTRIB_DEPRECATED_v325("MSG_process_set_copy_callback is deprecated. Please contact us if you need it.") XBT_PUBLIC - void MSG_task_set_copy_callback(void (*callback)(msg_task_t task, msg_process_t src, msg_process_t dst)); - #ifdef __cplusplus } #endif diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index d584d6dc11..0eda16dc00 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -305,13 +305,6 @@ public: get_properties() const; // FIXME: do not export the map, but only the keys or something const char* get_property(const std::string& key) const; void set_property(const std::string& key, const std::string& value); - -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v325("Please use Actor::on_exit(fun) instead") void on_exit( - const std::function& fun, void* data); - - XBT_ATTRIB_DEPRECATED_v325("Please use Actor::by_pid(pid).kill() instead") static void kill(aid_t pid); -#endif }; /** @ingroup s4u_api @@ -408,15 +401,6 @@ XBT_PUBLIC void parallel_execute(const std::vector& hosts, const std XBT_PUBLIC void parallel_execute(const std::vector& hosts, const std::vector& flops_amounts, const std::vector& bytes_amounts, double timeout); -#ifndef DOXYGEN -XBT_ATTRIB_DEPRECATED_v325("Please use std::vectors as parameters") XBT_PUBLIC - void parallel_execute(int host_nb, s4u::Host* const* host_list, const double* flops_amount, - const double* bytes_amount); -XBT_ATTRIB_DEPRECATED_v325("Please use std::vectors as parameters") XBT_PUBLIC - void parallel_execute(int host_nb, s4u::Host* const* host_list, const double* flops_amount, - const double* bytes_amount, double timeout); -#endif - XBT_PUBLIC ExecPtr exec_init(double flops_amounts); XBT_PUBLIC ExecPtr exec_init(const std::vector& hosts, const std::vector& flops_amounts, const std::vector& bytes_amounts); @@ -469,11 +453,6 @@ XBT_PUBLIC void on_exit(const std::function& fun); XBT_PUBLIC void migrate(Host* new_host); /** @} */ - -#ifndef DOXYGEN -XBT_ATTRIB_DEPRECATED_v325("Please use std::function for first parameter.") XBT_PUBLIC - void on_exit(const std::function& fun, void* data); -#endif } diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index d06da0709f..b066d36c54 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -94,8 +94,6 @@ public: void turn_off(); /** Returns if that host is currently up and running */ bool is_on() const; - /** Returns if that host is currently down and offline */ - XBT_ATTRIB_DEPRECATED_v325("Please use !is_on()") bool is_off() const { return not is_on(); } const char* get_property(const std::string& key) const; void set_property(const std::string& key, const std::string& value); diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp index 8d788edab5..566430e5e2 100644 --- a/include/simgrid/s4u/Link.hpp +++ b/include/simgrid/s4u/Link.hpp @@ -64,24 +64,6 @@ public: bool is_on() const; void turn_off(); -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace( - kernel::profile::Profile* profile) - { - set_state_profile(profile); - } - XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_bandwidth_profile()") void set_bandwidth_trace( - kernel::profile::Profile* profile) - { - set_bandwidth_profile(profile); - } - XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_latency_profile()") void set_latency_trace( - kernel::profile::Profile* profile) - { - set_latency_profile(profile); - } -#endif - /** Setup the profile with states events (ON or OFF). The profile must contain boolean values. */ void set_state_profile(kernel::profile::Profile* profile); /** Setup the profile with bandwidth events (peak speed changes due to external load). diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 296d7071f4..2caec01c63 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -109,25 +109,6 @@ XBT_PUBLIC void SIMIX_function_register(const std::string& name, xbt_main_func_t XBT_PUBLIC void SIMIX_launch_application(const std::string& file); #endif -/*********************************** Host *************************************/ -/* Functions for running a process in main() - * - * 1. create the maestro process - * 2. attach (create a context and wait for maestro to give control back to you) - * 3. do you process job - * 4. detach (this waits for the simulation to terminate) - */ - -#ifdef __cplusplus -XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::attach() or sg_actor_attach()") XBT_PUBLIC smx_actor_t - SIMIX_process_attach(const char* name, void* data, const char* hostname, - std::unordered_map* properties, smx_actor_t parent_process); -#endif -SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::detach() or sg_actor_detach()") XBT_PUBLIC - void SIMIX_process_detach(); -SG_END_DECL() - /********************************* Process ************************************/ SG_BEGIN_DECL() XBT_PUBLIC int SIMIX_process_count(); @@ -135,15 +116,9 @@ XBT_PUBLIC smx_actor_t SIMIX_process_self(); XBT_PUBLIC const char* SIMIX_process_self_get_name(); XBT_PUBLIC void SIMIX_process_self_set_data(void* data); XBT_PUBLIC void* SIMIX_process_self_get_data(); -XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function") XBT_PUBLIC - int SIMIX_process_has_pending_comms(smx_actor_t process); -XBT_ATTRIB_DEPRECATED_v325("Please use SIMIX_process_on_exit(smx_actor_t, const std::function&)") XBT_PUBLIC - void SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data); SG_END_DECL() #ifdef __cplusplus -XBT_ATTRIB_DEPRECATED_v325("Please use SIMIX_process_on_exit(smx_actor_t, const std::function&)") XBT_PUBLIC - void SIMIX_process_on_exit(smx_actor_t process, const std::function& fun, void* data); XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, const std::function& fun); #endif @@ -157,8 +132,6 @@ XBT_PUBLIC void SIMIX_comm_copy_buffer_callback(simgrid::kernel::activity::CommI size_t buff_size); #endif -XBT_ATTRIB_DEPRECATED_v325("Please use CommImpl::finish()") XBT_PUBLIC void SIMIX_comm_finish(smx_activity_t synchro); - /******************************************************************************/ /* SIMIX simcalls */ /******************************************************************************/ @@ -251,28 +224,4 @@ SG_BEGIN_DECL() XBT_PUBLIC int simcall_mc_random(int min, int max); SG_END_DECL() -/***************************** DEPRECATED CALLS ****************************/ -SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v325("Please use sg_actor_set_kill_time()") XBT_PUBLIC - void simcall_process_set_kill_time(smx_actor_t process, double kill_time); - -XBT_ATTRIB_DEPRECATED_v325("Please use Comm::cancel()") XBT_PUBLIC void simcall_comm_cancel(smx_activity_t comm); - -XBT_ATTRIB_DEPRECATED_v325("Please use Exec::cancel()") XBT_PUBLIC - void simcall_execution_cancel(smx_activity_t execution); -XBT_ATTRIB_DEPRECATED_v325("Please use Exec::set_bound()") XBT_PUBLIC - void simcall_execution_set_bound(smx_activity_t execution, double bound); -SG_END_DECL() - -#ifdef __cplusplus -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 sharing_penalty, 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 diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 9539451154..3fda606f86 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -95,9 +95,6 @@ template R simcall_blocking(F&& code, mc::SimcallInspector* t namespace simgrid { namespace simix { -XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function") - XBT_PUBLIC const std::vector& process_get_runnable(); - // What's executed as SIMIX actor code: typedef std::function ActorCode; @@ -127,18 +124,6 @@ public: return set(date, simgrid::xbt::Task(std::move(callback))); } - template - XBT_ATTRIB_DEPRECATED_v325("Please use a lambda or std::bind") static inline Timer* set(double date, - R (*callback)(T*), T* arg) - { - return set(date, std::bind(callback, arg)); - } - - XBT_ATTRIB_DEPRECATED_v325("Please use a lambda or std::bind") static Timer* set(double date, void (*callback)(void*), - void* arg) - { - return set(date, std::bind(callback, arg)); - } static Timer* set(double date, simgrid::xbt::Task&& callback); static double next() { return simix_timers.empty() ? -1.0 : simix_timers.top().first; } }; @@ -150,7 +135,4 @@ XBT_PUBLIC smx_actor_t simcall_process_create(const std::string& name, const sim void* data, sg_host_t host, std::unordered_map* properties); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::xbt::Timer::set") XBT_PUBLIC smx_timer_t - SIMIX_timer_set(double date, simgrid::xbt::Task&& callback); - #endif diff --git a/include/xbt/base.h b/include/xbt/base.h index 871debae61..e040779755 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -68,8 +68,6 @@ #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg))) #endif -#define XBT_ATTRIB_DEPRECATED_v325(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.25)") /* Will be dropped in v3.25 */ #define XBT_ATTRIB_DEPRECATED_v327(mesg) \ XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.27)") /* Will be dropped in v3.27 */ #define XBT_ATTRIB_DEPRECATED_v328(mesg) \ diff --git a/include/xbt/config.h b/include/xbt/config.h index 486c5f7305..c1b7fbcda9 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -64,15 +64,6 @@ typedef void* xbt_cfg_t; SG_BEGIN_DECL() /* Set the value of the cell @a name in @a cfg with the provided value.*/ -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value or sg_cfg_set_int") XBT_PUBLIC - void xbt_cfg_set_int(const char* name, int val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value or sg_cfg_set_double") XBT_PUBLIC - void xbt_cfg_set_double(const char* name, double val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value or sg_cfg_set_boolean") XBT_PUBLIC - void xbt_cfg_set_boolean(const char* name, const char* val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_valueor sg_cfg_set_string") XBT_PUBLIC - void xbt_cfg_set_string(const char* name, const char* val); - XBT_PUBLIC void sg_cfg_set_int(const char* name, int val); XBT_PUBLIC void sg_cfg_set_double(const char* name, double val); XBT_PUBLIC void sg_cfg_set_boolean(const char* name, const char* val); @@ -103,13 +94,6 @@ typedef void (*xbt_cfg_cb_t)(const char* name); * @{ */ -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value or sg_cfg_get_int") XBT_PUBLIC - int xbt_cfg_get_int(const char* name); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value or sg_cfg_get_double") XBT_PUBLIC - double xbt_cfg_get_double(const char* name); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value or sg_cfg_get_boolean") XBT_PUBLIC - int xbt_cfg_get_boolean(const char* name); - XBT_PUBLIC int sg_cfg_get_int(const char* name); XBT_PUBLIC double sg_cfg_get_double(const char* name); XBT_PUBLIC int sg_cfg_get_boolean(const char* name); diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index a599e878da..8ac6401d3b 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -37,17 +37,6 @@ smx_actor_t SIMIX_process_self() return (self_context != nullptr) ? self_context->get_actor() : nullptr; } -/** - * @brief Returns whether a process has pending asynchronous communications. - * @return true if there are asynchronous communications in this process - * @deprecated - */ -int SIMIX_process_has_pending_comms(smx_actor_t process) -{ - - return process->comms.size() > 0; -} - namespace simgrid { namespace kernel { namespace actor { @@ -540,18 +529,6 @@ void create_maestro(const std::function& code) } // namespace kernel } // namespace simgrid -void SIMIX_process_detach() // deprecated v3.25 -{ - simgrid::kernel::actor::ActorImpl::detach(); -} - -smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostname, - std::unordered_map* properties, - smx_actor_t /*parent_process*/) // deprecated 3.25 -{ - return simgrid::kernel::actor::ActorImpl::attach(name, data, sg_host_by_name(hostname), properties).get(); -} - int SIMIX_process_count() { return simix_global->process_list.size(); @@ -592,14 +569,6 @@ const char* SIMIX_process_self_get_name() * @param self the current process */ -/** @brief Returns the list of processes to run. - * @deprecated - */ -const std::vector& simgrid::simix::process_get_runnable() -{ - return simix_global->actors_to_run; -} - /** @brief Returns the process from PID. */ smx_actor_t SIMIX_process_from_PID(aid_t PID) { @@ -613,19 +582,6 @@ smx_actor_t SIMIX_process_from_PID(aid_t PID) return item->second; } -void SIMIX_process_on_exit(smx_actor_t actor, int_f_pvoid_pvoid_t fun, void* data) -{ - SIMIX_process_on_exit(actor, [fun, data](bool failed) { - intptr_t status = failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS; - fun(reinterpret_cast(status), data); - }); -} - -void SIMIX_process_on_exit(smx_actor_t actor, const std::function& fun, void* data) -{ - SIMIX_process_on_exit(actor, [fun, data](bool failed) { fun(failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS, data); }); -} - void SIMIX_process_on_exit(smx_actor_t actor, const std::function& fun) { xbt_assert(actor, "current process not found: are you in maestro context ?"); diff --git a/src/msg/msg_comm.cpp b/src/msg/msg_comm.cpp index 3bbc4c3a8b..c386327e38 100644 --- a/src/msg/msg_comm.cpp +++ b/src/msg/msg_comm.cpp @@ -224,21 +224,3 @@ msg_task_t MSG_comm_get_task(msg_comm_t comm) return comm->task_received ? *comm->task_received : comm->task_sent; } - -/** - * @brief This function is called by SIMIX in kernel mode to copy the data of a comm. - * @param comm the comm - * @param buff the data copied - * @param buff_size size of the buffer - */ -// deprecated but used by MSG_set_copy_callback. Should be removed in v325 -void MSG_comm_copy_data_from_SIMIX(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size) -{ - SIMIX_comm_copy_pointer_callback(comm, buff, buff_size); - - // notify the user callback if any - if (msg_global->task_copy_callback) { - msg_task_t task = static_cast(buff); - msg_global->task_copy_callback(task, comm->src_actor_->ciface(), comm->dst_actor_->ciface()); - } -} diff --git a/src/msg/msg_legacy.cpp b/src/msg/msg_legacy.cpp index cd258f3cd1..344a8f936b 100644 --- a/src/msg/msg_legacy.cpp +++ b/src/msg/msg_legacy.cpp @@ -332,10 +332,6 @@ int MSG_host_is_on(sg_host_t h) { return sg_host_is_on(h); } -int MSG_host_is_off(sg_host_t h) // deprecated -{ - return not sg_host_is_on(h); -} xbt_dict_t MSG_host_get_properties(sg_host_t host) { return sg_host_get_properties(host); diff --git a/src/msg/msg_private.hpp b/src/msg/msg_private.hpp index 13f17f4973..35c3ee5d81 100644 --- a/src/msg/msg_private.hpp +++ b/src/msg/msg_private.hpp @@ -125,6 +125,5 @@ struct MSG_Global_t { XBT_PUBLIC_DATA MSG_Global_t* msg_global; /*************************************************************/ -XBT_PRIVATE void MSG_comm_copy_data_from_SIMIX(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size); #endif diff --git a/src/msg/msg_task.cpp b/src/msg/msg_task.cpp index 97a7f3f754..b83396b648 100644 --- a/src/msg/msg_task.cpp +++ b/src/msg/msg_task.cpp @@ -252,21 +252,6 @@ void MSG_task_set_data(msg_task_t task, void *data) task->set_user_data(data); } -/** @brief Sets a function to be called when a task has just been copied. - * @param callback a callback function - */ -// deprecated -void MSG_task_set_copy_callback(void (*callback) (msg_task_t task, msg_process_t sender, msg_process_t receiver)) { - - msg_global->task_copy_callback = callback; - - if (callback) { - SIMIX_comm_set_copy_data_callback(MSG_comm_copy_data_from_SIMIX); - } else { - SIMIX_comm_set_copy_data_callback(SIMIX_comm_copy_pointer_callback); - } -} - /** @brief Returns the sender of the given task */ msg_process_t MSG_task_get_sender(msg_task_t task) { @@ -557,28 +542,6 @@ msg_error_t MSG_task_receive_with_timeout_bounded(msg_task_t* task, const char* return MSG_task_receive_ext_bounded(task, alias, timeout, nullptr, rate); } -/** - * @brief Receives a task from a mailbox from a specific host with a given timeout. - * - * This is a blocking function with a timeout, the execution flow will be blocked until the task is received or the - * timeout is achieved. See #MSG_task_irecv for receiving tasks asynchronously. You can provide a -1 timeout - * to obtain an infinite timeout. - * - * @param task a memory location for storing a #msg_task_t. - * @param alias name of the mailbox to receive the task from - * @param timeout is the maximum wait time for completion (provide -1 for no timeout) - * @param host a #msg_host_t host from where the task was sent - * - * @return Returns - * #MSG_OK if the task was successfully received, - * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise. - */ -msg_error_t MSG_task_receive_ext(msg_task_t* task, const char* alias, double timeout, msg_host_t host) -{ - XBT_DEBUG("MSG_task_receive_ext: Trying to receive a message on mailbox '%s'", alias); - return MSG_task_receive_ext_bounded(task, alias, timeout, host, -1.0); -} - /** * @brief Receives a task from a mailbox from a specific host with a given timeout and at a given rate. * diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 7187920c3b..5859a097b6 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -120,11 +120,6 @@ void Actor::set_auto_restart(bool autorestart) }); } -void Actor::on_exit(const std::function& fun, void* data) /* deprecated */ -{ - on_exit([fun, data](bool failed) { fun(failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS, data); }); -} - void Actor::on_exit(const std::function& fun) const { kernel::actor::simcall([this, &fun] { SIMIX_process_on_exit(pimpl_, fun); }); @@ -220,19 +215,6 @@ double Actor::get_kill_time() return pimpl_->get_kill_time(); } -void Actor::kill(aid_t pid) // deprecated -{ - kernel::actor::ActorImpl* killer = SIMIX_process_self(); - kernel::actor::ActorImpl* victim = SIMIX_process_from_PID(pid); - if (victim != nullptr) { - kernel::actor::simcall([killer, victim] { killer->kill(victim); }); - } else { - std::ostringstream oss; - oss << "kill: (" << pid << ") - No such actor" << std::endl; - throw std::runtime_error(oss.str()); - } -} - void Actor::kill() { kernel::actor::ActorImpl* process = SIMIX_process_self(); @@ -375,27 +357,6 @@ void parallel_execute(const std::vector& hosts, const std::vectorset_timeout(timeout)->wait(); } -// deprecated -void parallel_execute(int host_nb, s4u::Host* const* host_list, const double* flops_amount, const double* bytes_amount, - double timeout) -{ - smx_activity_t s = - simcall_execution_parallel_start("", host_nb, host_list, flops_amount, bytes_amount, /* rate */ -1, timeout); - simcall_execution_wait(s); - delete[] flops_amount; - delete[] bytes_amount; -} - -// deprecated -void parallel_execute(int host_nb, s4u::Host* const* host_list, const double* flops_amount, const double* bytes_amount) -{ - smx_activity_t s = simcall_execution_parallel_start("", host_nb, host_list, flops_amount, bytes_amount, - /* rate */ -1, /*timeout*/ -1); - simcall_execution_wait(s); - delete[] flops_amount; - delete[] bytes_amount; -} - ExecPtr exec_init(double flops_amount) { return ExecPtr(new ExecSeq(get_host(), flops_amount)); @@ -464,11 +425,6 @@ void on_exit(const std::function& fun) SIMIX_process_self()->iface()->on_exit(fun); } -void on_exit(const std::function& fun, void* data) /* deprecated */ -{ - SIMIX_process_self()->iface()->on_exit([fun, data](bool exit) { fun(exit, data); }); -} - /** @brief Moves the current actor to another host * * @see simgrid::s4u::Actor::migrate() for more information diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index 5cb23b1611..1d89a9e811 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -542,12 +542,6 @@ int sg_host_is_on(sg_host_t host) return host->is_on(); } -/** @deprecated */ -int sg_host_is_off(sg_host_t host) -{ - return not host->is_on(); -} - /** @brief Get the properties of a host */ xbt_dict_t sg_host_get_properties(sg_host_t host) { diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index c25eee73ef..49d76b5f68 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -340,94 +340,3 @@ void unblock(smx_actor_t actor) } } // namespace simix } // namespace simgrid - -/* ****************************DEPRECATED CALLS******************************* */ -void simcall_process_set_kill_time(smx_actor_t process, double kill_time) -{ - simgrid::kernel::actor::simcall([process, kill_time] { process->set_kill_time(kill_time); }); -} -void simcall_comm_cancel(smx_activity_t comm) -{ - simgrid::kernel::actor::simcall( - [comm] { boost::static_pointer_cast(comm)->cancel(); }); -} -void simcall_execution_cancel(smx_activity_t exec) -{ - simgrid::kernel::actor::simcall( - [exec] { boost::static_pointer_cast(exec)->cancel(); }); -} - -void simcall_execution_set_bound(smx_activity_t exec, double bound) -{ - simgrid::kernel::actor::simcall( - [exec, bound] { boost::static_pointer_cast(exec)->set_bound(bound); }); -} - -// deprecated -smx_activity_t simcall_execution_start(const std::string& name, const std::string& category, double flops_amount, - double sharing_penalty, double bound, sg_host_t host) -{ - return simgrid::kernel::actor::simcall([name, category, flops_amount, sharing_penalty, bound, host] { - simgrid::kernel::activity::ExecImpl* exec = new simgrid::kernel::activity::ExecImpl(); - (*exec) - .set_name(name) - .set_tracing_category(category) - .set_host(host) - .set_sharing_penalty(sharing_penalty) - .set_bound(bound) - .set_flops_amount(flops_amount) - .start(); - return simgrid::kernel::activity::ExecImplPtr(exec); - }); -} - -// 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(host_list[0])); - for (int i = 1; i < host_nb; i++) { - bool tmp_is_a_vm = (nullptr != dynamic_cast(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 hosts(host_list, host_list + host_nb); - std::vector flops_parallel_amount; - std::vector bytes_parallel_amount; - if (flops_amount != nullptr) - flops_parallel_amount = std::vector(flops_amount, flops_amount + host_nb); - if (bytes_amount != nullptr) - bytes_parallel_amount = std::vector(bytes_amount, bytes_amount + host_nb * host_nb); - return simgrid::kernel::actor::simcall([name, hosts, flops_parallel_amount, bytes_parallel_amount, timeout] { - simgrid::kernel::activity::ExecImpl* exec = new simgrid::kernel::activity::ExecImpl(); - (*exec) - .set_name(name) - .set_hosts(hosts) - .set_timeout(timeout) - .set_flops_amounts(flops_parallel_amount) - .set_bytes_amounts(bytes_parallel_amount) - .start(); - return simgrid::kernel::activity::ExecImplPtr(exec); - }); -} - -// deprecated -void SIMIX_comm_finish(smx_activity_t synchro) -{ - boost::static_pointer_cast(synchro)->finish(); -} diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 7414de1529..fbde8a5ef9 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -542,11 +542,6 @@ smx_timer_t SIMIX_timer_set(double date, void (*callback)(void*), void *arg) return simgrid::simix::Timer::set(date, std::bind(callback, arg)); } -smx_timer_t SIMIX_timer_set(double date, simgrid::xbt::Task&& callback) // deprecated -{ - return simgrid::simix::Timer::set(date, std::move(callback)); -} - /** @brief cancels a timer that was added earlier */ void SIMIX_timer_remove(smx_timer_t timer) { timer->remove(); diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index e51a1ba34f..32c74e62eb 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -497,11 +497,6 @@ void help() * @param key the name of the variable * @param value the value of the variable */ -void xbt_cfg_set_int(const char *key, int value) -{ - sg_cfg_set_int(key, value); -} - void sg_cfg_set_int(const char* key, int value) { (*simgrid_config)[key].set_value(value); @@ -512,11 +507,6 @@ void sg_cfg_set_int(const char* key, int value) * @param key the name of the variable * @param value the double to set */ -void xbt_cfg_set_double(const char *key, double value) -{ - sg_cfg_set_double(key, value); -} - void sg_cfg_set_double(const char* key, double value) { (*simgrid_config)[key].set_value(value); @@ -528,11 +518,6 @@ void sg_cfg_set_double(const char* key, double value) * @param value the value to be added * */ -void xbt_cfg_set_string(const char* key, const char* value) -{ - sg_cfg_set_string(key, value); -} - void sg_cfg_set_string(const char* key, const char* value) { (*simgrid_config)[key].set_value(value); @@ -543,11 +528,6 @@ void sg_cfg_set_string(const char* key, const char* value) * @param key the name of the variable * @param value the value of the variable */ -void xbt_cfg_set_boolean(const char *key, const char *value) -{ - sg_cfg_set_boolean(key, value); -} - void sg_cfg_set_boolean(const char* key, const char* value) { (*simgrid_config)[key].set_value(simgrid::config::parse_bool(value)); @@ -560,11 +540,6 @@ void sg_cfg_set_boolean(const char* key, const char* value) * * Returns the first value from the config set under the given name. */ -int xbt_cfg_get_int(const char *key) -{ - return sg_cfg_get_int(key); -} - int sg_cfg_get_int(const char* key) { return (*simgrid_config)[key].get_value(); @@ -576,11 +551,6 @@ int sg_cfg_get_int(const char* key) * * Returns the first value from the config set under the given name. */ -double xbt_cfg_get_double(const char *key) -{ - return sg_cfg_get_double(key); -} - double sg_cfg_get_double(const char* key) { return (*simgrid_config)[key].get_value(); @@ -593,11 +563,6 @@ double sg_cfg_get_double(const char* key) * Returns the first value from the config set under the given name. * If there is more than one value, it will issue a warning. */ -int xbt_cfg_get_boolean(const char *key) -{ - return sg_cfg_get_boolean(key); -} - int sg_cfg_get_boolean(const char* key) { return (*simgrid_config)[key].get_value() ? 1 : 0;