Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sds
margo
Commits
0071e7bf
Commit
0071e7bf
authored
Mar 27, 2016
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to reflect latest Mercury master API
parent
67a05cdd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
12 deletions
+14
-12
README.md
README.md
+2
-0
examples/client.c
examples/client.c
+3
-3
examples/my-rpc.c
examples/my-rpc.c
+2
-2
examples/server.c
examples/server.c
+1
-1
include/margo.h
include/margo.h
+2
-2
src/margo.c
src/margo.c
+4
-4
No files found.
README.md
View file @
0071e7bf
...
...
@@ -8,6 +8,8 @@ implementation. See the following for more details about each project:
## Dependencies
*
mercury (git clone --recurse-submodules https://github.com/mercury-hpc/mercury.git)
**
Note: this code requires Mercury git revision
6b9480aec20a48c6c775c78ed82947af2eb82b03 or later
*
argobots (git://git.mcs.anl.gov/argo/argobots.git)
*
abt-snoozer (https://xgitlab.cels.anl.gov/sds/abt-snoozer)
*
libev (e.g libev-dev package on Ubuntu or Debian)
...
...
examples/client.c
View file @
0071e7bf
...
...
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
NA_Finalize
(
network_class
);
return
(
-
1
);
}
hg_class
=
HG_Init
(
network_class
,
na_context
,
NULL
);
hg_class
=
HG_Init
(
network_class
,
na_context
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
@@ -217,13 +217,13 @@ static void run_my_rpc(void *_arg)
assert
(
ret
==
0
);
/* create handle */
ret
=
HG_Create
(
arg
->
hg_c
lass
,
arg
->
hg_c
ontext
,
svr_addr
,
my_rpc_id
,
&
handle
);
ret
=
HG_Create
(
arg
->
hg_context
,
svr_addr
,
my_rpc_id
,
&
handle
);
assert
(
ret
==
0
);
/* register buffer for rdma/bulk access by server */
hgi
=
HG_Get_info
(
handle
);
assert
(
hgi
);
ret
=
HG_Bulk_create
(
hgi
->
hg_
bulk_
class
,
1
,
&
buffer
,
&
size
,
ret
=
HG_Bulk_create
(
hgi
->
hg_class
,
1
,
&
buffer
,
&
size
,
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
ret
==
0
);
...
...
examples/my-rpc.c
View file @
0071e7bf
...
...
@@ -48,14 +48,14 @@ static void my_rpc_ult(void *_arg)
/* register local target buffer for bulk access */
hgi
=
HG_Get_info
(
*
handle
);
assert
(
hgi
);
ret
=
HG_Bulk_create
(
hgi
->
hg_
bulk_
class
,
1
,
&
buffer
,
ret
=
HG_Bulk_create
(
hgi
->
hg_class
,
1
,
&
buffer
,
&
size
,
HG_BULK_WRITE_ONLY
,
&
bulk_handle
);
assert
(
ret
==
0
);
mid
=
margo_hg_class_to_instance
(
hgi
->
hg_class
);
/* do bulk transfer from client to server */
ret
=
margo_bulk_transfer
(
mid
,
hgi
->
bulk_
context
,
HG_BULK_PULL
,
ret
=
margo_bulk_transfer
(
mid
,
hgi
->
context
,
HG_BULK_PULL
,
hgi
->
addr
,
in
.
bulk_handle
,
0
,
bulk_handle
,
0
,
size
);
assert
(
ret
==
0
);
...
...
examples/server.c
View file @
0071e7bf
...
...
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
NA_Finalize
(
network_class
);
return
(
-
1
);
}
hg_class
=
HG_Init
(
network_class
,
na_context
,
NULL
);
hg_class
=
HG_Init
(
network_class
,
na_context
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
include/margo.h
View file @
0071e7bf
...
...
@@ -62,7 +62,7 @@ hg_return_t margo_forward(
/**
* Perform a bulk transfer
* @param [in] mid Margo instance
* @param [in] context Mercury
bulk
context
* @param [in] context Mercury context
* @param [in] op type of operation to perform
* @param [in] origin_addr remote Mercury address
* @param [in] origin_handle remote Mercury bulk memory handle
...
...
@@ -74,7 +74,7 @@ hg_return_t margo_forward(
*/
hg_return_t
margo_bulk_transfer
(
margo_instance_id
mid
,
hg_
bulk_
context_t
*
context
,
hg_context_t
*
context
,
hg_bulk_op_t
op
,
na_addr_t
origin_addr
,
hg_bulk_t
origin_handle
,
...
...
src/margo.c
View file @
0071e7bf
...
...
@@ -114,7 +114,7 @@ static void hg_progress_fn(void* foo)
while
(
!
mid
->
hg_progress_shutdown_flag
)
{
do
{
ret
=
HG_Trigger
(
mid
->
hg_c
lass
,
mid
->
hg_c
ontext
,
0
,
1
,
&
actual_count
);
ret
=
HG_Trigger
(
mid
->
hg_context
,
0
,
1
,
&
actual_count
);
}
while
((
ret
==
HG_SUCCESS
)
&&
actual_count
&&
!
mid
->
hg_progress_shutdown_flag
);
if
(
!
mid
->
hg_progress_shutdown_flag
)
...
...
@@ -122,12 +122,12 @@ static void hg_progress_fn(void* foo)
ABT_pool_get_total_size
(
mid
->
progress_pool
,
&
size
);
if
(
size
>
0
)
{
HG_Progress
(
mid
->
hg_c
lass
,
mid
->
hg_c
ontext
,
0
);
HG_Progress
(
mid
->
hg_context
,
0
);
ABT_thread_yield
();
}
else
{
HG_Progress
(
mid
->
hg_c
lass
,
mid
->
hg_c
ontext
,
100
);
HG_Progress
(
mid
->
hg_context
,
100
);
}
}
}
...
...
@@ -246,7 +246,7 @@ na_return_t margo_na_addr_lookup(
hg_return_t
margo_bulk_transfer
(
margo_instance_id
mid
,
hg_
bulk_
context_t
*
context
,
hg_context_t
*
context
,
hg_bulk_op_t
op
,
na_addr_t
origin_addr
,
hg_bulk_t
origin_handle
,
...
...
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