Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
b21c42e2
Commit
b21c42e2
authored
Apr 06, 2016
by
Martin Khannouz
Committed by
Berenger Bramas
Mar 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments and fix some warning.
parent
f0414aa7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
26 deletions
+21
-26
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
+1
-1
Tests/GroupTree/compareDAGmapping.cpp
Tests/GroupTree/compareDAGmapping.cpp
+14
-19
Tests/GroupTree/testBlockedImplicitAlgorithm.cpp
Tests/GroupTree/testBlockedImplicitAlgorithm.cpp
+2
-2
Tests/GroupTree/testBlockedImplicitChebyshev.cpp
Tests/GroupTree/testBlockedImplicitChebyshev.cpp
+4
-4
No files found.
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
View file @
b21c42e2
...
...
@@ -1667,7 +1667,7 @@ protected:
#endif
0
);
std
::
vector
<
OutOfBlockInteraction
>*
outsideInteractionsOpposite
=
new
std
::
vector
<
OutOfBlockInteraction
>
(
externalInteractionsLeafLevel
[
idxGroup
][
idxInteraction
].
interactions
);
for
(
int
i
=
0
;
i
<
outsideInteractionsOpposite
->
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
outsideInteractionsOpposite
->
size
();
++
i
)
{
MortonIndex
tmp
=
outsideInteractionsOpposite
->
at
(
i
).
outIndex
;
outsideInteractionsOpposite
->
at
(
i
).
outIndex
=
outsideInteractionsOpposite
->
at
(
i
).
insideIndex
;
...
...
Tests/GroupTree/compareDAGmapping.cpp
View file @
b21c42e2
...
...
@@ -109,7 +109,7 @@ bool parseLine(DagData & dagData, deque<string> & lineElements)
task
.
id
[
3
]
=
stoll
(
lineElements
[
7
]);
task
.
id
[
4
]
=
stoll
(
lineElements
[
8
]);
task
.
mpiNode
=
stoi
(
lineElements
[
9
]);
task
.
level
=
task
.
id
[
0
];
task
.
level
=
(
int
)
task
.
id
[
0
];
dagData
.
allTask
.
insert
(
task
);
}
else
if
(
lineElements
.
size
()
>=
13
&&
lineElements
[
0
]
==
"M2L_out"
)
...
...
@@ -124,7 +124,7 @@ bool parseLine(DagData & dagData, deque<string> & lineElements)
task
.
id
[
3
]
=
stoll
(
lineElements
[
10
]);
task
.
id
[
4
]
=
stoll
(
lineElements
[
11
]);
task
.
mpiNode
=
stoi
(
lineElements
[
12
]);
task
.
level
=
task
.
id
[
0
];
task
.
level
=
(
int
)
task
.
id
[
0
];
dagData
.
allTask
.
insert
(
task
);
}
else
if
(
lineElements
.
size
()
>=
13
&&
lineElements
[
0
]
==
"M2M"
)
...
...
@@ -139,7 +139,7 @@ bool parseLine(DagData & dagData, deque<string> & lineElements)
task
.
id
[
3
]
=
stoll
(
lineElements
[
10
]);
task
.
id
[
4
]
=
stoll
(
lineElements
[
11
]);
task
.
mpiNode
=
stoi
(
lineElements
[
12
]);
task
.
level
=
task
.
id
[
0
];
task
.
level
=
(
int
)
task
.
id
[
0
];
dagData
.
allTask
.
insert
(
task
);
}
else
if
(
lineElements
.
size
()
>=
13
&&
lineElements
[
0
]
==
"L2L"
)
...
...
@@ -154,7 +154,7 @@ bool parseLine(DagData & dagData, deque<string> & lineElements)
task
.
id
[
3
]
=
stoll
(
lineElements
[
10
]);
task
.
id
[
4
]
=
stoll
(
lineElements
[
11
]);
task
.
mpiNode
=
stoi
(
lineElements
[
12
]);
task
.
level
=
task
.
id
[
0
];
task
.
level
=
(
int
)
task
.
id
[
0
];
dagData
.
allTask
.
insert
(
task
);
}
else
if
(
lineElements
.
size
()
>=
8
&&
lineElements
[
0
]
==
"L2P"
)
...
...
@@ -295,8 +295,11 @@ void compareDag(DagData const& dag1, DagData const& dag2, int const treeHeight)
bool
found
=
false
;
Task
sameTask
[
2
];
int
sameTaskId
=
0
;
//Count task per level
if
(
task
.
level
<
treeHeight
)
++
taskCount
[
omp_get_thread_num
()][
task
.
level
];
//Look into the second dag to find task in it
//We look for two task because it may be symetrized
for
(
auto
it
=
dag2
.
allTask
.
begin
();
it
!=
dag2
.
allTask
.
end
();
++
it
)
{
if
(
task
==
*
it
)
...
...
@@ -307,6 +310,7 @@ void compareDag(DagData const& dag1, DagData const& dag2, int const treeHeight)
break
;
}
}
//If the task it not found, print it and count it
if
(
found
==
false
)
{
#pragma omp critical
...
...
@@ -314,31 +318,21 @@ void compareDag(DagData const& dag1, DagData const& dag2, int const treeHeight)
if
(
task
.
level
<
treeHeight
)
++
notFoundCount
[
omp_get_thread_num
()][
task
.
level
];
}
else
else
//else check the mapping
{
bool
sameNode
=
false
;
for
(
int
i
=
0
;
i
<
sameTaskId
;
++
i
)
if
(
sameTask
[
i
].
mpiNode
==
task
.
mpiNode
)
sameNode
=
true
;
//The tasks are not mapped on the same node
if
(
!
sameNode
)
{
#pragma omp critical
{
//task.print();
//sameTask[0].print();//Il y a au moins une tâche identique trouvée
//if(sameTaskId == 2)
//sameTask[1].print();//Il y a au moins une tâche identique trouvée
//cout << sameTaskId << endl;
//cout << endl;
}
if
(
task
.
level
<
treeHeight
)
++
differenceMapping
[
omp_get_thread_num
()][
task
.
level
];
}
}
}
}
#pragma omp taskwait
//Sum results by level and print it
for
(
int
i
=
0
;
i
<
treeHeight
;
++
i
)
{
long
long
int
sum
=
0
;
...
...
@@ -351,6 +345,7 @@ void compareDag(DagData const& dag1, DagData const& dag2, int const treeHeight)
sumDiffMapping
+=
differenceMapping
[
j
][
i
];
sumTaskCount
+=
taskCount
[
j
][
i
];
}
//Print only if there is error repported on the level
if
(
sum
>
0
||
sumDiffMapping
>
0
)
std
::
cout
<<
"Diff lvl "
<<
i
<<
" -> "
<<
sum
<<
" (Mapping error : "
<<
sumDiffMapping
<<
"/"
<<
sumTaskCount
<<
")"
<<
std
::
endl
;
}
...
...
@@ -384,12 +379,11 @@ int main(int argc, char* argv[])
// Get params
const
char
*
const
explicitFilename
=
FParameters
::
getStr
(
argc
,
argv
,
Explicit
.
options
,
"scalfmm_explicit.out"
);
const
char
*
const
implicitFilename
=
FParameters
::
getStr
(
argc
,
argv
,
Implicit
.
options
,
"scalfmm_implicit.out"
);
const
char
*
const
explicitTraceFilename
=
FParameters
::
getStr
(
argc
,
argv
,
Explicit
.
options
,
"explicit.rec"
);
const
char
*
const
implicitTraceFilename
=
FParameters
::
getStr
(
argc
,
argv
,
Implicit
.
options
,
"implicit.rec"
);
const
int
treeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
TreeHeight
.
options
,
5
);
DagData
implicitData
,
explicitData
;
bool
implicitGood
,
explicitGood
;
//Read data from files and put it into the DAG data structure
std
::
thread
explicitThread
([
&
](){
explicitData
.
treeHeight
=
treeHeight
;
explicitGood
=
fillDagData
(
explicitFilename
,
explicitData
);
...
...
@@ -400,6 +394,7 @@ int main(int argc, char* argv[])
});
implicitThread
.
join
();
explicitThread
.
join
();
//If every thing went good, start comparing
if
(
implicitGood
&&
explicitGood
)
{
cout
<<
explicitData
.
allTask
.
size
()
<<
" tasks in explicit."
<<
endl
;
...
...
Tests/GroupTree/testBlockedImplicitAlgorithm.cpp
View file @
b21c42e2
...
...
@@ -103,7 +103,7 @@ int main(int argc, char* argv[]){
const
char
*
const
filename
=
FParameters
::
getStr
(
argc
,
argv
,
FParameterDefinitions
::
InputFile
.
options
,
"../Data/test20k.fma"
);
LoaderClass
loader
(
filename
);
#endif
int
mpi_rank
,
nproc
=
8
,
provided
;
int
mpi_rank
,
nproc
;
FMpi
mpiComm
(
argc
,
argv
);
mpi_rank
=
mpiComm
.
global
().
processId
();
nproc
=
mpiComm
.
global
().
processCount
();
...
...
@@ -285,7 +285,7 @@ void sortParticle(FPoint<FReal> * allParticles, int treeHeight, int groupSize, v
for
(
int
i
=
0
;
i
<
countGroup
;
++
i
)
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
groupSize
);
if
(
size_last
>
0
)
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
size_last
);
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
(
int
)
size_last
);
}
//Calcul du working interval au niveau des feuilles
...
...
Tests/GroupTree/testBlockedImplicitChebyshev.cpp
View file @
b21c42e2
...
...
@@ -94,7 +94,7 @@ int main(int argc, char* argv[]){
const
char
*
const
filename
=
FParameters
::
getStr
(
argc
,
argv
,
FParameterDefinitions
::
InputFile
.
options
,
"../Data/test20k.fma"
);
LoaderClass
loader
(
filename
);
#endif
int
mpi_rank
,
nproc
,
provided
;
int
mpi_rank
,
nproc
;
FMpi
mpiComm
(
argc
,
argv
);
mpi_rank
=
mpiComm
.
global
().
processId
();
nproc
=
mpiComm
.
global
().
processCount
();
...
...
@@ -147,8 +147,8 @@ int main(int argc, char* argv[]){
treeCheck
.
insert
(
allParticlesToSort
[
idxPart
],
0.1
);
}
MatrixKernelClass
MatrixKernel
;
KernelClass
kernels
(
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
(),
&
MatrixKernel
);
MatrixKernelClass
MatrixKernel
Validation
;
KernelClass
kernels
(
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
(),
&
MatrixKernel
Validation
);
FmmClass
algorithm
(
&
treeCheck
,
&
kernels
);
algorithm
.
execute
(
operationsToProceed
);
...
...
@@ -314,7 +314,7 @@ void sortParticle(FPoint<FReal> * allParticles, int treeHeight, int groupSize, v
for
(
int
i
=
0
;
i
<
countGroup
;
++
i
)
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
groupSize
);
if
(
size_last
>
0
)
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
size_last
);
sizeForEachGroup
[
treeHeight
-
1
].
push_back
(
(
int
)
size_last
);
}
//Calcul du working interval au niveau des feuilles
...
...
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