Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
33ce81a8
Commit
33ce81a8
authored
Jul 08, 2014
by
Jonathan Jenkins
Browse files
updated example to current modelnet interface
parent
e279a10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/example/example.c
View file @
33ce81a8
...
...
@@ -181,6 +181,7 @@ int main(
{
int
nprocs
;
int
rank
;
int
num_nets
,
*
net_ids
;
/* TODO: explain why we need this (ROSS has cutoff??) */
g_tw_ts_end
=
s_to_ns
(
60
*
60
*
24
*
365
);
/* one year, in nsecs */
...
...
@@ -210,8 +211,12 @@ int main(
}
/* Setup the model-net parameters specified in the global config object,
* returned is the identifier for the network type */
net_id
=
model_net_set_params
();
* returned are the identifier(s) for the network type. In this example, we
* only expect one*/
net_ids
=
model_net_set_params
(
&
num_nets
);
assert
(
num_nets
==
1
);
net_id
=
*
net_ids
;
free
(
net_ids
);
/* in this example, we are using simplenet, which simulates point to point
* communication between any two entities (other networks are trickier to
* setup). Hence: */
...
...
doc/example/example.conf
View file @
33ce81a8
...
...
@@ -30,8 +30,10 @@ PARAMS
# (each "packet" is represented by an event)
# - independent of underlying network being used
packet_size
=
"512"
;
# - type of model to use (must match with corresponding LPGROUPS entry)
modelnet
=
"simplenet"
;
# - order that network types will be presented to the user in
# model_net_set_params. In this example, we're only using a single
# network
modelnet_order
=(
"simplenet"
);
# - message scheduling algorithm (on a per-packet basis)
modelnet_scheduler
=
"fcfs"
;
# first come first serve
# modelnet_scheduler="round-robin"; # round-robin
...
...
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