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
Elsa Gonsiorowski
codes
Commits
75e90381
Commit
75e90381
authored
Jul 31, 2014
by
Jonathan Jenkins
Browse files
updated example code to new modelnet config api
parent
d9ae517e
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/example/example.c
View file @
75e90381
...
...
@@ -211,10 +211,22 @@ int main(
return
1
;
}
/* register model-net LPs with ROSS */
model_net_register
();
/* register the server LP type with ROSS */
svr_add_lp_type
();
/* Setup takes the global config object, the registered LPs, and
* generates/places the LPs as specified in the configuration file.
* This should only be called after ALL LP types have been registered in
* codes */
codes_mapping_setup
();
/* Setup the model-net parameters specified in the global config object,
* returned are the identifier(s) for the network type. In this example, we
* only expect one*/
net_ids
=
model_net_
set_params
(
&
num_nets
);
net_ids
=
model_net_
configure
(
&
num_nets
);
assert
(
num_nets
==
1
);
net_id
=
*
net_ids
;
free
(
net_ids
);
...
...
@@ -227,16 +239,6 @@ int main(
MPI_Finalize
();
return
0
;
}
/* register the server LP type with codes-base
* (model-net LP type is registered internally in model_net_set_params() */
svr_add_lp_type
();
/* Setup takes the global config object, the registered LPs, and
* generates/places the LPs as specified in the configuration file.
* This should only be called after ALL LP types have been registered in
* codes */
codes_mapping_setup
();
/* calculate the number of servers in this simulation,
* ignoring annotations */
...
...
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