Commit eb44ec60 authored by Rob Latham's avatar Rob Latham
Browse files

great big multi-threaded network transfer overhaul

- Adds the margo memory registration cache
- spawns multiple ULTs to drive network tranfer
parent 9c4af02f
......@@ -9,8 +9,17 @@ extern "C"
typedef struct bv_svc_provider * bv_svc_provider_t;
/**
* mid: associate with this margo engine
* pool: an Argobots pool to manage ULTs spawned by the provider when servicing an RPC
* gid: the SSG group these provider instances are part of
* bufsize: how much memory this provider can use to buffer I/O requests
* xfersize: ideal transfer size. Determine via experiment.
* Also determines how many simultaneous transfer threads will spawn
* bv_id: identifier for this benvolio instance
*/
int bv_svc_provider_register(margo_instance_id mid,
abt_io_instance_id abtio, ABT_pool pool, ssg_group_id_t gid, int bufsize, bv_svc_provider_t *bv_id);
abt_io_instance_id abtio, ABT_pool pool, ssg_group_id_t gid, int bufsize, int xfersize, bv_svc_provider_t *bv_id);
#ifdef __cplusplus
}
......
This diff is collapsed.
......@@ -46,13 +46,14 @@ int main(int argc, char **argv)
char *proto=NULL;
char *statefile=NULL;
int bufsize=1024;
int xfersize=1024;
int nthreads=4;
int nstreams=4;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
while ( (c = getopt(argc, argv, "p:b:s:t:f:" )) != -1) {
while ( (c = getopt(argc, argv, "p:b:s:t:f:x:" )) != -1) {
switch (c) {
case 'p':
proto = strdup(optarg);
......@@ -69,8 +70,11 @@ int main(int argc, char **argv)
case 'f':
statefile = strdup(optarg);
break;
case 'x':
xfersize = atoi(optarg);
break;
default:
printf("usage: %s [-p address] [-b buffer_size] [-t threads] [-s streams] [-f statefile]\n", argv[0]);
printf("usage: %s [-p address] [-b buffer_size] [-t threads] [-s streams] [-f statefile] [-x xfersize]\n", argv[0]);
exit(-1);
}
}
......@@ -92,7 +96,7 @@ int main(int argc, char **argv)
if (rank == 0)
service_config_store(statefile, gid);
ret = bv_svc_provider_register(mid, abtio, ABT_POOL_NULL, gid, bufsize, &bv_id);
ret = bv_svc_provider_register(mid, abtio, ABT_POOL_NULL, gid, bufsize, xfersize, &bv_id);
free(proto);
free(statefile);
......
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