From: Bruno Donassolo Date: Thu, 17 Mar 2022 10:47:24 +0000 (+0100) Subject: Network: add solver as an option X-Git-Tag: v3.31~41 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/942b5c201ba152a7a9912251edf87b1c24352e01 Network: add solver as an option Select a test which doesn't use crosstraffic and the timing is the same for both models (maxmin and bmf) --- diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index fef1236760..5f21418e23 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -19,6 +19,13 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); +/*********** + * Options * + ***********/ +static simgrid::config::Flag cfg_network_solver("network/solver", + "Set linear equations solver used by network model", + "maxmin", &simgrid::kernel::lmm::System::validate_solver); + double sg_latency_factor = 1.0; /* default value; can be set by model or from command line */ double sg_bandwidth_factor = 1.0; /* default value; can be set by model or from command line */ double sg_weight_S_parameter = 0.0; /* default value; can be set by model or from command line */ @@ -88,7 +95,7 @@ NetworkCm02Model::NetworkCm02Model(const std::string& name) : NetworkModel(name) select = true; } - set_maxmin_system(lmm::System::build("maxmin", select)); + set_maxmin_system(lmm::System::build(cfg_network_solver, select)); loopback_ = create_link("__loopback__", {config::get_value("network/loopback-bw")}); loopback_->set_sharing_policy(s4u::Link::SharingPolicy::FATPIPE, {}); diff --git a/teshsuite/models/cm02-set-lat-bw/cm02-set-lat-bw.tesh b/teshsuite/models/cm02-set-lat-bw/cm02-set-lat-bw.tesh index 760b4ca971..7c0f31ba20 100644 --- a/teshsuite/models/cm02-set-lat-bw/cm02-set-lat-bw.tesh +++ b/teshsuite/models/cm02-set-lat-bw/cm02-set-lat-bw.tesh @@ -20,3 +20,25 @@ $ ${bindir:=.}/cm02-set-lat-bw "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" > [ 22.000000] [4:@C2] Received data. Elapsed 2.000000 > [ 30.000000] [2:@C1] Bye > [ 30.000000] [4:@C2] Bye + +$ ${bindir:=.}/cm02-set-lat-bw "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --cfg=network/solver:bmf +> [ 0.000000] [0:maestro@] Configuration change: Set 'network/solver' to 'bmf' +> [ 0.000000] [0:maestro@] Configuration change: Set 'network/model' to 'CM02' +> [ 0.000000] [0:maestro@] Configuration change: Set 'network/weight-S' to '20537' +> [ 0.000000] [0:maestro@] Configuration change: Set 'network/crosstraffic' to '0' +> [ 0.000000] [1:@S1] Comm to C1, same weight/penalty (w_a == w_b, ~20) for everybody, each comm should take 1s and finish at the same time +> [ 0.000000] [3:@S2] Comm to C2, same weight/penalty (w_a == w_b, ~20) for everybody, each comm should take 1s and finish at the same time +> [ 2.000000] [2:@C1] Received data. Elapsed 2.000000 +> [ 2.000000] [4:@C2] Received data. Elapsed 2.000000 +> [ 10.000000] [3:@S2] Comm Flow B to C2: after 1s, change latency of L4 to increase penalty for flow B (w_b = 2* w_a) +> [ 10.000000] [3:@S2] rho_a = 2*rho_b, flow A receives twice the bandwidth than flow B +> [ 10.000000] [1:@S1] Comm Flow A to C1 +> [ 11.753312] [2:@C1] Received data. Elapsed 1.753312 +> [ 12.000000] [4:@C2] Received data. Elapsed 2.000000 +> [ 20.000000] [1:@S1] Comm Flow A to C1 +> [ 20.000000] [3:@S2] Comm Flow B to C2: after 1s, change bandwidth of L4 to increase penalty for flow B (w_b = 2* w_a) +> [ 20.000000] [3:@S2] rho_a = 2*rho_b, flow A receives twice the bandwidth than flow B +> [ 21.750000] [2:@C1] Received data. Elapsed 1.750000 +> [ 22.000000] [4:@C2] Received data. Elapsed 2.000000 +> [ 30.000000] [2:@C1] Bye +> [ 30.000000] [4:@C2] Bye