From: Arnaud Giersch Date: Tue, 25 Jun 2019 14:25:13 +0000 (+0200) Subject: Remove features marked with DEPRECATED_v324. X-Git-Tag: v3.23.2~70 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d2d907185a41d4e59e9f4eaa7d42700ea9483140?ds=sidebyside Remove features marked with DEPRECATED_v324. --- diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 40bde05557..b641cb438e 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_v324(m)= \ XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v327(m)= diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index 7165a2aa40..509c698abe 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -40,6 +40,5 @@ PREDEFINED += \ XBT_PRIVATE= \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ - XBT_ATTRIB_DEPRECATED_v324(m)= \ XBT_ATTRIB_DEPRECATED_v325(m)= \ XBT_ATTRIB_DEPRECATED_v327(m)= diff --git a/include/simgrid/Exception.hpp b/include/simgrid/Exception.hpp index 0012ee0de7..685f36deb9 100644 --- a/include/simgrid/Exception.hpp +++ b/include/simgrid/Exception.hpp @@ -87,6 +87,7 @@ private: * @ref WithContextException base class. We should deprecate it and replace it * with either C++ different exceptions or `std::system_error` which already * provides this (category + error code) logic. + * TODO ^^ * * @ingroup XBT_ex_c */ diff --git a/include/simgrid/s4u/Activity.hpp b/include/simgrid/s4u/Activity.hpp index de5b14adba..a464c20643 100644 --- a/include/simgrid/s4u/Activity.hpp +++ b/include/simgrid/s4u/Activity.hpp @@ -94,10 +94,6 @@ public: kernel::activity::ActivityImpl* get_impl() const { return pimpl_.get(); } -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v324("Please use Activity::wait_for()") virtual void wait(double timeout) = 0; -#endif - private: kernel::activity::ActivityImplPtr pimpl_ = nullptr; Activity::State state_ = Activity::State::INITED; diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 141a49fd34..3c12abccc6 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -464,9 +464,6 @@ 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); - -/** @deprecated See this_actor::exit() */ -XBT_ATTRIB_DEPRECATED_v324("Please use this_actor::exit()") XBT_PUBLIC void kill(); #endif } diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index 467dd88971..8f767a33e9 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -122,10 +122,6 @@ public: size_t get_dst_data_size(); Actor* get_sender(); - -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v324("Please use Comm::wait_for()") void wait(double t) override { wait_for(t); } -#endif }; } // namespace s4u } // namespace simgrid diff --git a/include/simgrid/s4u/Exec.hpp b/include/simgrid/s4u/Exec.hpp index 6515064b1b..6aeb5fc76a 100644 --- a/include/simgrid/s4u/Exec.hpp +++ b/include/simgrid/s4u/Exec.hpp @@ -68,8 +68,6 @@ public: Exec* cancel() override; const std::string& get_name() const { return name_; } const char* get_cname() const { return name_.c_str(); } - - XBT_ATTRIB_DEPRECATED_v324("Please use Exec::wait_for()") void wait(double t) override { wait_for(t); } }; class XBT_PUBLIC ExecSeq : public Exec { diff --git a/include/simgrid/s4u/Io.hpp b/include/simgrid/s4u/Io.hpp index 50cf48d0ed..d486b342f1 100644 --- a/include/simgrid/s4u/Io.hpp +++ b/include/simgrid/s4u/Io.hpp @@ -50,10 +50,6 @@ public: double get_remaining() override; sg_size_t get_performed_ioops(); - -#ifndef DOXYGEN - XBT_ATTRIB_DEPRECATED_v324("Please use Io::wait_for()") void wait(double t) override { wait_for(t); } -#endif }; } // namespace s4u diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index ba069df692..303093b2c6 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -94,18 +94,8 @@ XBT_PUBLIC double SIMIX_timer_get_date(smx_timer_t timer); XBT_PUBLIC void SIMIX_display_process_status(); SG_END_DECL() -/******************************* Environment **********************************/ -SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v324("Please use simgrid_load_platform()") XBT_PUBLIC - void SIMIX_create_environment(const char* file); -SG_END_DECL() - /******************************** Deployment **********************************/ SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v324("Please use simgrid_register_function()") XBT_PUBLIC - void SIMIX_function_register(const char* name, xbt_main_func_t code); -XBT_ATTRIB_DEPRECATED_v324("Please use simgrid_load_deployment()") XBT_PUBLIC - void SIMIX_launch_application(const char* file); XBT_PUBLIC void SIMIX_function_register_default(xbt_main_func_t code); XBT_PUBLIC void SIMIX_init_application(); @@ -187,9 +177,6 @@ XBT_PUBLIC bool simcall_execution_test(const smx_activity_t& execution); /**************************** Process simcalls ********************************/ SG_BEGIN_DECL() -XBT_ATTRIB_DEPRECATED_v324("Please use ActorImpl::throw_exception") XBT_PUBLIC - void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char* mesg); - void simcall_process_set_data(smx_actor_t process, void* data); /* Process handling */ XBT_PUBLIC void simcall_process_suspend(smx_actor_t process); diff --git a/include/smpi/mpif.h.in b/include/smpi/mpif.h.in index a482089386..96f726cb96 100644 --- a/include/smpi/mpif.h.in +++ b/include/smpi/mpif.h.in @@ -283,5 +283,6 @@ double precision smpi_get_host_power_peak_at double precision smpi_get_host_current_power_peak integer smpi_get_host_nb_pstates + integer smpi_get_host_pstate double precision smpi_get_host_consumed_energy @MODULE_MPIF_OUT@ diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 8b0e629a85..309804ac9e 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -975,16 +975,6 @@ XBT_PUBLIC void smpi_execute_flops(double flops); XBT_PUBLIC void smpi_execute(double duration); XBT_PUBLIC void smpi_execute_benched(double duration); -// PLEASE NOTE: If you remove these functions, the entire smpi_dvfs.cpp file can be removed as well!! -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate_speed(sg_host_self(), pstate_index) instead") XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index); -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_speed(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_current_power_peak(); -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_nb_pstates(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_nb_pstates(); -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_set_pstate(sg_host_self(), pstate_index) instead") XBT_PUBLIC void smpi_set_host_pstate(int pstate_index); -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_pstate(); - -XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_consumed_energy(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_consumed_energy(); - - XBT_PUBLIC unsigned long long smpi_rastro_resolution(); XBT_PUBLIC unsigned long long smpi_rastro_timestamp(); XBT_PUBLIC void smpi_sample_1(int global, const char* file, int line, int iters, double threshold); diff --git a/include/xbt/base.h b/include/xbt/base.h index 3b71784562..8c934d2a33 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -71,8 +71,6 @@ #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg))) #endif -#define XBT_ATTRIB_DEPRECATED_v324(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.24)") /* Will be dropped in v3.24 */ #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) \ diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index c42d015b59..ab52d77f95 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -528,16 +528,6 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn return simgrid::kernel::actor::ActorImpl::attach(name, data, sg_host_by_name(hostname), properties).get(); } -/** @deprecated When this function gets removed, also remove the xbt_ex class, that is only there to help users to - * transition */ -void SIMIX_process_throw(smx_actor_t actor, xbt_errcat_t cat, int value, const char* msg) -{ - xbt_ex e(XBT_THROW_POINT, msg); - e.category = cat; - e.value = value; - actor->throw_exception(std::make_exception_ptr(e)); -} - void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t actor) { smx_activity_t sync_suspend = actor->suspend(simcall->issuer); diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 7a66c4be67..0db6b20759 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -442,11 +442,6 @@ void migrate(Host* new_host) SIMIX_process_self()->iface()->migrate(new_host); } -void kill() /* deprecated */ -{ - exit(); -} - } // namespace this_actor } // namespace s4u } // namespace simgrid diff --git a/src/simix/smx_deployment.cpp b/src/simix/smx_deployment.cpp index 2f2ff22f17..78196650e2 100644 --- a/src/simix/smx_deployment.cpp +++ b/src/simix/smx_deployment.cpp @@ -56,11 +56,6 @@ void SIMIX_launch_application(const std::string& file) } } -void SIMIX_launch_application(const char* file) // deprecated -{ - simgrid_load_deployment(file); -} - // Wrap a main() function into a ActorCodeFactory: static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code) { @@ -88,11 +83,6 @@ void SIMIX_function_register(const std::string& name, void (*code)(std::vectorregistered_functions[name] = toActorCodeFactory(code); } -void SIMIX_function_register(const char* name, xbt_main_func_t code) // deprecated -{ - simgrid_register_function(name, code); -} - /** * @brief Registers a #xbt_main_func_t code as default value. * diff --git a/src/simix/smx_environment.cpp b/src/simix/smx_environment.cpp deleted file mode 100644 index e7f2c291f5..0000000000 --- a/src/simix/smx_environment.cpp +++ /dev/null @@ -1,12 +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 -#include - -void SIMIX_create_environment(const char* file) // XBT_ATTRIB_DEPRECATED_v324 -{ - simgrid_load_platform(file); -} diff --git a/src/smpi/internals/smpi_dvfs.cpp b/src/smpi/internals/smpi_dvfs.cpp index 85a4cc18be..1347c247a8 100644 --- a/src/smpi/internals/smpi_dvfs.cpp +++ b/src/smpi/internals/smpi_dvfs.cpp @@ -14,7 +14,16 @@ #include "src/internal_config.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi, "Logging specific to SMPI (experimental DVFS support)"); +#if SMPI_FORTRAN + +// FIXME: rework these bindings, or kill them completely + +#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) +typedef int integer; +#else +typedef long int integer; +#endif +typedef double doublereal; /** * @brief Return the speed of the processor (in flop/s) at a given pstate @@ -22,9 +31,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi, "Logging specific to SMPI (expe * @param pstate_index pstate to test * @return Returns the processor speed associated with pstate_index */ -double smpi_get_host_power_peak_at(int pstate_index) +extern "C" XBT_PUBLIC doublereal smpi_get_host_power_peak_at_(integer* pstate_index); +doublereal smpi_get_host_power_peak_at_(integer *pstate_index) { - return sg_host_self()->get_pstate_speed(pstate_index); + return static_cast(sg_host_self()->get_pstate_speed(static_cast(*pstate_index))); } /** @@ -32,17 +42,19 @@ double smpi_get_host_power_peak_at(int pstate_index) * * @return Returns the current processor speed */ -double smpi_get_host_current_power_peak() +extern "C" XBT_PUBLIC doublereal smpi_get_host_current_power_peak_(); +doublereal smpi_get_host_current_power_peak_() { - return sg_host_self()->get_speed(); + return static_cast(sg_host_self()->get_speed()); } /** * @brief Return the number of pstates defined for the current host */ -int smpi_get_host_nb_pstates() +extern "C" XBT_PUBLIC integer smpi_get_host_nb_pstates_(); +integer smpi_get_host_nb_pstates_() { - return sg_host_get_nb_pstates(sg_host_self()); + return static_cast(sg_host_self()->get_pstate_count()); } /** @@ -50,57 +62,25 @@ int smpi_get_host_nb_pstates() * * @param pstate_index pstate to switch to */ -void smpi_set_host_pstate(int pstate_index) +extern "C" XBT_PUBLIC void smpi_set_host_pstate_(integer* pstate_index); +void smpi_set_host_pstate_(integer *pstate_index) { - sg_host_set_pstate(sg_host_self(), pstate_index); -} -/** @brief Gets the pstate at which the processor currently running */ -int smpi_get_host_pstate() { - return sg_host_get_pstate(sg_host_self()); + sg_host_set_pstate(sg_host_self(), (static_cast(*pstate_index))); } +/** + * @brief Gets the pstate at which the processor currently running + */ +extern "C" XBT_PUBLIC integer smpi_get_host_pstate_(); +integer smpi_get_host_pstate_() +{ + return static_cast(sg_host_get_pstate(sg_host_self())); +} /** * @brief Return the total energy consumed by a host (in Joules) * * @return Returns the consumed energy */ -double smpi_get_host_consumed_energy() { - return sg_host_get_consumed_energy(sg_host_self()); -} - -#if SMPI_FORTRAN - -#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) -typedef int integer; -#else -typedef long int integer; -#endif -typedef double doublereal; - -extern "C" XBT_PUBLIC doublereal smpi_get_host_power_peak_at_(integer* pstate_index); -doublereal smpi_get_host_power_peak_at_(integer *pstate_index) -{ - return static_cast(sg_host_self()->get_pstate_speed((int)*pstate_index)); -} - -extern "C" XBT_PUBLIC doublereal smpi_get_host_current_power_peak_(); -doublereal smpi_get_host_current_power_peak_() -{ - return sg_host_self()->get_speed(); -} - -extern "C" XBT_PUBLIC integer smpi_get_host_nb_pstates_(); -integer smpi_get_host_nb_pstates_() -{ - return static_cast(sg_host_self()->get_pstate_count()); -} - -extern "C" XBT_PUBLIC void smpi_set_host_pstate_(integer* pstate_index); -void smpi_set_host_pstate_(integer *pstate_index) -{ - sg_host_set_pstate(sg_host_self(), (static_cast(*pstate_index))); -} - extern "C" XBT_PUBLIC doublereal smpi_get_host_consumed_energy_(); doublereal smpi_get_host_consumed_energy_() { diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 45cf59a74f..a2b3c1c127 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -389,7 +389,6 @@ set(SIMIX_SRC src/kernel/context/ContextThread.cpp src/kernel/context/ContextThread.hpp src/simix/smx_deployment.cpp - src/simix/smx_environment.cpp src/simix/smx_global.cpp src/simix/popping.cpp src/kernel/activity/ActivityImpl.cpp