Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill obsolete option --cfg=contexts/parallel-threshold.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 24 Apr 2020 22:14:01 +0000 (00:14 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 24 Apr 2020 22:14:01 +0000 (00:14 +0200)
The associated code was removed 4 years ago by commit
9ed461c11fd10eeea596831f2791e359c05d26bf "kill more old cruft: adaptative threshold".

ChangeLog
docs/source/Configuring_SimGrid.rst
include/simgrid/simix.h
src/simgrid/sg_config.cpp
src/simix/smx_context.cpp

index 9198b0d..4f77382 100644 (file)
--- 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.
 
  - 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
 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
 
  - 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.
  - 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.
index 17654ef..e3689ec 100644 (file)
@@ -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/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`
 
 - **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:
 application.
 
 .. _cfg=contexts/nthreads:
-.. _cfg=contexts/parallel-threshold:
 .. _cfg=contexts/synchro:
 
 Running User Code in Parallel
 .. _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).
 
 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:
 When parallel execution is activated, you can choose the
 synchronization schema used with the ``contexts/synchro`` item,
 which value is either:
index 9264bf5..749b0a7 100644 (file)
@@ -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_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();
 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();
index 5a51587..813dce8 100644 (file)
@@ -342,11 +342,6 @@ void sg_config_init(int *argc, char **argv)
   simgrid::config::declare_flag<int>("contexts/nthreads", "Number of parallel threads used to execute user contexts", 1,
                                      &SIMIX_context_set_nthreads);
 
   simgrid::config::declare_flag<int>("contexts/nthreads", "Number of parallel threads used to execute user contexts", 1,
                                      &SIMIX_context_set_nthreads);
 
-  simgrid::config::declare_flag<int>("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";
   /* synchronization mode for parallel user contexts */
 #if HAVE_FUTEX_H
   std::string default_synchro_mode = "futex";
index d0343dd..1365a6a 100644 (file)
@@ -50,7 +50,6 @@ static simgrid::config::Flag<std::string> context_factory_name(
 unsigned smx_context_stack_size;
 unsigned smx_context_guard_size;
 static int smx_parallel_contexts = 1;
 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;
 
 /**
 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;
 }
 
   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.
 /**
  * @brief Returns the synchronization mode used when processes are run in
  * parallel.