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
sds
sds-keyval
Commits
f838b291
Commit
f838b291
authored
Oct 09, 2017
by
David Rich
Committed by
Rob Latham
Nov 22, 2017
Browse files
Compile fixups.
parent
6b18039a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kv-client.c
View file @
f838b291
...
...
@@ -131,7 +131,7 @@ hg_return_t kv_bulk_put(kv_context *context, void *key, void *data, uint64_t *da
bpin
.
key
=
*
(
uint64_t
*
)
key
;
bpin
.
size
=
*
(
uint64_t
*
)
data_size
;
ret
=
margo_bulk_create
(
context
->
mid
,
1
,
&
data
,
&
data_size
,
ret
=
margo_bulk_create
(
context
->
mid
,
1
,
&
data
,
data_size
,
HG_BULK_READ_ONLY
,
&
bpin
.
bulk_handle
);
assert
(
ret
==
HG_SUCCESS
);
ret
=
margo_forward
(
context
->
bulk_put_handle
,
&
bpin
);
...
...
test/test-mpi.cc
View file @
f838b291
...
...
@@ -103,17 +103,18 @@ int main(int argc, char *argv[])
DIE_IF
(
hret
!=
HG_SUCCESS
,
"kv_open"
);
// do a set of puts/gets
for
(
i
=
0
;
i
<
rank
;
i
++
)
{
for
(
int
i
=
0
;
i
<
rank
;
i
++
)
{
uint64_t
key
=
rank
+
i
;
// put
int
put_val
=
rank
+
i
;
std
::
vector
<
char
>
put_data
;
put_data
.
resize
(
sizeof
(
put_val
));
memcpy
(
put_data
.
data
(),
&
put_val
,
sizeof
(
put_val
));
uint64_t
data_size
=
put_data
.
size
();
memcpy
(
put_data
.
data
(),
&
put_val
,
data_size
);
hret
=
kv_bulk_put
(
context
,
(
void
*
)
&
key
,
(
void
*
)
put_data
.
data
(),
put_
data
.
size
()
);
printf
(
"(put) key %lu, size=%lu
, rc=%d
\n
"
,
key
,
put_
data
.
size
(),
(
int32_t
)
ret
);
hret
=
kv_bulk_put
(
context
,
(
void
*
)
&
key
,
(
void
*
)
put_data
.
data
(),
&
data
_
size
);
printf
(
"(put) key %lu, size=%lu
\n
"
,
key
,
data
_
size
);
DIE_IF
(
hret
!=
HG_SUCCESS
,
"kv_bulk_put"
);
sleep
(
2
);
...
...
@@ -122,14 +123,14 @@ int main(int argc, char *argv[])
int
get_val
;
std
::
vector
<
char
>
get_data
;
get_data
.
resize
(
sizeof
(
get_val
));
uint64_t
data_size
=
get_data
.
size
();
data_size
=
get_data
.
size
();
printf
(
"(get) key %lu, estimated size=%lu
\n
"
,
key
,
data_size
);
hret
=
kv_bulk_get
(
context
,
(
void
*
)
&
key
,
(
void
*
)
get_data
.
data
(),
&
data_size
);
DIE_IF
(
hret
!=
HG_SUCCESS
,
"kv_bulk_get"
);
printf
(
"(get) key %lu, actual size=%lu
\n
"
,
key
,
data_size
);
get_data
.
resize
(
data_size
);
memcpy
(
&
get_val
,
get_data
.
data
(),
sizeof
(
get_val
)
);
memcpy
(
&
get_val
,
get_data
.
data
(),
data_size
);
printf
(
"key: %lu in: %d out: %d
\n
"
,
key
,
put_val
,
get_val
);
}
...
...
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