All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 92607446 authored by Leigh B Stoller's avatar Leigh B Stoller

Add NS syntax for setting the packing strategy:

	tb-set-packing-strategy pack|balance

defaults to null, which means no strategy (whatever assign does).
parent dc39d6d4
......@@ -112,6 +112,7 @@ my $debug = 0;
# be updated.
#
%experiment_fields = ("multiplex_factor" => 1,
"packing_strategy" => 1,
"forcelinkdelays" => 1,
"uselinkdelays" => 1,
"usewatunnels" => 1,
......
......@@ -288,6 +288,8 @@ my $real_user = User->RealUser();
# multiplex_factor default.
$mfactor = $experiment->multiplex_factor()
if (!defined($mfactor) && defined($experiment->multiplex_factor()));
$packoption = $experiment->packing_strategy()
if (!defined($packoption) && defined($experiment->packing_strategy()));
# NS file can say to run the prepass.
my $useprepass = $experiment->useprepass();
......
#!/usr/local/bin/otclsh
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -227,6 +227,9 @@ namespace eval GLOBALS {
# Control multiplex_factor for the experiment. Crude.
variable multiplex_factor {}
# Control packing strategy for the experiment. pack or balance.
variable packing_strategy {}
# The name of the sync_server
variable sync_server {}
......
# -*- tcl -*-
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -501,6 +501,7 @@ Simulator instproc run {} {
var_import ::GLOBALS::uselinkdelays
var_import ::GLOBALS::forcelinkdelays
var_import ::GLOBALS::multiplex_factor
var_import ::GLOBALS::packing_strategy
var_import ::GLOBALS::sync_server
var_import ::GLOBALS::use_ipassign
var_import ::GLOBALS::ipassign_args
......@@ -742,6 +743,10 @@ Simulator instproc run {} {
lappend fields "multiplex_factor"
lappend values $multiplex_factor
}
if { $packing_strategy != {} } {
lappend fields "packing_strategy"
lappend values $packing_strategy
}
if { $sync_server != {} } {
lappend fields "sync_server"
......
# -*- tcl -*-
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -1541,6 +1541,20 @@ proc tb-set-colocate-factor {factor} {
set multiplex_factor $factor
}
#
# Set the packing strategy assign uses.
#
proc tb-set-packing-strategy {strategy} {
var_import ::GLOBALS::packing_strategy
if {$strategy != "pack" && $strategy != "balance"} {
perror "\[tb-set-packing-strategy] strategy must be pack|balance"
return
}
set packing_strategy $strategy
}
#
# Set the sync server for the experiment. Must a vnode name that has been
# allocated.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment