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
ssg
Commits
4e26c7a1
Commit
4e26c7a1
authored
Jan 26, 2018
by
Philip Carns
Browse files
start some correctness testing and timing
parent
e9bd50d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/perf-regression/margo-p2p-bw.c
View file @
4e26c7a1
...
...
@@ -61,6 +61,8 @@ struct bw_worker_arg
size_t
*
cur_off
;
hg_bulk_t
*
client_bulk_handle
;
const
hg_addr_t
*
target_addr
;
hg_size_t
bytes_moved
;
double
end_ts
;
};
static
void
bw_worker
(
void
*
_arg
);
...
...
@@ -450,7 +452,7 @@ static void bw_ult(hg_handle_t handle)
tid_array
=
malloc
(
g_opts
.
concurrency
*
sizeof
(
*
tid_array
));
assert
(
tid_array
);
arg_array
=
m
alloc
(
g_opts
.
concurrency
*
sizeof
(
*
arg_array
));
arg_array
=
c
alloc
(
g_opts
.
concurrency
,
sizeof
(
*
arg_array
));
assert
(
arg_array
);
start_time
=
ABT_get_wtime
();
...
...
@@ -474,6 +476,10 @@ static void bw_ult(hg_handle_t handle)
ABT_thread_free
(
&
tid_array
[
i
]);
}
/* TODO: check buffer contents (stop at min of (g_buffer_size rounded
* down to nearest xfer_size) and total bytes moved)
*/
margo_respond
(
handle
,
NULL
);
margo_free_input
(
handle
,
&
in
);
margo_destroy
(
handle
);
...
...
@@ -497,6 +503,11 @@ static int run_benchmark(hg_id_t id, ssg_member_id_t target,
int
ret
;
bw_rpc_in_t
in
;
void
*
buffer
=
g_buffer
;
hg_size_t
i
;
/* fill pattern in origin buffer */
for
(
i
=
0
;
i
<
(
g_buffer_size
/
sizeof
(
i
));
i
++
)
((
hg_size_t
*
)
buffer
)[
i
]
=
i
;
target_addr
=
ssg_get_addr
(
gid
,
target
);
assert
(
target_addr
!=
HG_ADDR_NULL
);
...
...
@@ -612,8 +623,10 @@ static void bw_worker(void *_arg)
*
arg
->
target_addr
,
*
arg
->
client_bulk_handle
,
my_off
,
g_bulk_handle
,
my_off
,
g_opts
.
xfer_size
);
assert
(
ret
==
0
);
arg
->
bytes_moved
+=
g_opts
.
xfer_size
;
now
=
ABT_get_wtime
();
}
arg
->
end_ts
=
now
;
printf
(
"# DBG: worker stopped.
\n
"
);
return
;
...
...
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