Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
33ce81a8
Commit
33ce81a8
authored
Jul 08, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated example to current modelnet interface
parent
e279a10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
doc/example/example.c
doc/example/example.c
+7
-2
doc/example/example.conf
doc/example/example.conf
+4
-2
No files found.
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