From ecd67381aa492e031a22351022166e7564ea35f1 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 6 Feb 2017 22:02:57 +0100 Subject: [PATCH 1/1] rename an option and improve its doc: maxmin/concurrency-limit --- doc/doxygen/options.doc | 15 ++++++++++++--- .../smpi/replay_multiple/replay_multiple.tesh | 5 +++-- src/simgrid/sg_config.cpp | 3 ++- src/surf/maxmin.cpp | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 5fc516da3f..4799993422 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -202,9 +202,17 @@ price of a reduced numerical precision. \subsection options_concurrency_limit Concurrency limit The maximum number of variables per resource can be tuned through -the \b maxmin/concurrency_limit item (default value: -1, meaning no such limitation). -Setting a higher value can lift some limitations, such as the number of -concurrent processes running on a single host. +the \b maxmin/concurrency-limit item. The default value is -1, meaning that +there is no such limitation. You can have as many simultaneous actions per +resources as you want. If your simulation presents a very high level of +concurrency, it may help to use e.g. 100 as a value here. It means that at +most 100 actions can consume a resource at a given time. The extraneous actions +are queued and wait until the amount of concurrency of the considered resource +lowers under the given boundary. + +Such limitations help both to the simulation speed and simulation accuracy +on highly constrained scenarios, but the simulation speed suffers of this +setting on regular (less constrained) scenarios so it is off by default. \subsection options_model_network Configuring the Network model @@ -1143,6 +1151,7 @@ It can be done by using XBT. Go to \ref XBT_log for more details. - \c host/model: \ref options_model_select - \c maxmin/precision: \ref options_model_precision +- \c maxmin/concurrency-limit: \ref options_concurrency_limit - \c msg/debug-multiple-use: \ref options_msg_debug_multiple_use diff --git a/examples/smpi/replay_multiple/replay_multiple.tesh b/examples/smpi/replay_multiple/replay_multiple.tesh index d9877454b2..72f83bb1ce 100644 --- a/examples/smpi/replay_multiple/replay_multiple.tesh +++ b/examples/smpi/replay_multiple/replay_multiple.tesh @@ -3,9 +3,10 @@ p Test the replay with multiple instances p first generate the deployment file $ ${srcdir:=.}/generate_multiple_deployment.sh -platform ${srcdir:=.}/../../platforms/small_platform_with_routers.xml -hostfile ${srcdir:=.}/../hostfile ${srcdir:=.}/description_file ${srcdir:=.}/deployment.xml +p This test needs maxmin/concurrency-limit=100 because it stats 64 hosts on 5 machines. ! timeout 120 -$ ./replay_multiple description_file ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment.xml --log=smpi.:info --cfg=maxmin/concurrency_limit:100 -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/concurrency_limit' to '100' +$ ./replay_multiple description_file ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment.xml --log=smpi.:info --cfg=maxmin/concurrency-limit:100 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/concurrency-limit' to '100' > [0.000000] [msg_test/INFO] Initializing instance 1 of size 32 > [0.000000] [msg_test/INFO] Initializing instance 2 of size 32 > [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation. The timings will certainly not be accurate. Use the option "--cfg=smpi/host-speed:" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information. diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 8ac7ca7e2b..e10539e6f4 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -390,9 +390,10 @@ void sg_config_init(int *argc, char **argv) simgrid::config::bindFlag(sg_maxmin_precision, "maxmin/precision", "Numerical precision used when computing resource sharing (in flops/sec or bytes/sec)"); - simgrid::config::bindFlag(sg_concurrency_limit, "maxmin/concurrency_limit", + simgrid::config::bindFlag(sg_concurrency_limit, "maxmin/concurrency-limit", "Maximum number of concurrent variables in the maxmim system. Also limits the number of " "processes on each host, at higher level. (default: -1 means no such limitation)"); + xbt_cfg_register_alias("maxmin/concurrency-limit", "maxmin/concurrency_limit"); /* The parameters of network models */ diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index 253ebd1ee5..dc0280b8ba 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -24,7 +24,7 @@ typedef struct s_dyn_light { double sg_maxmin_precision = 0.00001; /* Change this with --cfg=maxmin/precision:VALUE */ double sg_surf_precision = 0.00001; /* Change this with --cfg=surf/precision:VALUE */ -int sg_concurrency_limit = -1; /* Change this with --cfg=maxmin/concurrency_limit:VALUE */ +int sg_concurrency_limit = -1; /* Change this with --cfg=maxmin/concurrency-limit:VALUE */ static void *lmm_variable_mallocator_new_f(); static void lmm_variable_mallocator_free_f(void *var); -- 2.20.1