Commit 1f9067e1 authored by Philip Carns's avatar Philip Carns

more comments in example programs

parent 7bbf59ef
...@@ -51,6 +51,7 @@ int main(int argc, char **argv) ...@@ -51,6 +51,7 @@ int main(int argc, char **argv)
hg_class_t *hg_class; hg_class_t *hg_class;
/* boilerplate HG initialization steps */ /* boilerplate HG initialization steps */
/***************************************/
network_class = NA_Initialize("tcp://localhost:1234", NA_FALSE); network_class = NA_Initialize("tcp://localhost:1234", NA_FALSE);
if(!network_class) if(!network_class)
{ {
...@@ -83,6 +84,7 @@ int main(int argc, char **argv) ...@@ -83,6 +84,7 @@ int main(int argc, char **argv)
} }
/* set up argobots */ /* set up argobots */
/***************************************/
ret = ABT_init(argc, argv); ret = ABT_init(argc, argv);
if(ret != 0) if(ret != 0)
{ {
...@@ -121,9 +123,12 @@ int main(int argc, char **argv) ...@@ -121,9 +123,12 @@ int main(int argc, char **argv)
} }
/* actually start margo */ /* actually start margo */
/* note: the handler_pool is NULL because this is a client and is not /* provide argobots pools for driving communication progress and
* expected to run rpc handlers. * executing rpc handlers as well as class and context for Mercury
* communication. The rpc handler pool is null in this example program
* because this is a pure client that will not be servicing rpc requests.
*/ */
/***************************************/
mid = margo_init(progress_pool, ABT_POOL_NULL, hg_context, hg_class); mid = margo_init(progress_pool, ABT_POOL_NULL, hg_context, hg_class);
/* register RPC */ /* register RPC */
...@@ -171,6 +176,7 @@ int main(int argc, char **argv) ...@@ -171,6 +176,7 @@ int main(int argc, char **argv)
} }
} }
/* shut down everything */
margo_finalize(mid); margo_finalize(mid);
ABT_xstream_join(progress_xstream); ABT_xstream_join(progress_xstream);
......
...@@ -33,6 +33,7 @@ int main(int argc, char **argv) ...@@ -33,6 +33,7 @@ int main(int argc, char **argv)
hg_class_t *hg_class; hg_class_t *hg_class;
/* boilerplate HG initialization steps */ /* boilerplate HG initialization steps */
/***************************************/
network_class = NA_Initialize("tcp://localhost:1234", NA_TRUE); network_class = NA_Initialize("tcp://localhost:1234", NA_TRUE);
if(!network_class) if(!network_class)
{ {
...@@ -65,6 +66,7 @@ int main(int argc, char **argv) ...@@ -65,6 +66,7 @@ int main(int argc, char **argv)
} }
/* set up argobots */ /* set up argobots */
/***************************************/
ret = ABT_init(argc, argv); ret = ABT_init(argc, argv);
if(ret != 0) if(ret != 0)
{ {
...@@ -103,6 +105,11 @@ int main(int argc, char **argv) ...@@ -103,6 +105,11 @@ int main(int argc, char **argv)
} }
/* actually start margo */ /* actually start margo */
/* provide argobots pools for driving communication progress and
* executing rpc handlers as well as class and context for Mercury
* communication.
*/
/***************************************/
mid = margo_init(progress_pool, handler_pool, hg_context, hg_class); mid = margo_init(progress_pool, handler_pool, hg_context, hg_class);
/* register RPC */ /* register RPC */
...@@ -119,6 +126,7 @@ int main(int argc, char **argv) ...@@ -119,6 +126,7 @@ int main(int argc, char **argv)
ABT_eventual_wait(eventual, (void**)&shutdown); ABT_eventual_wait(eventual, (void**)&shutdown);
/* shut down everything */
margo_finalize(mid); margo_finalize(mid);
ABT_xstream_join(progress_xstream); ABT_xstream_join(progress_xstream);
......
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