Commit 94b56161 authored by Matthieu Dorier's avatar Matthieu Dorier

done implementing multiplexing providers

parent c2e5c47c
......@@ -15,22 +15,55 @@
extern "C" {
#endif
#define BAKE_CLIENT_NULL ((bake_client_t)NULL)
#define BAKE_TARGET_ID_NULL ((bake_target_id_t)NULL)
typedef struct bake_client* bake_client_t;
typedef struct bake_target* bake_target_id_t;
/**
* Creates a BAKE client attached to the given margo instance.
* This will effectively register the RPC needed by BAKE into
* the margo instance. The client must be freed with
* bake_client_finalize.
*
* @param[in] mid margo instance
* @param[out] client resulting bake client object
*
* @return 0 on success, -1 on failure
*/
int bake_client_init(margo_instance_id mid, bake_client_t* client);
/**
* Finalizes a BAKE client.
* WARNING: This function must not be called after Margo has been
* finalized. If you need to finalize a BAKE client when Margo is
* finalized, use margo_push_finalize_callback.
*
* @param client BAKE client to destroy
*
* @return 0 on success, -1 on failure
*/
int bake_client_finalize(bake_client_t client);
/**
* Obtains identifying information for a BAKE target through the provided
* remote mercury address.
* remote mercury address and multiplex id.
*
* @param [in] mid margo instance
* @param [in] client BAKE client
* @param [in] dest_addr destination Mercury address
* @param [in] mplex_id multiplex id
* @param [out] bti BAKE target identifier
* @returns 0 on success, -1 on failure
*/
int bake_probe_instance(
margo_instance_id mid,
bake_client_t client,
hg_addr_t dest_addr,
uint8_t mplex_id,
bake_target_id_t *bti);
/**
* Creates a bounded-size BAKE data region. The resulting region can be
* Creates a bounded-size BAKE data region. The resulting region can be
* written using BAKE write operations, and can be persisted (once writes
* are complete) with a a BAKE persist operation. The region is not valid
* for read access until persisted.
......@@ -204,17 +237,19 @@ int bake_proxy_read(
*
* @param [in] bti BAKE target_identifier
*/
void bake_release_instance(
void bake_target_id_release(
bake_target_id_t bti);
/**
* Shuts down a remote BAKE service (given a target ID).
*
* @param [in] bti BAKE target identifier
* @returns 0 on success, -1 on fialure
* Shuts down a remote BAKE service (given an address).
* This will shutdown all the providers on the target address.
*
* @param [in] client BAKE client
* @param [in] addr address of the server
* @returns 0 on success, -1 on failure
*/
int bake_shutdown_service(
bake_target_id_t bti);
bake_client_t client, hg_addr_t addr);
/**
* Issues a BAKE no-op operation.
......
......@@ -15,18 +15,24 @@
extern "C" {
#endif
#define BAKE_ABT_POOL_DEFAULT ABT_POOL_NULL
#define BAKE_MPLEX_ID_DEFAULT 0
#define BAKE_PROVIDER_IGNORE NULL
typedef struct bake_server_context_t* bake_provider_t;
/**
* Creates a BAKE pool to use for backend PMEM storage.
*
* NOTE: This function must be called on a pool before the pool
* can be passed to 'bake_server_init'.
* can be passed to 'bake_provider_register'.
*
* @param[in] pool_name path to PMEM backend file
* @param[in] pool_size size of the created pool
* @param[in] pool_mode mode of the created pool
* @returns 0 on success, -1 otherwise
*/
int bake_server_makepool(
int bake_makepool(
const char *pool_name,
size_t pool_size,
mode_t pool_mode);
......@@ -35,12 +41,18 @@ int bake_server_makepool(
* Initializes a BAKE server instance.
*
* @param[in] mid Margo instance identifier
* @param[in] mplex_id Multiplex id
* @param[in] pool Pool on which to run the RPC handlers
* @param[in] pool_name path to PMEM backend file
* @param[out] provider resulting provider
* @returns 0 on success, -1 otherwise
*/
int bake_server_init(
int bake_provider_register(
margo_instance_id mid,
const char *pool_name);
uint32_t mplex_id,
ABT_pool pool,
const char *pool_name,
bake_provider_t* provider);
#ifdef __cplusplus
}
......
......@@ -14,14 +14,9 @@
extern "C" {
#endif
/**
* Persistent, universal, opaque identifier for a BAKE target.
* Remains constant if instance is opened, closed, or migrated.
*/
typedef struct {
uuid_t id;
} bake_target_id_t;
} bake_uuid_t;
/**
* Persistent, opaque identifier for a region within a BAKE target.
*/
......
This diff is collapsed.
......@@ -26,7 +26,9 @@ int main(int argc, char **argv)
char *svr_addr_str;
hg_addr_t svr_addr;
margo_instance_id mid;
bake_client_t bcl;
bake_target_id_t bti;
uint8_t mplex_id;
hg_return_t hret;
int ret;
bake_region_id_t rid;
......@@ -35,14 +37,14 @@ int main(int argc, char **argv)
int region_fd;
uint64_t check_size;
if(argc != 4)
if(argc != 5)
{
fprintf(stderr, "Usage: bake-copy-from <server addr> <identifier file> <output file>\n");
fprintf(stderr, " Example: ./bake-copy-from tcp://localhost:1234 /tmp/bb-copy-rid.0GjOlu /tmp/output.dat\n");
fprintf(stderr, "Usage: bake-copy-from <server addr> <mplex id> <identifier file> <output file>\n");
fprintf(stderr, " Example: ./bake-copy-from tcp://localhost:1234 3 /tmp/bb-copy-rid.0GjOlu /tmp/output.dat\n");
return(-1);
}
svr_addr_str = argv[1];
mplex_id = atoi(argv[2]);
/* initialize Margo using the transport portion of the server
* address (i.e., the part before the first : character if present)
*/
......@@ -56,29 +58,40 @@ int main(int argc, char **argv)
return -1;
}
ret = bake_client_init(mid, &bcl);
if(ret != 0)
{
fprintf(stderr, "Error: bake_client_init()\n");
margo_finalize(mid);
return -1;
}
hret = margo_addr_lookup(mid, svr_addr_str, &svr_addr);
if(hret != HG_SUCCESS)
{
fprintf(stderr, "Error: margo_addr_lookup()\n");
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
ret = bake_probe_instance(mid, svr_addr, &bti);
ret = bake_probe_instance(bcl, svr_addr, mplex_id, &bti);
if(ret < 0)
{
fprintf(stderr, "Error: bake_probe_instance()\n");
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
region_fd = open(argv[2], O_RDONLY);
region_fd = open(argv[3], O_RDONLY);
if(region_fd < 0)
{
perror("open rid");
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -88,8 +101,9 @@ int main(int argc, char **argv)
{
perror("read");
close(region_fd);
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -99,18 +113,20 @@ int main(int argc, char **argv)
if(ret != 0)
{
fprintf(stderr, "Error: bake_get_size()\n");
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
fd = open(argv[3], O_RDWR|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR);
fd = open(argv[4], O_RDWR|O_TRUNC|O_CREAT, S_IRUSR|S_IWUSR);
if(fd < 0)
{
perror("open output");
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -120,8 +136,9 @@ int main(int argc, char **argv)
{
perror("ftruncate");
close(fd);
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -131,8 +148,9 @@ int main(int argc, char **argv)
{
perror("mmap");
close(fd);
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -148,8 +166,9 @@ int main(int argc, char **argv)
{
munmap(local_region, check_size);
close(fd);
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
fprintf(stderr, "Error: bake_read()\n");
return(-1);
......@@ -157,8 +176,9 @@ int main(int argc, char **argv)
munmap(local_region, check_size);
close(fd);
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(0);
......
......@@ -26,7 +26,9 @@ int main(int argc, char **argv)
char *svr_addr_str;
hg_addr_t svr_addr;
margo_instance_id mid;
bake_client_t bcl;
bake_target_id_t bti;
uint8_t mplex_id;
hg_return_t hret;
int ret;
bake_region_id_t rid;
......@@ -37,13 +39,14 @@ int main(int argc, char **argv)
char region_file[128];
uint64_t check_size;
if(argc != 3)
if(argc != 4)
{
fprintf(stderr, "Usage: bake-copy-to <local file> <server addr>\n");
fprintf(stderr, " Example: ./bake-copy-to /tmp/foo.dat tcp://localhost:1234\n");
fprintf(stderr, "Usage: bake-copy-to <local file> <server addr> <mplex id>\n");
fprintf(stderr, " Example: ./bake-copy-to /tmp/foo.dat tcp://localhost:1234 1\n");
return(-1);
}
svr_addr_str = argv[2];
mplex_id = atoi(argv[3]);
fd = open(argv[1], O_RDONLY);
if(fd < 0)
......@@ -82,20 +85,32 @@ int main(int argc, char **argv)
return -1;
}
ret = bake_client_init(mid, &bcl);
if(ret != 0)
{
fprintf(stderr, "Error: bake_client_init()\n");
margo_finalize(mid);
munmap(local_region, statbuf.st_size);
close(fd);
return -1;
}
hret = margo_addr_lookup(mid, svr_addr_str, &svr_addr);
if(hret != HG_SUCCESS)
{
fprintf(stderr, "Error: margo_addr_lookup()\n");
bake_client_finalize(bcl);
margo_finalize(mid);
munmap(local_region, statbuf.st_size);
close(fd);
return(-1);
}
ret = bake_probe_instance(mid, svr_addr, &bti);
ret = bake_probe_instance(bcl, svr_addr, mplex_id, &bti);
if(ret < 0)
{
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
munmap(local_region, statbuf.st_size);
close(fd);
......@@ -107,8 +122,9 @@ int main(int argc, char **argv)
ret = bake_create(bti, statbuf.st_size, &rid);
if(ret != 0)
{
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
munmap(local_region, statbuf.st_size);
close(fd);
......@@ -125,8 +141,9 @@ int main(int argc, char **argv)
statbuf.st_size);
if(ret != 0)
{
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
munmap(local_region, statbuf.st_size);
close(fd);
......@@ -140,8 +157,9 @@ int main(int argc, char **argv)
ret = bake_persist(bti, rid);
if(ret != 0)
{
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
fprintf(stderr, "Error: bake_persist()\n");
return(-1);
......@@ -151,15 +169,17 @@ int main(int argc, char **argv)
ret = bake_get_size(bti, rid, &check_size);
if(ret != 0)
{
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
fprintf(stderr, "Error: bake_get_size()\n");
return(-1);
}
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
if(check_size != statbuf.st_size)
......
......@@ -33,26 +33,29 @@ int main(int argc, char **argv)
char *svr_addr_str;
hg_addr_t svr_addr;
margo_instance_id mid;
bake_client_t bcl;
bake_target_id_t bti;
uint8_t mplex_id;
hg_return_t hret;
int ret;
int min_size, max_size, iterations, cur_size;
if(argc != 5)
if(argc != 6)
{
fprintf(stderr, "Usage: bake-latency-bench <server addr> <iterations> <min_sz> <max_sz>\n");
fprintf(stderr, " Example: ./bake-latency-bench tcp://localhost:1234 1000 4 32\n");
fprintf(stderr, "Usage: bake-latency-bench <server addr> <mplex id> <iterations> <min_sz> <max_sz>\n");
fprintf(stderr, " Example: ./bake-latency-bench tcp://localhost:1234 3 1000 4 32\n");
return(-1);
}
svr_addr_str = argv[1];
svr_addr_str = argv[1];
mplex_id = atoi(argv[2]);
ret = sscanf(argv[2], "%d", &iterations);
ret = sscanf(argv[3], "%d", &iterations);
assert(ret == 1);
ret = sscanf(argv[3], "%d", &min_size);
ret = sscanf(argv[4], "%d", &min_size);
assert(ret == 1);
ret = sscanf(argv[4], "%d", &max_size);
ret = sscanf(argv[5], "%d", &max_size);
assert(ret == 1);
measurement_array = malloc(sizeof(*measurement_array)*iterations);
......@@ -71,19 +74,29 @@ int main(int argc, char **argv)
return -1;
}
ret = bake_client_init(mid, &bcl);
if(ret != 0)
{
fprintf(stderr, "Error: bake_client_init()\n");
margo_finalize(mid);
return -1;
}
hret = margo_addr_lookup(mid, svr_addr_str, &svr_addr);
if(hret != HG_SUCCESS)
{
fprintf(stderr, "Error: margo_addr_lookup()\n");
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
ret = bake_probe_instance(mid, svr_addr, &bti);
ret = bake_probe_instance(bcl, svr_addr, mplex_id, &bti);
if(ret < 0)
{
fprintf(stderr, "Error: bake_probe_instance()\n");
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
return(-1);
}
......@@ -100,8 +113,9 @@ int main(int argc, char **argv)
bench_routine_print("read", cur_size, iterations, measurement_array);
}
bake_release_instance(bti);
bake_target_id_release(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bcl);
margo_finalize(mid);
free(measurement_array);
......
......@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
parse_args(argc, argv, &opts);
ret = bake_server_makepool(opts.pmem_pool, opts.pool_size, opts.pool_mode);
ret = bake_makepool(opts.pmem_pool, opts.pool_size, opts.pool_mode);
return(ret);
}
......@@ -7,12 +7,13 @@
#ifndef __BAKE_RPC
#define __BAKE_RPC
#include <uuid/uuid.h>
#include <margo.h>
#include <mercury_proc_string.h>
#include <bake.h>
/* encoders for BAKE-specific types */
static inline hg_return_t hg_proc_bake_target_id_t(hg_proc_t proc, bake_target_id_t *bti);
static inline hg_return_t hg_proc_bake_uuid_t(hg_proc_t proc, bake_uuid_t *bti);
static inline hg_return_t hg_proc_bake_region_id_t(hg_proc_t proc, bake_region_id_t *rid);
/* BAKE shutdown */
......@@ -20,7 +21,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_shutdown_ult)
/* BAKE create */
MERCURY_GEN_PROC(bake_create_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((uint64_t)(region_size)))
MERCURY_GEN_PROC(bake_create_out_t,
((int32_t)(ret))\
......@@ -29,7 +30,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_create_ult)
/* BAKE write */
MERCURY_GEN_PROC(bake_write_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((bake_region_id_t)(rid))\
((uint64_t)(region_offset))\
((hg_bulk_t)(bulk_handle))\
......@@ -43,7 +44,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_write_ult)
/* BAKE eager write */
typedef struct
{
bake_target_id_t bti;
bake_uuid_t pool_id;
bake_region_id_t rid;
uint64_t region_offset;
uint32_t size;
......@@ -56,7 +57,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_eager_write_ult)
/* BAKE persist */
MERCURY_GEN_PROC(bake_persist_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((bake_region_id_t)(rid)))
MERCURY_GEN_PROC(bake_persist_out_t,
((int32_t)(ret)))
......@@ -64,7 +65,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_persist_ult)
/* BAKE create/write/persist */
MERCURY_GEN_PROC(bake_create_write_persist_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((uint64_t)(region_size))\
((uint64_t)(region_offset))\
((hg_bulk_t)(bulk_handle))\
......@@ -78,7 +79,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_create_write_persist_ult)
/* BAKE get size */
MERCURY_GEN_PROC(bake_get_size_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((bake_region_id_t)(rid)))
MERCURY_GEN_PROC(bake_get_size_out_t,
((int32_t)(ret))\
......@@ -87,7 +88,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_get_size_ult)
/* BAKE read */
MERCURY_GEN_PROC(bake_read_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((bake_region_id_t)(rid))\
((uint64_t)(region_offset))\
((hg_bulk_t)(bulk_handle))\
......@@ -100,7 +101,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_read_ult)
/* BAKE eager read */
MERCURY_GEN_PROC(bake_eager_read_in_t,
((bake_target_id_t)(bti))\
((bake_uuid_t)(pool_id))\
((bake_region_id_t)(rid))\
((uint64_t)(region_offset))\
((uint32_t)(size)))
......@@ -116,7 +117,7 @@ DECLARE_MARGO_RPC_HANDLER(bake_eager_read_ult)
/* BAKE probe */
MERCURY_GEN_PROC(bake_probe_out_t,
((int32_t)(ret))\
((bake_target_id_t)(bti)))
((bake_uuid_t)(pool_id)))
DECLARE_MARGO_RPC_HANDLER(bake_probe_ult)
/* BAKE noop */
......@@ -140,10 +141,10 @@ static inline hg_return_t hg_proc_bake_region_id_t(hg_proc_t proc, bake_region_i
return(HG_SUCCESS);
}
static inline hg_return_t hg_proc_bake_target_id_t(hg_proc_t proc, bake_target_id_t *bti)
static inline hg_return_t hg_proc_bake_uuid_t(hg_proc_t proc, bake_uuid_t *pool_id)
{
/* TODO: make this portable */
return(hg_proc_memcpy(proc, bti->id, sizeof(bti->id)));
return(hg_proc_memcpy(proc, pool_id, sizeof(*pool_id)));
}
static inline hg_return_t hg_proc_bake_eager_write_in_t(hg_proc_t proc, void *v_out_p)
......@@ -152,7 +153,7 @@ static inline hg_return_t hg_proc_bake_eager_write_in_t(hg_proc_t proc, void *v_
bake_eager_write_in_t *in = v_out_p;
void *buf = NULL;
hg_proc_bake_target_id_t(proc, &in->bti);
hg_proc_bake_uuid_t(proc, &in->pool_id);
hg_proc_bake_region_id_t(proc, &in->rid);
hg_proc_uint64_t(proc, &in->region_offset);
hg_proc_uint32_t(proc, &in->size);
......
......@@ -16,17 +16,18 @@
struct options
{
char *listen_addr_str;
char *bake_pool;
unsigned num_pools;
char **bake_pools;
char *host_file;
};
static void usage(int argc, char **argv)
{
fprintf(stderr, "Usage: bake-server-daemon [OPTIONS] <listen_addr> <bake_pool>\n");
fprintf(stderr, "Usage: bake-server-daemon [OPTIONS] <listen_addr> <bake_pool1> <bake_pool2> ...\n");
fprintf(stderr, " listen_addr is the Mercury address to listen on\n");
fprintf(stderr, " bake_pool is the path to the BAKE pool\n");
fprintf(stderr, " [-f filename] to write the server address to a file\n");
fprintf(stderr, "Example: ./bake-server-daemon tcp://localhost:1234 /dev/shm/foo.dat\n");
fprintf(stderr, "Example: ./bake-server-daemon tcp://localhost:1234 /dev/shm/foo.dat /dev/shm/bar.dat\n");
return;
}
......@@ -51,13 +52,18 @@ static void parse_args(int argc, char **argv, struct options *opts)
}
/* get required arguments after options */
if((argc - optind) != 2)
if((argc - optind) < 2)
{
usage(argc, argv);
exit(EXIT_FAILURE);
}
opts->num_pools = argc - optind - 1;
opts->listen_addr_str = argv[optind++];
opts->bake_pool = argv[optind++];
opts->bake_pools = calloc(opts->num_pools, sizeof(char*));
int i;
for(i=0; i < opts->num_pools; i++) {
opts->bake_pools[i] = argv[optind++];
}
return;
}
......@@ -119,10 +125,16 @@ int main(int argc, char **argv)
}
/* initialize the BAKE server */
ret = bake_server_init(mid, opts.bake_pool);
int i;
for(i=0; i< opts.num_pools; i++) {
ret = bake_provider_register(mid, i+1,
BAKE_ABT_POOL_DEFAULT, opts.bake_pools[i],
BAKE_PROVIDER_IGNORE);
}
if(ret != 0)
{
fprintf(stderr, "Error: bake_server_init()\n");
fprintf(stderr, "Error: bake_provider_register()\n");
margo_finalize(mid);
return(-1);
}
......@@ -130,5 +142,7 @@ int main(int argc, char **argv)
/* suspend until the BAKE server gets a shutdown signal from the client */
margo_wait_for_finalize(mid);
free(opts.bake_pools);
return(0);
}
This diff is collapsed.
......@@ -54,7 +54,9 @@ int main(int argc, char **argv)
return(-1);
}
ret = bake_probe_instance(mid, svr_addr, &bti);
bake_client_t bc;
ret = bake_client_init(mid, &bc);
if(ret < 0)
{
fprintf(stderr, "Error: bake_probe_instance()\n");
......@@ -64,10 +66,12 @@ int main(int argc, char **argv)
}
/* shutdown server */
bake_shutdown_service(bti);
bake_shutdown_service(bc, svr_addr);
bake_release_instance(bti);
margo_addr_free(mid, svr_addr);
bake_client_finalize(bc);
margo_finalize(mid);
return(0);
......
......@@ -13,7 +13,7 @@ test_start_servers 1 2 20
#####################
echo "Hello world." > $TMPBASE/foo.dat
CPOUT=`run_to 10 src/bake-copy-to $TMPBASE/foo.dat $svr1`
CPOUT=`run_to 10 src/bake-copy-to $TMPBASE/foo.dat $svr1 1`
if [ $? -ne 0 ]; then
run_to 10 src/bake-shutdown $svr1
wait
......@@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then
fi
RID=`echo "$CPOUT" | grep -o -P '/tmp.*$'`
run_to 10 src/bake-copy-from $svr1 $RID $TMPBASE/foo-out.dat
run_to 10 src/bake-copy-from $svr1 1 $RID $TMPBASE/foo-out.dat
if [ $? -ne 0 ]; then
run_to 10 src/bake-shutdown $svr1
wait
......
......@@ -23,6 +23,8 @@ int main(int argc, char *argv[])
char *bake_svr_addr_str;
margo_instance_id mid;
hg_addr_t svr_addr;
uint8_t mplex_id;
bake_client_t bcl;
bake_target_id_t bti;
bake_region_id_t the_rid;
const char *test_str = "This is a test string for create-write-persist test.";
......@@ -31,13 +33,14 @@ int main(int argc, char *argv[])
hg_return_t hret;
int ret;
if(argc != 2)
if(argc != 3)
{
fprintf(stderr, "Usage: create-write-persist-test <bake server addr>\n");
fprintf(stderr, " Example: ./create-write-persist-test tcp://localhost:1234\n");
fprintf(stderr,