From: Arnaud Giersch Date: Fri, 24 Apr 2020 22:14:01 +0000 (+0200) Subject: Kill obsolete option --cfg=contexts/parallel-threshold. X-Git-Tag: v3.26~648 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/24c1752e17da13d99d02faa833bf2397a56c12af Kill obsolete option --cfg=contexts/parallel-threshold. The associated code was removed 4 years ago by commit 9ed461c11fd10eeea596831f2791e359c05d26bf "kill more old cruft: adaptative threshold". --- diff --git a/ChangeLog b/ChangeLog index 9198b0d20f..4f77382963 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,9 @@ C interface: - Many MSG tests were converted to the new S4U's interface in C, that was extended for that. +Simix: + - Remove obsolete option --cfg=contexts/parallel-threshold. + Fixed bugs (FG#.. -> FramaGit bugs; FG!.. -> FG merge requests) (FG: issues on Framagit; GF: issues on GForge; GH: issues on GitHub) - FG#41: Add sg_actor_create C interface @@ -562,7 +565,7 @@ Plugins: - Rename Energy plugin into host_energy - Rename Load plugin into host_load -simix: +Simix: - Add parameter --cfg=simix/breakpoint to raise a SIGTRAP at given time. - kill simix::onDeadlock() that was somewhat dupplicating s4u::on_deadlock() - Improve performance when handling timeouts of simix synchros. diff --git a/docs/source/Configuring_SimGrid.rst b/docs/source/Configuring_SimGrid.rst index 17654ef962..e3689ec53a 100644 --- a/docs/source/Configuring_SimGrid.rst +++ b/docs/source/Configuring_SimGrid.rst @@ -87,7 +87,6 @@ Existing Configuration Items - **contexts/factory:** :ref:`cfg=contexts/factory` - **contexts/guard-size:** :ref:`cfg=contexts/guard-size` - **contexts/nthreads:** :ref:`cfg=contexts/nthreads` -- **contexts/parallel-threshold:** :ref:`cfg=contexts/parallel-threshold` - **contexts/stack-size:** :ref:`cfg=contexts/stack-size` - **contexts/synchro:** :ref:`cfg=contexts/synchro` @@ -832,7 +831,6 @@ on other parts of the memory if their size is too small for the application. .. _cfg=contexts/nthreads: -.. _cfg=contexts/parallel-threshold: .. _cfg=contexts/synchro: Running User Code in Parallel @@ -850,17 +848,6 @@ run. To activate this, set the ``contexts/nthreads`` item to the amount of cores that you have in your computer (or lower than 1 to have the amount of cores auto-detected). -Even if you asked several worker threads using the previous option, -you can request to start the parallel execution (and pay the -associated synchronization costs) only if the potential parallelism is -large enough. For that, set the ``contexts/parallel-threshold`` -item to the minimal amount of user contexts needed to start the -parallel execution. In any given simulation round, if that amount is -not reached, the contexts will be run sequentially directly by the -main thread (thus saving the synchronization costs). Note that this -option is mainly useful when the grain of the user code is very fine, -because our synchronization is now very efficient. - When parallel execution is activated, you can choose the synchronization schema used with the ``contexts/synchro`` item, which value is either: diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 9264bf53c1..749b0a7188 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -29,8 +29,6 @@ XBT_PUBLIC smx_actor_t SIMIX_process_from_PID(aid_t PID); XBT_PUBLIC int SIMIX_context_is_parallel(); XBT_PUBLIC int SIMIX_context_get_nthreads(); XBT_PUBLIC void SIMIX_context_set_nthreads(int nb_threads); -XBT_PUBLIC int SIMIX_context_get_parallel_threshold(); -XBT_PUBLIC void SIMIX_context_set_parallel_threshold(int threshold); XBT_PUBLIC e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode(); XBT_PUBLIC void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode); XBT_PUBLIC int SIMIX_is_maestro(); diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 5a515878bd..813dce80bc 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -342,11 +342,6 @@ void sg_config_init(int *argc, char **argv) simgrid::config::declare_flag("contexts/nthreads", "Number of parallel threads used to execute user contexts", 1, &SIMIX_context_set_nthreads); - simgrid::config::declare_flag("contexts/parallel-threshold", - "Minimal number of user contexts to be run in parallel (raw contexts only)", 2, - &SIMIX_context_set_parallel_threshold); - simgrid::config::alias("contexts/parallel-threshold", {"contexts/parallel_threshold"}); - /* synchronization mode for parallel user contexts */ #if HAVE_FUTEX_H std::string default_synchro_mode = "futex"; diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp index d0343ddcfc..1365a6ad00 100644 --- a/src/simix/smx_context.cpp +++ b/src/simix/smx_context.cpp @@ -50,7 +50,6 @@ static simgrid::config::Flag context_factory_name( unsigned smx_context_stack_size; unsigned smx_context_guard_size; static int smx_parallel_contexts = 1; -static int smx_parallel_threshold = 2; static e_xbt_parmap_mode_t smx_parallel_synchronization_mode = XBT_PARMAP_DEFAULT; /** @@ -151,32 +150,6 @@ void SIMIX_context_set_nthreads(int nb_threads) { smx_parallel_contexts = nb_threads; } -/** - * @brief Returns the threshold above which user processes are run in parallel. - * - * If the number of threads is set to 1, there is no parallelism and this - * threshold has no effect. - * - * @return when the number of user processes ready to run is above - * this threshold, they are run in parallel - */ -int SIMIX_context_get_parallel_threshold() { - return smx_parallel_threshold; -} - -/** - * @brief Sets the threshold above which user processes are run in parallel. - * - * If the number of threads is set to 1, there is no parallelism and this - * threshold has no effect. - * - * @param threshold when the number of user processes ready to run is above - * this threshold, they are run in parallel - */ -void SIMIX_context_set_parallel_threshold(int threshold) { - smx_parallel_threshold = threshold; -} - /** * @brief Returns the synchronization mode used when processes are run in * parallel.