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
ae4ab9e3
Commit
ae4ab9e3
authored
Nov 02, 2018
by
Neil McGlohon
Committed by
Misbah Mubarak
Nov 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SWM_Compute now considers CPU Frequency
parent
7eea28f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/workload/methods/codes-online-comm-wrkld.C
src/workload/methods/codes-online-comm-wrkld.C
+10
-4
No files found.
src/workload/methods/codes-online-comm-wrkld.C
View file @
ae4ab9e3
...
...
@@ -27,6 +27,7 @@
#define ALLREDUCE_SHORT_MSG_SIZE 2048
//#define DBG_COMM 0
using
namespace
std
;
...
...
@@ -36,7 +37,7 @@ static int rank_tbl_pop = 0;
static
int
total_rank_cnt
=
0
;
ABT_thread
global_prod_thread
=
NULL
;
ABT_xstream
self_es
;
long
cpu_freq
=
1
.
0
;
double
cpu_freq
=
1
.
0
;
long
num_allreduce
=
0
;
long
num_isends
=
0
;
long
num_irecvs
=
0
;
...
...
@@ -324,17 +325,22 @@ void SWM_Irecv(SWM_PEER peer,
void
SWM_Compute
(
long
cycle_count
)
{
//NM: noting that cpu_frequency has been loaded in comm_online_workload_load() as GHz, e.g. cpu_freq = 2.0 means 2.0GHz
if
(
!
cpu_freq
)
cpu_freq
=
2
.
0
;
/* Add an event in the shared queue and then yield */
struct
codes_workload_op
wrkld_per_rank
;
double
cpu_freq_hz
=
cpu_freq
*
1000
.
0
*
1000
.
0
*
1000
.
0
;
double
delay_in_seconds
=
cycle_count
/
cpu_freq_hz
;
double
delay_in_ns
=
delay_in_seconds
*
1000
.
0
*
1000
.
0
*
1000
.
0
;
wrkld_per_rank
.
op_type
=
CODES_WK_DELAY
;
/* TODO: Check how to convert cycle count into delay? */
wrkld_per_rank
.
u
.
delay
.
nsecs
=
cycle_count
;
wrkld_per_rank
.
u
.
delay
.
seconds
=
(
cycle_count
)
/
(
1000
.
0
*
1000
.
0
*
1000
.
0
)
;
wrkld_per_rank
.
u
.
delay
.
nsecs
=
delay_in_ns
;
wrkld_per_rank
.
u
.
delay
.
seconds
=
delay_in_seconds
;
#ifdef DBG_COMM
printf
(
"
\n
compute op delay: %ld "
,
cycle_count
);
printf
(
"
\n
compute op delay: %ld "
,
delay_in_ns
);
#endif
/* Retreive the shared context state */
ABT_thread
prod
;
...
...
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