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
a990bdc3
Commit
a990bdc3
authored
Feb 26, 2015
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merging latest changes in master with workload-combine
parent
d1e89c8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
7 deletions
+117
-7
INSTALL
INSTALL
+2
-0
codes/codes-workload.h
codes/codes-workload.h
+21
-2
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
+94
-5
No files found.
INSTALL
View file @
a990bdc3
...
...
@@ -31,6 +31,8 @@ release (0.3.0), ROSS's latest commit hash was c04babe, so this revision is
cd build
../configure --with-ross=/path/to/ross/install --prefix=/path/to/codes-base/install CC=mpicc
To enable network tracing with dumpi, use optional --with-dumpi = /path/to/dumpi/install with configure.
3 - Build and install codes-base
make && make install
...
...
codes/codes-workload.h
View file @
a990bdc3
...
...
@@ -116,6 +116,16 @@ enum codes_workload_op_type
CODES_WK_ALLREDUCE
,
/* Generic collective operation */
CODES_WK_COL
,
/* Waitall operation */
CODES_NW_WAITALL
,
/* Wait operation */
CODES_NW_WAIT
,
/* Waitsome operation */
CODES_NW_WAITSOME
,
/* Waitany operation */
CODES_NW_WAITANY
,
/* Testall operation */
CODES_NW_TESTALL
,
};
/* I/O operation paramaters */
...
...
@@ -130,12 +140,14 @@ struct codes_workload_op
/* currently only used by network workloads */
double
start_time
;
double
end_time
;
double
sim_start_time
;
/* parameters for each operation type */
union
{
struct
{
double
seconds
;
double
nsecs
;
}
delay
;
struct
{
int
count
;
/* num ranks in barrier, -1 means "all" */
...
...
@@ -166,7 +178,7 @@ struct codes_workload_op
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
;
int16_t
req_id
;
}
send
;
struct
{
/* TODO: not sure why source rank is here */
...
...
@@ -176,12 +188,19 @@ struct codes_workload_op
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
;
int16_t
req_id
;
}
recv
;
/* TODO: non-stub for other collectives */
struct
{
int
num_bytes
;
}
collective
;
struct
{
int
count
;
int16_t
*
req_ids
;
}
waits
;
struct
{
int16_t
req_id
;
}
wait
;
}
u
;
};
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
a990bdc3
...
...
@@ -164,6 +164,93 @@ int handleDUMPIGeneric(const void* prm, uint16_t thread, const dumpi_time *cpu,
return
0
;
}
int
handleDUMPIWait
(
const
dumpi_wait
*
prm
,
uint16_t
thread
,
const
dumpi_time
*
cpu
,
const
dumpi_time
*
wall
,
const
dumpi_perfinfo
*
perf
,
void
*
userarg
)
{
rank_mpi_context
*
myctx
=
(
rank_mpi_context
*
)
userarg
;
struct
codes_workload_op
wrkld_per_rank
;
wrkld_per_rank
.
op_type
=
CODES_NW_WAIT
;
wrkld_per_rank
.
u
.
wait
.
req_id
=
prm
->
request
;
wrkld_per_rank
.
start_time
=
cpu
->
start
.
nsec
;
wrkld_per_rank
.
end_time
=
cpu
->
stop
.
nsec
;
dumpi_insert_next_op
(
myctx
->
dumpi_mpi_array
,
&
wrkld_per_rank
);
update_compute_time
(
cpu
,
myctx
);
return
0
;
}
int
handleDUMPIWaitsome
(
const
dumpi_waitsome
*
prm
,
uint16_t
thread
,
const
dumpi_time
*
cpu
,
const
dumpi_time
*
wall
,
const
dumpi_perfinfo
*
perf
,
void
*
userarg
)
{
int
i
;
rank_mpi_context
*
myctx
=
(
rank_mpi_context
*
)
userarg
;
struct
codes_workload_op
wrkld_per_rank
;
wrkld_per_rank
.
op_type
=
CODES_NW_WAITSOME
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int16_t
*
)
malloc
(
prm
->
count
*
sizeof
(
int16_t
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
(
int16_t
)
prm
->
requests
[
i
];
wrkld_per_rank
.
start_time
=
cpu
->
start
.
nsec
;
wrkld_per_rank
.
end_time
=
cpu
->
stop
.
nsec
;
dumpi_insert_next_op
(
myctx
->
dumpi_mpi_array
,
&
wrkld_per_rank
);
update_compute_time
(
cpu
,
myctx
);
return
0
;
}
int
handleDUMPIWaitany
(
const
dumpi_waitany
*
prm
,
uint16_t
thread
,
const
dumpi_time
*
cpu
,
const
dumpi_time
*
wall
,
const
dumpi_perfinfo
*
perf
,
void
*
userarg
)
{
int
i
;
rank_mpi_context
*
myctx
=
(
rank_mpi_context
*
)
userarg
;
struct
codes_workload_op
wrkld_per_rank
;
wrkld_per_rank
.
op_type
=
CODES_NW_WAITANY
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int16_t
*
)
malloc
(
prm
->
count
*
sizeof
(
int16_t
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
(
int16_t
)
prm
->
requests
[
i
];
wrkld_per_rank
.
start_time
=
cpu
->
start
.
nsec
;
wrkld_per_rank
.
end_time
=
cpu
->
stop
.
nsec
;
dumpi_insert_next_op
(
myctx
->
dumpi_mpi_array
,
&
wrkld_per_rank
);
update_compute_time
(
cpu
,
myctx
);
return
0
;
}
int
handleDUMPIWaitall
(
const
dumpi_waitall
*
prm
,
uint16_t
thread
,
const
dumpi_time
*
cpu
,
const
dumpi_time
*
wall
,
const
dumpi_perfinfo
*
perf
,
void
*
userarg
)
{
int
i
;
rank_mpi_context
*
myctx
=
(
rank_mpi_context
*
)
userarg
;
struct
codes_workload_op
wrkld_per_rank
;
wrkld_per_rank
.
op_type
=
CODES_NW_WAITALL
;
wrkld_per_rank
.
u
.
waits
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
waits
.
req_ids
=
(
int16_t
*
)
malloc
(
prm
->
count
*
sizeof
(
int16_t
));
for
(
i
=
0
;
i
<
prm
->
count
;
i
++
)
wrkld_per_rank
.
u
.
waits
.
req_ids
[
i
]
=
prm
->
requests
[
i
];
wrkld_per_rank
.
start_time
=
cpu
->
start
.
nsec
;
wrkld_per_rank
.
end_time
=
cpu
->
stop
.
nsec
;
dumpi_insert_next_op
(
myctx
->
dumpi_mpi_array
,
&
wrkld_per_rank
);
update_compute_time
(
cpu
,
myctx
);
return
0
;
}
int
handleDUMPIISend
(
const
dumpi_isend
*
prm
,
uint16_t
thread
,
const
dumpi_time
*
cpu
,
const
dumpi_time
*
wall
,
const
dumpi_perfinfo
*
perf
,
void
*
userarg
)
{
rank_mpi_context
*
myctx
=
(
rank_mpi_context
*
)
userarg
;
...
...
@@ -175,6 +262,7 @@ int handleDUMPIISend(const dumpi_isend *prm, uint16_t thread, const dumpi_time *
wrkld_per_rank
.
u
.
send
.
count
=
prm
->
count
;
wrkld_per_rank
.
u
.
send
.
data_type
=
prm
->
datatype
;
wrkld_per_rank
.
u
.
send
.
num_bytes
=
prm
->
count
*
get_num_bytes
(
prm
->
datatype
);
wrkld_per_rank
.
u
.
send
.
req_id
=
prm
->
request
;
wrkld_per_rank
.
u
.
send
.
dest_rank
=
prm
->
dest
;
wrkld_per_rank
.
u
.
send
.
source_rank
=
myctx
->
my_rank
;
wrkld_per_rank
.
start_time
=
cpu
->
start
.
nsec
;
...
...
@@ -202,6 +290,7 @@ int handleDUMPIIRecv(const dumpi_irecv *prm, uint16_t thread, const dumpi_time *
wrkld_per_rank
->
u
.
recv
.
dest_rank
=
-
1
;
wrkld_per_rank
->
start_time
=
cpu
->
start
.
nsec
;
wrkld_per_rank
->
end_time
=
cpu
->
stop
.
nsec
;
wrkld_per_rank
->
u
.
recv
.
req_id
=
prm
->
request
;
assert
(
wrkld_per_rank
->
u
.
recv
.
num_bytes
>
0
);
dumpi_insert_next_op
(
myctx
->
dumpi_mpi_array
,
wrkld_per_rank
);
...
...
@@ -423,7 +512,7 @@ int dumpi_trace_nw_workload_load(const char* params, int rank)
if
(
!
rank_tbl
)
{
rank_tbl
=
qhash_init
(
hash_rank_compare
,
quickhash_
32
bit_hash
,
RANK_HASH_TABLE_SIZE
);
rank_tbl
=
qhash_init
(
hash_rank_compare
,
quickhash_
64
bit_hash
,
RANK_HASH_TABLE_SIZE
);
if
(
!
rank_tbl
)
return
-
1
;
}
...
...
@@ -468,14 +557,14 @@ int dumpi_trace_nw_workload_load(const char* params, int rank)
callbacks
.
on_ibsend
=
(
dumpi_ibsend_call
)
handleDUMPIGeneric
;
callbacks
.
on_issend
=
(
dumpi_issend_call
)
handleDUMPIGeneric
;
callbacks
.
on_irsend
=
(
dumpi_irsend_call
)
handleDUMPIGeneric
;
callbacks
.
on_wait
=
(
dumpi_wait_call
)
handleDUMPI
Generic
;
callbacks
.
on_wait
=
(
dumpi_wait_call
)
handleDUMPI
Wait
;
callbacks
.
on_test
=
(
dumpi_test_call
)
handleDUMPIGeneric
;
callbacks
.
on_request_free
=
(
dumpi_request_free_call
)
handleDUMPIGeneric
;
callbacks
.
on_waitany
=
(
dumpi_waitany_call
)
handleDUMPI
Generic
;
callbacks
.
on_waitany
=
(
dumpi_waitany_call
)
handleDUMPI
Waitany
;
callbacks
.
on_testany
=
(
dumpi_testany_call
)
handleDUMPIGeneric
;
callbacks
.
on_waitall
=
(
dumpi_waitall_call
)
handleDUMPI
Generic
;
callbacks
.
on_waitall
=
(
dumpi_waitall_call
)
handleDUMPI
Waitall
;
callbacks
.
on_testall
=
(
dumpi_testall_call
)
handleDUMPIGeneric
;
callbacks
.
on_waitsome
=
(
dumpi_waitsome_call
)
handleDUMPI
Generic
;
callbacks
.
on_waitsome
=
(
dumpi_waitsome_call
)
handleDUMPI
Waitsome
;
callbacks
.
on_testsome
=
(
dumpi_testsome_call
)
handleDUMPIGeneric
;
callbacks
.
on_iprobe
=
(
dumpi_iprobe_call
)
handleDUMPIGeneric
;
callbacks
.
on_probe
=
(
dumpi_probe_call
)
handleDUMPIGeneric
;
...
...
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