Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
9e55e435
Commit
9e55e435
authored
Sep 17, 2013
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
committing incremental progress on test program
parent
3322359d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
tests/codes-workload-test.c
tests/codes-workload-test.c
+21
-7
No files found.
tests/codes-workload-test.c
View file @
9e55e435
...
...
@@ -56,6 +56,7 @@ struct client_msg
struct
svr_msg
{
enum
svr_event_type
event_type
;
struct
codes_workload_op
op
;
tw_lpid
src
;
/* source of this request or ack */
};
...
...
@@ -353,6 +354,9 @@ static void handle_client_op_loop_event(
tw_lp
*
lp
)
{
struct
codes_workload_op
op
;
tw_event
*
e
;
svr_msg
*
m_out
;
tw_lpid
dest_svr_id
;
printf
(
"handle_client_op_loop_event(), lp %llu.
\n
"
,
(
unsigned
long
long
)
lp
->
gid
);
...
...
@@ -365,16 +369,26 @@ static void handle_client_op_loop_event(
codes_workload_get_next
(
ns
->
wkld_id
,
ns
->
my_rank
,
&
op
);
if
(
op
.
op_type
==
CODES_WK_END
)
{
printf
(
"Client rank %d completed workload.
\n
"
,
ns
->
my_rank
);
/* done */
}
else
switch
(
op
.
op_type
)
{
/* TODO: continue here */
case
CODES_WK_END
:
printf
(
"Client rank %d completed workload.
\n
"
,
ns
->
my_rank
);
return
;
break
;
case
CODES_WK_OPEN
:
dest_svr_id
=
NUM_CLIENTS
+
op
.
u
.
open
.
file_id
%
NUM_SERVERS
;
break
;
default:
assert
(
0
);
break
;
}
e
=
codes_event_new
(
dest_svr_id
,
1
,
lp
);
m_out
=
tw_event_data
(
e
);
m_out
->
event_type
=
SVR_OP
;
m_out
->
op
=
op
;
tw_event_send
(
e
);
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