Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
39996c54
Commit
39996c54
authored
Mar 01, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes to collectives so that the code can build
parent
a0a58558
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
codes-online-comm-wrkld.C
src/workload/methods/codes-online-comm-wrkld.C
+14
-17
No files found.
src/workload/methods/codes-online-comm-wrkld.C
View file @
39996c54
...
...
@@ -142,7 +142,7 @@ void SWM_Barrier(
ABT_thread
prod
;
void
*
arg
;
int
err
;
int
rank
,
size
,
src
,
dst
,
mask
;
int
rank
,
size
,
src
,
d
e
st
,
mask
;
err
=
ABT_thread_self
(
&
prod
);
assert
(
err
==
ABT_SUCCESS
);
...
...
@@ -155,14 +155,11 @@ void SWM_Barrier(
mask
=
0x1
;
while
(
mask
<
size
)
{
dst
=
(
rank
+
mask
)
%
size
;
d
e
st
=
(
rank
+
mask
)
%
size
;
src
=
(
rank
-
mask
+
size
)
%
size
;
args
.
dest
=
dst
;
args
.
source
=
src
;
SWM_Sendrecv
(
comm_id
,
dest
,
1234
,
reqvc
,
rspvc
,
NULL
,
0
,
0
,
src
,
1234
,
NULL
,
reqrt
,
rsprt
);
SWM_Sendrecv
(
comm_id
,
dest
,
1234
,
reqvc
,
rspvc
,
0
,
0
,
0
,
src
,
1234
,
0
,
reqrt
,
rsprt
);
mask
<<=
1
;
}
}
...
...
@@ -472,10 +469,10 @@ void SWM_Allreduce(
remaining processes form a nice power-of-two. */
if
(
rank
<
2
*
rem
)
{
if
(
rank
%
2
==
0
)
{
/* even */
SWM_Send
(
rank
+
1
,
comm_id
,
1235
,
sendreqvc
,
sendrspvc
,
NULL
,
count
,
1
,
0
,
0
);
SWM_Send
(
rank
+
1
,
comm_id
,
1235
,
sendreqvc
,
sendrspvc
,
0
,
count
,
1
,
0
,
0
);
newrank
=
-
1
;
}
else
{
/* odd */
SWM_Recv
(
rank
-
1
,
comm_id
,
1235
,
NULL
);
SWM_Recv
(
rank
-
1
,
comm_id
,
1235
,
0
);
newrank
=
rank
/
2
;
}
}
else
{
...
...
@@ -498,8 +495,8 @@ void SWM_Allreduce(
newdst
=
newrank
^
mask
;
dst
=
(
newdst
<
rem
)
?
newdst
*
2
+
1
:
newdst
+
rem
;
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
NULL
,
count
,
1
,
dst
,
1235
,
NULL
,
0
,
0
);
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
0
,
count
,
1
,
dst
,
1235
,
0
,
0
,
0
);
mask
<<=
1
;
}
...
...
@@ -541,8 +538,8 @@ void SWM_Allreduce(
recv_cnt
+=
cnts
[
i
];
}
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
NULL
,
send_cnt
,
1
,
dst
,
1235
,
NULL
,
0
,
0
);
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
0
,
send_cnt
,
1
,
dst
,
1235
,
0
,
0
,
0
);
send_idx
=
recv_idx
;
mask
<<=
1
;
...
...
@@ -576,8 +573,8 @@ void SWM_Allreduce(
recv_cnt
+=
cnts
[
i
];
}
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
NULL
,
send_cnt
,
1
,
dst
,
1235
,
NULL
,
0
,
0
);
SWM_Sendrecv
(
comm_id
,
dst
,
1235
,
sendreqvc
,
sendrspvc
,
0
,
send_cnt
,
1
,
dst
,
1235
,
0
,
0
,
0
);
if
(
newrank
>
newdst
)
send_idx
=
recv_idx
;
...
...
@@ -588,9 +585,9 @@ void SWM_Allreduce(
if
(
rank
<
2
*
rem
)
{
if
(
rank
%
2
)
{
/* odd */
SWM_Send
(
rank
-
1
,
comm_id
,
1235
,
sendreqvc
,
sendrspvc
,
NULL
,
count
,
1
,
0
,
0
);
SWM_Send
(
rank
-
1
,
comm_id
,
1235
,
sendreqvc
,
sendrspvc
,
0
,
count
,
1
,
0
,
0
);
}
else
{
SWM_Recv
(
rank
+
1
,
comm_id
,
1235
,
NULL
);
SWM_Recv
(
rank
+
1
,
comm_id
,
1235
,
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