Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xin Wang
codes-dev
Commits
99da5a40
Commit
99da5a40
authored
Sep 28, 2017
by
Xin Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master'
parents
bae020ee
e08008cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
25 deletions
+32
-25
codes/codes-workload.h
codes/codes-workload.h
+5
-5
src/network-workloads/model-net-mpi-replay.c
src/network-workloads/model-net-mpi-replay.c
+22
-15
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+5
-5
No files found.
codes/codes-workload.h
View file @
99da5a40
...
...
@@ -198,7 +198,7 @@ struct codes_workload_op
int16_t
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 */
int
req_id
;
unsigned
int
req_id
;
}
send
;
struct
{
/* TODO: not sure why source rank is here */
...
...
@@ -208,7 +208,7 @@ struct codes_workload_op
int16_t
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 */
int
req_id
;
unsigned
int
req_id
;
}
recv
;
/* TODO: non-stub for other collectives */
struct
{
...
...
@@ -216,14 +216,14 @@ struct codes_workload_op
}
collective
;
struct
{
int
count
;
int
*
req_ids
;
unsigned
int
*
req_ids
;
}
waits
;
struct
{
int
req_id
;
unsigned
int
req_id
;
}
wait
;
struct
{
int
req_id
;
unsigned
int
req_id
;
}
free
;
}
u
;
...
...
src/network-workloads/model-net-mpi-replay.c
View file @
99da5a40
...
...
@@ -92,7 +92,7 @@ static char cortex_gen[512] = "\0";
typedef
struct
nw_state
nw_state
;
typedef
struct
nw_message
nw_message
;
typedef
int
dumpi_req_id
;
typedef
unsigned
int
dumpi_req_id
;
static
int
net_id
=
0
;
static
float
noise
=
2
.
0
;
...
...
@@ -179,7 +179,7 @@ struct mpi_msgs_queue
/* stores request IDs of completed MPI operations (Isends or Irecvs) */
struct
completed_requests
{
int
req_id
;
unsigned
int
req_id
;
struct
qlist_head
ql
;
int
index
;
};
...
...
@@ -188,7 +188,7 @@ struct completed_requests
struct
pending_waits
{
int
op_type
;
int
req_ids
[
MAX_WAIT_REQS
];
unsigned
int
req_ids
[
MAX_WAIT_REQS
];
int
num_completed
;
int
count
;
tw_stime
start_time
;
...
...
@@ -316,7 +316,7 @@ struct nw_message
double
sim_start_time
;
// for callbacks - time message was received
double
msg_send_time
;
int
req_id
;
unsigned
int
req_id
;
int
matched_req
;
int
tag
;
int
app_id
;
...
...
@@ -793,7 +793,7 @@ static void print_msgs_queue(struct qlist_head * head, int is_send)
printf
(
"
\n
Source %d Dest %d bytes %"
PRId64
" tag %d "
,
current
->
source_rank
,
current
->
dest_rank
,
current
->
num_bytes
,
current
->
tag
);
}
}
/*
static void print_completed_queue(tw_lp * lp, struct qlist_head * head)
static
void
print_completed_queue
(
tw_lp
*
lp
,
struct
qlist_head
*
head
)
{
// printf("\n Completed queue: ");
struct
qlist_head
*
ent
=
NULL
;
...
...
@@ -804,10 +804,10 @@ static void print_msgs_queue(struct qlist_head * head, int is_send)
current
=
qlist_entry
(
ent
,
completed_requests
,
ql
);
tw_output
(
lp
,
" %llu "
,
current
->
req_id
);
}
}
*/
}
static
int
clear_completed_reqs
(
nw_state
*
s
,
tw_lp
*
lp
,
int
*
reqs
,
int
count
)
unsigned
int
*
reqs
,
int
count
)
{
(
void
)
s
;
(
void
)
lp
;
...
...
@@ -892,7 +892,7 @@ static tw_lpid rank_to_lpid(int rank)
static
int
notify_posted_wait
(
nw_state
*
s
,
tw_bf
*
bf
,
nw_message
*
m
,
tw_lp
*
lp
,
int
completed_req
)
unsigned
int
completed_req
)
{
(
void
)
bf
;
...
...
@@ -980,8 +980,10 @@ static void codes_exec_mpi_wait_rc(nw_state* s, tw_bf * bf, tw_lp* lp, nw_messag
static
void
codes_exec_mpi_wait
(
nw_state
*
s
,
tw_bf
*
bf
,
nw_message
*
m
,
tw_lp
*
lp
,
struct
codes_workload_op
*
mpi_op
)
{
/* check in the completed receives queue if the request ID has already been completed.*/
// printf("\n Wait posted rank id %d ", s->nw_id);
assert
(
!
s
->
wait_op
);
int
req_id
=
mpi_op
->
u
.
wait
.
req_id
;
unsigned
int
req_id
=
mpi_op
->
u
.
wait
.
req_id
;
struct
completed_requests
*
current
=
NULL
;
...
...
@@ -997,11 +999,11 @@ static void codes_exec_mpi_wait(nw_state* s, tw_bf * bf, nw_message * m, tw_lp*
rc_stack_push
(
lp
,
current
,
free
,
s
->
processed_ops
);
codes_issue_next_event
(
lp
);
m
->
fwd
.
found_match
=
index
;
/*
if(s->nw_id == (tw_lpid)TRACK_LP)
if
(
s
->
nw_id
==
(
tw_lpid
)
TRACK_LP
)
{
tw_output
(
lp
,
"
\n
wait matched at post %d "
,
req_id
);
print_completed_queue
(
lp
,
&
s
->
completed_reqs
);
}
*/
}
return
;
}
++
index
;
...
...
@@ -1105,7 +1107,7 @@ static void codes_exec_mpi_wait_all(
/* check number of completed irecvs in the completion queue */
for
(
i
=
0
;
i
<
count
;
i
++
)
{
int
req_id
=
mpi_op
->
u
.
waits
.
req_ids
[
i
];
unsigned
int
req_id
=
mpi_op
->
u
.
waits
.
req_ids
[
i
];
struct
qlist_head
*
ent
=
NULL
;
struct
completed_requests
*
current
=
NULL
;
qlist_for_each
(
ent
,
&
s
->
completed_reqs
)
...
...
@@ -1270,6 +1272,12 @@ static int rm_matching_send(nw_state * ns,
bf
->
c9
=
1
;
update_completed_queue
(
ns
,
bf
,
m
,
lp
,
qitem
->
req_id
);
}
else
if
(
qitem
->
op_type
==
CODES_WK_RECV
&&
!
is_rend
)
{
bf
->
c6
=
1
;
codes_issue_next_event
(
lp
);
}
qlist_del
(
&
qi
->
ql
);
...
...
@@ -1426,9 +1434,8 @@ static void codes_exec_mpi_recv(
}
else
{
bf
->
c6
=
1
;
//
bf->c6 = 1;
m
->
fwd
.
found_match
=
found_matching_sends
;
codes_issue_next_event
(
lp
);
}
}
...
...
@@ -2100,7 +2107,7 @@ void nw_test_event_handler(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
else
if
(
m
->
op_type
==
CODES_WK_ISEND
&&
(
is_eager
==
1
||
m
->
fwd
.
rend_send
==
1
))
{
//
tw_output(lp, "\n isend req id %llu ", m->fwd.req_id);
//
tw_output(lp, "\n isend req id %llu ", m->fwd.req_id);
bf
->
c28
=
1
;
update_completed_queue
(
s
,
bf
,
m
,
lp
,
m
->
fwd
.
req_id
);
}
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
99da5a40
...
...
@@ -55,7 +55,7 @@ typedef struct rank_mpi_context
int
my_app_id
;
// whether we've seen an init op (needed for timing correctness)
int
is_init
;
int
num_reqs
;
unsigned
int
num_reqs
;
unsigned
int
num_ops
;
int64_t
my_rank
;
double
last_op_time
;
...
...
@@ -347,7 +347,7 @@ int handleDUMPIWaitsome(const dumpi_waitsome *prm, uint16_t thread,
wrkld_per_rank
.
op_type
=
CODES_WK_WAITSOME
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int
*
)
malloc
(
prm
->
count
*
sizeof
(
int
));
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
unsigned
int
*
)
malloc
(
prm
->
count
*
sizeof
(
unsigned
int
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
prm
->
requests
[
i
];
...
...
@@ -372,7 +372,7 @@ int handleDUMPIWaitany(const dumpi_waitany *prm, uint16_t thread,
wrkld_per_rank
.
op_type
=
CODES_WK_WAITANY
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int
*
)
malloc
(
prm
->
count
*
sizeof
(
int
));
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
unsigned
int
*
)
malloc
(
prm
->
count
*
sizeof
(
unsigned
int
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
prm
->
requests
[
i
];
...
...
@@ -398,7 +398,7 @@ int handleDUMPIWaitall(const dumpi_waitall *prm, uint16_t thread,
wrkld_per_rank
.
op_type
=
CODES_WK_WAITALL
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int
*
)
malloc
(
prm
->
count
*
sizeof
(
int
));
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
unsigned
int
*
)
malloc
(
prm
->
count
*
sizeof
(
unsigned
int
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
prm
->
requests
[
i
];
...
...
@@ -546,7 +546,6 @@ int handleDUMPISendrecv(const dumpi_sendrecv* prm, uint16_t thread,
update_times_and_insert
(
&
wrkld_per_rank
,
wall
,
myctx
);
}
/* issue a blocking receive */
{
struct
codes_workload_op
wrkld_per_rank
;
...
...
@@ -575,6 +574,7 @@ int handleDUMPISendrecv(const dumpi_sendrecv* prm, uint16_t thread,
myctx
->
num_reqs
++
;
}
return
0
;
}
...
...
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