Commit 86007654 authored by Philip Carns's avatar Philip Carns
Browse files

more incremental progress on porting benchmark

parent 3b3be0b0
bin_PROGRAMS += examples/concurrent-write-bench
examples_concurrent_write_bench_SOURCES = \
examples/concurrent-write-bench.c \
examples_client_LDADD = src/libabt-io.a
examples/concurrent-write-bench.c
examples_concurrent_write_bench_LDADD = src/libabt-io.a
......@@ -31,6 +31,7 @@ struct write_abt_arg
off_t *next_offset;
int fd;
double duration;
abt_io_instance_id aid;
};
static void write_abt_bench(void *_arg);
......@@ -252,8 +253,7 @@ static void pthread_bench(unsigned int concurrency, size_t size, double duration
static void write_abt_bench(void *_arg)
{
#if 0
struct write_fbr_arg* arg = _arg;
struct write_abt_arg* arg = _arg;
off_t my_offset;
void *buffer;
size_t ret;
......@@ -265,17 +265,16 @@ static void write_abt_bench(void *_arg)
double now = wtime();
while((now-arg->start_time) < arg->duration)
{
fbr_mutex_lock(FBR_A_ arg->mutex);
ABT_mutex_lock(*arg->mutex);
my_offset = *arg->next_offset;
(*arg->next_offset) += arg->size;
fbr_mutex_unlock(FBR_A_ arg->mutex);
ABT_mutex_unlock(*arg->mutex);
ret = fbr_eio_write(FBR_A_ arg->fd, buffer, arg->size, my_offset, 0);
ret = abt_io_pwrite(arg->aid, arg->fd, buffer, arg->size, my_offset);
assert(ret == arg->size);
now = wtime();
}
#endif
return;
}
......
......@@ -28,7 +28,7 @@ abt_io_instance_id abt_io_init(ABT_pool progress_pool);
/**
* Shuts down abt_io library and its underlying resources
* @param [in] aid Margo instance
* @param [in] aid abt-io instance
*/
void abt_io_finalize(abt_io_instance_id aid);
......
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