Commit f838b291 authored by David Rich's avatar David Rich Committed by Rob Latham
Browse files

Compile fixups.

parent 6b18039a
......@@ -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);
......@@ -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;
memcpy(, &put_val, sizeof(put_val));
uint64_t data_size = put_data.size();
memcpy(, &put_val, data_size);
hret = kv_bulk_put(context, (void*)&key, (void*), 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*), &data_size);
printf("(put) key %lu, size=%lu\n", key, data_size);
DIE_IF(hret != HG_SUCCESS, "kv_bulk_put");
......@@ -122,14 +123,14 @@ int main(int argc, char *argv[])
int get_val;
std::vector<char> get_data;
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*), &data_size);
DIE_IF(hret != HG_SUCCESS, "kv_bulk_get");
printf("(get) key %lu, actual size=%lu\n", key, data_size);
memcpy(&get_val,, sizeof(get_val));
memcpy(&get_val,, data_size);
printf("key: %lu in: %d out: %d\n", key, put_val, get_val);
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