Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
abt-io
Commits
86007654
Commit
86007654
authored
Jan 11, 2016
by
Philip Carns
Browse files
more incremental progress on porting benchmark
parent
3b3be0b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/Makefile.subdir
View file @
86007654
bin_PROGRAMS
+=
examples/concurrent-write-bench
examples_concurrent_write_bench_SOURCES
=
\
examples/concurrent-write-bench.c
\
examples_c
lient
_LDADD
=
src/libabt-io.a
examples/concurrent-write-bench.c
examples_c
oncurrent_write_bench
_LDADD
=
src/libabt-io.a
examples/concurrent-write-bench.c
View file @
86007654
...
...
@@ -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_e
io_write(
FBR_A_
arg->fd, buffer, arg->size, my_offset
, 0
);
ret
=
abt_
io_
p
write
(
arg
->
aid
,
arg
->
fd
,
buffer
,
arg
->
size
,
my_offset
);
assert
(
ret
==
arg
->
size
);
now
=
wtime
();
}
#endif
return
;
}
...
...
include/abt-io.h
View file @
86007654
...
...
@@ -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
Marg
o instance
* @param [in] aid
abt-i
o instance
*/
void
abt_io_finalize
(
abt_io_instance_id
aid
);
...
...
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