Commit 8ce8646a authored by Leigh Stoller's avatar Leigh Stoller

Add a couple of modelnet slots to the experiments table, which are not

currently used.
parent 2727d33b
......@@ -130,7 +130,10 @@ my %experiment_fields = ("multiplex_factor" => 1,
"delay_osname" => 1,
"sync_server" => 1,
"use_ipassign" => 1,
"ipassign_args" => 1);
"ipassign_args" => 1,
"usemodelnet" => 1,
"modelnet_cores" => 1,
"modelnet_edges" => 1);
# New parsing code state machine control.
my $PARSING_NOTYET = 0;
......
......@@ -599,6 +599,8 @@ Lan instproc updatedb {DB} {
$self instvar trivial_ok
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
$self instvar bandwidth
$self instvar rbandwidth
$self instvar ebandwidth
......@@ -620,6 +622,11 @@ Lan instproc updatedb {DB} {
$self instvar settings
$self instvar member_settings
if {$modelnet_cores > 0 || $modelnet_edges > 0} {
perror "Lans are not allowed when using modelnet; just duplex links."
return
}
#
# Upload lan settings and them per-member settings
#
......
......@@ -248,6 +248,11 @@ namespace eval GLOBALS {
# Use phys naming
variable use_physnaming 0
# Modelnet support. Number of physical core and edge nodes that user
# wants thrown at the problem.
variable modelnet_cores 0
variable modelnet_edges 0
}
# Load all our classes
......
......@@ -255,6 +255,8 @@ Simulator instproc run {} {
var_import ::GLOBALS::delay_osname
var_import ::TBCOMPAT::objtypes
var_import ::TBCOMPAT::eventtypes
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
# Fill out IPs
if {! $use_ipassign } {
......@@ -373,6 +375,15 @@ Simulator instproc run {} {
lappend fields "delay_osname"
lappend values $delay_osname
}
if {$modelnet_cores > 0 && $modelnet_edges > 0} {
lappend fields "usemodelnet"
lappend values 1
lappend fields "modelnet_cores"
lappend values $modelnet_cores
lappend fields "modelnet_edges"
lappend values $modelnet_edges
}
$self spitxml_data "experiments" $fields $values
......
......@@ -892,3 +892,33 @@ proc tb-use-physnaming {onoff} {
set use_physnaming $onoff
}
#
# User indicates that this is a modelnet experiment. Be default, the number
# of core and edge nodes is set to one each. The user must increase those
# if desired.
#
proc tb-use-modelnet {onoff} {
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
if {$onoff} {
set modelnet_cores 1
set modelnet_edges 1
} else {
set modelnet_cores 0
set modelnet_edges 0
}
}
proc tb-set-modelnet-physnodes {cores edges} {
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
if {$cores == 0 || $edges == 0} {
perror "\[tb-set-modelnet-physnodes] cores and edges must be > 0"
return
}
set modelnet_cores $cores
set modelnet_edges $edges
}
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