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
6b4707cd
Commit
6b4707cd
authored
Dec 10, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added network event types to workload api
parent
11959e72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
1 deletion
+124
-1
codes/codes-workload.h
codes/codes-workload.h
+56
-1
src/workload/codes-workload.c
src/workload/codes-workload.c
+68
-0
No files found.
codes/codes-workload.h
View file @
6b4707cd
...
...
@@ -65,6 +65,8 @@ enum codes_workload_op_type
CODES_WK_DELAY
,
/* block until specified ranks have reached the same point */
CODES_WK_BARRIER
,
/* IO operations */
/* open */
CODES_WK_OPEN
,
/* close */
...
...
@@ -72,7 +74,33 @@ enum codes_workload_op_type
/* write */
CODES_WK_WRITE
,
/* read */
CODES_WK_READ
CODES_WK_READ
,
/* network operations (modelled after MPI operations) */
/* blocking send operation */
CODES_WK_SEND
,
/* blocking recv operation */
CODES_WK_RECV
,
/* non-blocking send operation */
CODES_WK_ISEND
,
/* non-blocking receive operation */
CODES_WK_IRECV
,
/* broadcast operation */
CODES_WK_BCAST
,
/* Allgather operation */
CODES_WK_ALLGATHER
,
/* Allgatherv operation */
CODES_WK_ALLGATHERV
,
/* Alltoall operation */
CODES_WK_ALLTOALL
,
/* Alltoallv operation */
CODES_WK_ALLTOALLV
,
/* Reduce operation */
CODES_WK_REDUCE
,
/* Allreduce operation */
CODES_WK_ALLREDUCE
,
/* Generic collective operation */
CODES_WK_COL
,
};
/* I/O operation paramaters */
...
...
@@ -84,6 +112,9 @@ struct codes_workload_op
/* what type of operation this is */
enum
codes_workload_op_type
op_type
;
/* currently only used by network workloads */
double
start_time
;
double
end_time
;
/* parameters for each operation type */
union
...
...
@@ -112,6 +143,30 @@ struct codes_workload_op
struct
{
uint64_t
file_id
;
/* file to operate on */
}
close
;
struct
{
/* TODO: not sure why source rank is here */
int
source_rank
;
/* source rank of MPI send message */
int
dest_rank
;
/* dest rank of MPI send message */
int
num_bytes
;
/* number of bytes to be transferred over the network */
int
data_type
;
/* MPI data type to be matched with the recv */
int
count
;
/* number of elements to be received */
int
tag
;
/* tag of the message */
//int32_t request;
}
send
;
struct
{
/* TODO: not sure why source rank is here */
int
source_rank
;
/* source rank of MPI recv message */
int
dest_rank
;
/* dest rank of MPI recv message */
int
num_bytes
;
/* number of bytes to be transferred over the network */
int
data_type
;
/* MPI data type to be matched with the send */
int
count
;
/* number of elements to be sent */
int
tag
;
/* tag of the message */
//int32_t request;
}
recv
;
/* TODO: non-stub for other collectives */
struct
{
int
num_bytes
;
}
collective
;
}
u
;
};
...
...
src/workload/codes-workload.c
View file @
6b4707cd
...
...
@@ -213,6 +213,74 @@ void codes_workload_print_op(FILE *f, struct codes_workload_op *op, int rank){
rank
,
op
->
u
.
read
.
file_id
,
op
->
u
.
read
.
offset
,
op
->
u
.
read
.
size
);
break
;
case
CODES_WK_SEND
:
fprintf
(
f
,
"op: rank:%d type:send "
"src:%d dst:%d bytes:%d type:%d count:%d tag:%d
\n
"
,
rank
,
op
->
u
.
send
.
source_rank
,
op
->
u
.
send
.
dest_rank
,
op
->
u
.
send
.
num_bytes
,
op
->
u
.
send
.
data_type
,
op
->
u
.
send
.
count
,
op
->
u
.
send
.
tag
);
break
;
case
CODES_WK_RECV
:
fprintf
(
f
,
"op: rank:%d type:recv "
"src:%d dst:%d bytes:%d type:%d count:%d tag:%d
\n
"
,
rank
,
op
->
u
.
recv
.
source_rank
,
op
->
u
.
recv
.
dest_rank
,
op
->
u
.
recv
.
num_bytes
,
op
->
u
.
recv
.
data_type
,
op
->
u
.
recv
.
count
,
op
->
u
.
recv
.
tag
);
break
;
case
CODES_WK_ISEND
:
fprintf
(
f
,
"op: rank:%d type:isend "
"src:%d dst:%d bytes:%d type:%d count:%d tag:%d
\n
"
,
rank
,
op
->
u
.
send
.
source_rank
,
op
->
u
.
send
.
dest_rank
,
op
->
u
.
send
.
num_bytes
,
op
->
u
.
send
.
data_type
,
op
->
u
.
send
.
count
,
op
->
u
.
send
.
tag
);
break
;
case
CODES_WK_IRECV
:
fprintf
(
f
,
"op: rank:%d type:irecv "
"src:%d dst:%d bytes:%d type:%d count:%d tag:%d
\n
"
,
rank
,
op
->
u
.
recv
.
source_rank
,
op
->
u
.
recv
.
dest_rank
,
op
->
u
.
recv
.
num_bytes
,
op
->
u
.
recv
.
data_type
,
op
->
u
.
recv
.
count
,
op
->
u
.
recv
.
tag
);
break
;
case
CODES_WK_BCAST
:
fprintf
(
f
,
"op: rank:%d type:bcast "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_ALLGATHER
:
fprintf
(
f
,
"op: rank:%d type:allgather "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_ALLGATHERV
:
fprintf
(
f
,
"op: rank:%d type:allgatherv "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_ALLTOALL
:
fprintf
(
f
,
"op: rank:%d type:alltoall "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_ALLTOALLV
:
fprintf
(
f
,
"op: rank:%d type:alltoallv "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_REDUCE
:
fprintf
(
f
,
"op: rank:%d type:reduce "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_ALLREDUCE
:
fprintf
(
f
,
"op: rank:%d type:allreduce "
"bytes:%d
\n
"
,
rank
,
op
->
u
.
collective
.
num_bytes
);
break
;
case
CODES_WK_COL
:
fprintf
(
f
,
"op: rank:? type:collective "
"bytes:%d
\n
"
,
op
->
u
.
collective
.
num_bytes
);
break
;
default:
tw_error
(
TW_LOC
,
"codes_workload_print_op: unrecognized workload type "
"(op code %d)
\n
"
,
op
->
op_type
);
}
}
...
...
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