Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TAPIOCA
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Francois Tessier
TAPIOCA
Commits
6a1d647a
Commit
6a1d647a
authored
Apr 17, 2017
by
Francois Tessier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First attempt to fix the Fence bug on XC40. Need to try out on Theta.
parent
28930113
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
22 deletions
+35
-22
tapioca.cpp
tapioca.cpp
+33
-20
tapioca.hpp
tapioca.hpp
+2
-2
No files found.
tapioca.cpp
View file @
6a1d647a
...
...
@@ -192,12 +192,19 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
* Wait if it's not the appropriate round
*/
while
(
this
->
roundsIds
[
targetRoundIdx
]
>
this
->
currentRound_
)
{
/* TODO: Need to add a condition. What if only one aggr is necessary during the last round ?*/
for
(
i
=
0
;
i
<
this
->
nAggr_
;
i
++
)
{
fprintf
(
stdout
,
"[INFO] %d calls 1st GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
GlobalFence
(
var
);
fprintf
(
stdout
,
"[INFO] %d passes 1st GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
currentFence_
++
;
this
->
roundCounter_
++
;
#ifdef XC40
if
(
this
->
totalNeededBuffers_
!=
this
->
countNeededBuffers_
)
{
#endif
fprintf
(
stdout
,
"[INFO] %d calls 1st GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
GlobalFence
(
var
);
fprintf
(
stdout
,
"[INFO] %d passes 1st GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
currentFence_
++
;
this
->
countNeededBuffers_
++
;
#ifdef XC40
}
#endif
}
if
(
this
->
amAnAggr_
)
{
...
...
@@ -242,13 +249,20 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
* If all the data have been written, wait
*/
if
(
this
->
currentDataSize_
==
this
->
rankDataSize_
)
{
while
(
this
->
roundCounter_
<
this
->
totalRounds_
)
{
fprintf
(
stdout
,
"[INFO] %d calls 2nd GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
while
(
this
->
countNeededBuffers_
<
this
->
totalNeededBuffers_
)
{
fprintf
(
stdout
,
"[INFO] %d calls 2nd GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
GlobalFence
(
var
);
fprintf
(
stdout
,
"[INFO] %d passes 2nd GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
currentFence_
++
;
if
(
(
this
->
roundCounter_
%
this
->
nAggr_
)
==
0
)
{
fprintf
(
stdout
,
"[INFO] %d passes 2nd GlobalFence, buff %d, dat %s (r: %d, f: %d)
\n
"
,
this
->
commRank_
,
(
this
->
currentRound_
%
NBUFFERS
),
var
,
this
->
currentRound_
,
this
->
currentFence_
);
this
->
currentFence_
++
;
#ifdef XC40
this
->
countNeededBuffers_
++
;
#endif
if
(
(
this
->
countNeededBuffers_
%
this
->
nAggr_
)
==
0
)
{
if
(
this
->
amAnAggr_
)
{
// if (iRequest != NULL)
// MPI_Wait ( &iRequest, &iStatus );
...
...
@@ -256,13 +270,12 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
this
->
Push
(
fileHandle
,
status
);
//this->iPush (fileHandle, &iRequest);
}
#ifdef BGQ
fprintf
(
stdout
,
"[INFO] %d increment 2nd currentRound (r: %d, rc: %d, nag: %d)
\n
"
,
this
->
commRank_
,
this
->
currentRound_
,
this
->
roundCounter_
,
this
->
nAggr_
);
fprintf
(
stdout
,
"[INFO] %d increment 2nd currentRound (r: %d, rc: %d, nag: %d)
\n
"
,
this
->
commRank_
,
this
->
currentRound_
,
this
->
countNeededBuffers_
,
this
->
nAggr_
);
this
->
currentRound_
++
;
#endif
}
this
->
roundCounter_
++
;
#ifdef BGQ
this
->
countNeededBuffers_
++
;
#endif
}
}
...
...
@@ -417,7 +430,7 @@ void Tapioca::SetDefaultValues ()
this
->
amAnAggr_
=
false
;
this
->
commSplit_
=
true
;
this
->
currentRound_
=
0
;
this
->
roundCounter
_
=
0
;
this
->
countNeededBuffers
_
=
0
;
this
->
currentDataSize_
=
0
;
this
->
nCommit_
=
0
;
this
->
writeDevNull_
=
false
;
...
...
@@ -519,9 +532,9 @@ void Tapioca::IdentifyMyAggregators ()
int64_t
remainingData
,
offsetInAggrData
;
std
::
vector
<
Round_t
>
rounds
;
this
->
total
Round
s_
=
ceil
(
(
double
)
this
->
commDataSize_
/
(
double
)
this
->
bufferSize_
);
this
->
total
NeededBuffer
s_
=
ceil
(
(
double
)
this
->
commDataSize_
/
(
double
)
this
->
bufferSize_
);
for
(
i
=
0
;
i
<
this
->
total
Round
s_
;
i
++
)
{
for
(
i
=
0
;
i
<
this
->
total
NeededBuffer
s_
;
i
++
)
{
Round_t
r
;
r
.
aggr
=
i
%
this
->
nAggr_
;
r
.
round
=
i
/
this
->
nAggr_
;
...
...
@@ -557,10 +570,10 @@ void Tapioca::IdentifyMyAggregators ()
#ifdef DEBUG
if
(
this
->
commRank_
==
4
)
{
fprintf
(
stdout
,
"[DEBUG] Rounds distrib. on %d aggregators: AGG "
,
this
->
nAggr_
);
for
(
i
=
0
;
i
<
this
->
total
Round
s_
;
i
++
)
for
(
i
=
0
;
i
<
this
->
total
NeededBuffer
s_
;
i
++
)
fprintf
(
stdout
,
"%d "
,
rounds
[
i
].
aggr
);
fprintf
(
stdout
,
"
\n
RND "
);
for
(
i
=
0
;
i
<
this
->
total
Round
s_
;
i
++
)
for
(
i
=
0
;
i
<
this
->
total
NeededBuffer
s_
;
i
++
)
fprintf
(
stdout
,
"%d "
,
rounds
[
i
].
round
);
fprintf
(
stdout
,
"
\n
AGG "
);
for
(
i
=
0
;
i
<
this
->
globalAggregatorsRanks
.
size
();
i
++
)
...
...
tapioca.hpp
View file @
6a1d647a
...
...
@@ -135,8 +135,8 @@ class Tapioca
int
nAggr_
;
int
currentRound_
;
int
total
Round
s_
;
int
roundCounter
_
;
int
total
NeededBuffer
s_
;
int
countNeededBuffers
_
;
int64_t
currentDataSize_
;
int
intCoords_
;
...
...
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