Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nikhil
codes
Commits
19dcc9f5
Commit
19dcc9f5
authored
May 23, 2014
by
Jonathan Jenkins
Browse files
Scheduler configuration support
parent
d0b0a711
Changes
10
Hide whitespace changes
Inline
Side-by-side
codes/model-net-sched.h
View file @
19dcc9f5
...
...
@@ -46,6 +46,10 @@ enum sched_type {
MN_SCHED_RR
// round-robin packet scheduling
};
/// global for scheduler
/// TODO: move away from using the global for when we have multiple networks
extern
enum
sched_type
mn_sched_type
;
/// overall scheduler struct - type puns the actual data structure
struct
model_net_sched_s
{
...
...
src/models/networks/model-net/model-net-lp.c
View file @
19dcc9f5
...
...
@@ -133,7 +133,7 @@ void model_net_base_lp_init(
// TODO: parameterize scheduler type
ns
->
sched
=
malloc
(
sizeof
(
model_net_sched
));
model_net_sched_init
(
MN_SCHED_FCFS
,
method_array
[
ns
->
net_id
],
ns
->
sched
);
model_net_sched_init
(
mn_sched_type
,
method_array
[
ns
->
net_id
],
ns
->
sched
);
ns
->
sub_type
=
model_net_get_lp_type
(
ns
->
net_id
);
// NOTE: some models actually expect LP state to be 0 initialized...
...
...
src/models/networks/model-net/model-net-sched.c
View file @
19dcc9f5
...
...
@@ -13,6 +13,8 @@
#include "codes/model-net-lp.h"
#include "codes/quicklist.h"
enum
sched_type
mn_sched_type
=
-
1
;
/// scheduler-specific data structures (TODO: split specific schedulers into
/// their own files if we move beyond just these two)
/// NOTE: for now, scheduler data structures are the same - this may change in
...
...
src/models/networks/model-net/model-net.c
View file @
19dcc9f5
...
...
@@ -10,6 +10,7 @@
#include "codes/model-net.h"
#include "codes/model-net-method.h"
#include "codes/model-net-lp.h"
#include "codes/model-net-sched.h"
#include "codes/codes.h"
#define STR_SIZE 16
...
...
@@ -253,14 +254,18 @@ void model_net_pull_event(
int
model_net_set_params
()
{
char
mn_name
[
MAX_NAME_LENGTH
];
char
sched
[
MAX_NAME_LENGTH
];
long
int
packet_size_l
=
0
;
uint64_t
packet_size
;
int
net_id
=-
1
;
int
ret
;
config_lpgroups_t
paramconf
;
configuration_get_lpgroups
(
&
config
,
"PARAMS"
,
&
paramconf
);
configuration_get_value
(
&
config
,
"PARAMS"
,
"modelnet"
,
mn_name
,
MAX_NAME_LENGTH
);
configuration_get_value_longint
(
&
config
,
"PARAMS"
,
"packet_size"
,
&
packet_size_l
);
ret
=
configuration_get_value
(
&
config
,
"PARAMS"
,
"modelnet_scheduler"
,
sched
,
MAX_NAME_LENGTH
);
packet_size
=
packet_size_l
;
if
(
!
packet_size
)
...
...
@@ -268,6 +273,24 @@ int model_net_set_params()
packet_size
=
512
;
printf
(
"
\n
Warning, no packet size specified, setting packet size to %llu "
,
packet_size
);
}
if
(
ret
>
0
){
if
(
strcmp
(
"round-robin"
,
sched
)
==
0
){
mn_sched_type
=
MN_SCHED_RR
;
}
else
if
(
strcmp
(
"fcfs"
,
sched
)
==
0
){
mn_sched_type
=
MN_SCHED_FCFS
;
}
else
{
fprintf
(
stderr
,
"Unknown value for PARAMS:modelnet-scheduler : %s
\n
"
,
sched
);
abort
();
}
}
else
{
// default: FCFS
mn_sched_type
=
MN_SCHED_FCFS
;
}
if
(
strcmp
(
model_net_method_names
[
SIMPLENET
],
mn_name
)
==
0
)
{
double
net_startup_ns
,
net_bw_mbps
;
...
...
tests/conf/modelnet-p2p-bw-loggp.conf
View file @
19dcc9f5
...
...
@@ -12,5 +12,8 @@ PARAMS
packet_size
=
"2147483648"
;
message_size
=
"176"
;
modelnet
=
"loggp"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
net_config_file
=
"ng-mpi-tukey.dat"
;
}
tests/conf/modelnet-test-dragonfly.conf
View file @
19dcc9f5
...
...
@@ -12,6 +12,9 @@ PARAMS
{
packet_size
=
"512"
;
modelnet
=
"dragonfly"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
num_vcs
=
"1"
;
num_routers
=
"4"
;
local_vc_size
=
"16384"
;
...
...
tests/conf/modelnet-test-loggp.conf
View file @
19dcc9f5
...
...
@@ -12,5 +12,8 @@ PARAMS
packet_size
=
"512"
;
message_size
=
"256"
;
modelnet
=
"loggp"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
net_config_file
=
"ng-mpi-tukey.dat"
;
}
tests/conf/modelnet-test-simplewan.conf
View file @
19dcc9f5
...
...
@@ -12,6 +12,9 @@ PARAMS
message_size
=
"256"
;
packet_size
=
"1024"
;
modelnet
=
"simplewan"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
net_startup_ns_file
=
"modelnet-test-startup.conf"
;
net_bw_mbps_file
=
"modelnet-test-bw.conf"
;
}
tests/conf/modelnet-test-torus.conf
View file @
19dcc9f5
...
...
@@ -11,6 +11,9 @@ PARAMS
{
packet_size
=
"512"
;
modelnet
=
"torus"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
message_size
=
"2048"
;
n_dims
=
"4"
;
dim_length
=
"4,2,2,2"
;
...
...
tests/conf/modelnet-test.conf
View file @
19dcc9f5
...
...
@@ -12,6 +12,9 @@ PARAMS
packet_size
=
"512"
;
message_size
=
"256"
;
modelnet
=
"simplenet"
;
# scheduler options
modelnet_scheduler
=
"fcfs"
;
# modelnet_scheduler="round-robin";
net_startup_ns
=
"1.5"
;
net_bw_mbps
=
"20000"
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment