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
1f69b258
Commit
1f69b258
authored
Mar 30, 2012
by
Matthias Messner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://scm.gforge.inria.fr//gitroot//scalfmm/scalfmm
parents
57ea27fd
d788edc1
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2425 additions
and
34 deletions
+2425
-34
Src/Components/FTestKernels.hpp
Src/Components/FTestKernels.hpp
+3
-2
Src/Core/FFmmAlgorithmStarpu.hpp
Src/Core/FFmmAlgorithmStarpu.hpp
+49
-10
Src/Core/FFmmAlgorithmStarpuGroup.hpp
Src/Core/FFmmAlgorithmStarpuGroup.hpp
+1458
-0
Tests/Kernels/testSphericalAlgorithm.cpp
Tests/Kernels/testSphericalAlgorithm.cpp
+13
-2
Tests/Kernels/testSphericalBlasAlgorithm.cpp
Tests/Kernels/testSphericalBlasAlgorithm.cpp
+11
-1
Tests/Kernels/testSphericalBlockBlasAlgorithm.cpp
Tests/Kernels/testSphericalBlockBlasAlgorithm.cpp
+11
-1
Tests/Kernels/testSphericalEwalAlgorithm.cpp
Tests/Kernels/testSphericalEwalAlgorithm.cpp
+12
-2
Tests/Kernels/testSphericalProcAlgorithm.cpp
Tests/Kernels/testSphericalProcAlgorithm.cpp
+11
-4
Tests/Kernels/testSphericalRotationAlgorithm.cpp
Tests/Kernels/testSphericalRotationAlgorithm.cpp
+11
-1
Tests/Kernels/testSphericalTsmAlgorithm.cpp
Tests/Kernels/testSphericalTsmAlgorithm.cpp
+11
-2
Tests/Kernels/testSphericalTsmNoTsm.cpp
Tests/Kernels/testSphericalTsmNoTsm.cpp
+5
-3
Tests/Kernels/testStarpuAlgorithm.cpp
Tests/Kernels/testStarpuAlgorithm.cpp
+5
-2
Tests/Kernels/testStarpuAlgorithmGroup.cpp
Tests/Kernels/testStarpuAlgorithmGroup.cpp
+172
-0
Tests/Kernels/testStarpuChebAlgorithm.cpp
Tests/Kernels/testStarpuChebAlgorithm.cpp
+6
-0
Tests/Kernels/testStarpuCompareAlgorithm.cpp
Tests/Kernels/testStarpuCompareAlgorithm.cpp
+299
-0
Tests/Kernels/testStarpuGroupCompareAlgorithm.cpp
Tests/Kernels/testStarpuGroupCompareAlgorithm.cpp
+337
-0
Tests/Kernels/testStarpuSphericalAlgorithm.cpp
Tests/Kernels/testStarpuSphericalAlgorithm.cpp
+5
-2
Tests/Kernels/testTuneSphericalBlockBlas.cpp
Tests/Kernels/testTuneSphericalBlockBlas.cpp
+6
-2
No files found.
Src/Components/FTestKernels.hpp
View file @
1f69b258
...
@@ -150,7 +150,8 @@ void ValidateFMMAlgo(OctreeClass* const tree){
...
@@ -150,7 +150,8 @@ void ValidateFMMAlgo(OctreeClass* const tree){
octreeIterator
.
gotoBottomLeft
();
octreeIterator
.
gotoBottomLeft
();
do
{
do
{
if
(
octreeIterator
.
getCurrentCell
()
->
getDataUp
()
!=
octreeIterator
.
getCurrentListSrc
()
->
getSize
()
){
if
(
octreeIterator
.
getCurrentCell
()
->
getDataUp
()
!=
octreeIterator
.
getCurrentListSrc
()
->
getSize
()
){
std
::
cout
<<
"Problem P2M : "
<<
(
octreeIterator
.
getCurrentCell
()
->
getDataUp
()
-
octreeIterator
.
getCurrentListSrc
()
->
getSize
())
<<
"
\n
"
;
std
::
cout
<<
"Problem P2M : "
<<
octreeIterator
.
getCurrentCell
()
->
getDataUp
()
<<
" (should be "
<<
octreeIterator
.
getCurrentListSrc
()
->
getSize
()
<<
")
\n
"
;
}
}
NbPart
+=
octreeIterator
.
getCurrentListSrc
()
->
getSize
();
NbPart
+=
octreeIterator
.
getCurrentListSrc
()
->
getSize
();
}
while
(
octreeIterator
.
moveRight
());
}
while
(
octreeIterator
.
moveRight
());
...
@@ -194,7 +195,7 @@ void ValidateFMMAlgo(OctreeClass* const tree){
...
@@ -194,7 +195,7 @@ void ValidateFMMAlgo(OctreeClass* const tree){
// there is a problem
// there is a problem
if
(
(
!
isUsingTsm
&&
iter
.
data
().
getDataDown
()
!=
NbPart
-
1
)
||
if
(
(
!
isUsingTsm
&&
iter
.
data
().
getDataDown
()
!=
NbPart
-
1
)
||
(
isUsingTsm
&&
iter
.
data
().
getDataDown
()
!=
NbPart
)
){
(
isUsingTsm
&&
iter
.
data
().
getDataDown
()
!=
NbPart
)
){
std
::
cout
<<
"Problem L2P + P2P : "
<<
iter
.
data
().
getDataDown
()
<<
"
\n
"
;
std
::
cout
<<
"Problem L2P + P2P : "
<<
iter
.
data
().
getDataDown
()
<<
"
("
<<
octreeIterator
.
getCurrentGlobalIndex
()
<<
")
\n
"
;
}
}
iter
.
gotoNext
();
iter
.
gotoNext
();
}
}
...
...
Src/Core/FFmmAlgorithmStarpu.hpp
View file @
1f69b258
...
@@ -43,8 +43,8 @@ struct StarHandle : public FNoCopyable, public FNoAssignement {
...
@@ -43,8 +43,8 @@ struct StarHandle : public FNoCopyable, public FNoAssignement {
/** Release the handle */
/** Release the handle */
~
StarHandle
(){
~
StarHandle
(){
if
(
handle
!=
((
void
*
)
0
)
){
if
(
handle
!=
starpu_data_handle_t
(
0
)
){
//
starpu_data_unregister(handle);
starpu_data_unregister
(
handle
);
}
}
}
}
...
@@ -69,7 +69,7 @@ struct StarHandle : public FNoCopyable, public FNoAssignement {
...
@@ -69,7 +69,7 @@ struct StarHandle : public FNoCopyable, public FNoAssignement {
/** Release data */
/** Release data */
void
unregisterData
(){
void
unregisterData
(){
if
(
handle
!=
((
void
*
)
0
)
){
if
(
handle
!=
((
void
*
)
0
)
){
//
starpu_data_unregister(handle);
starpu_data_unregister
(
handle
);
memset
(
&
handle
,
0
,
sizeof
(
starpu_data_handle_t
));
memset
(
&
handle
,
0
,
sizeof
(
starpu_data_handle_t
));
}
}
}
}
...
@@ -259,6 +259,7 @@ class FFmmAlgorithmStarpu : protected FAssertable{
...
@@ -259,6 +259,7 @@ class FFmmAlgorithmStarpu : protected FAssertable{
KernelClass
*
const
kernels
;
//< The kernels
KernelClass
*
const
kernels
;
//< The kernels
const
int
OctreeHeight
;
const
int
OctreeHeight
;
const
bool
putNameInTask
;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// Codelets
// Codelets
...
@@ -280,7 +281,7 @@ class FFmmAlgorithmStarpu : protected FAssertable{
...
@@ -280,7 +281,7 @@ class FFmmAlgorithmStarpu : protected FAssertable{
starpu_perfmodel
l2p_model
;
starpu_perfmodel
l2p_model
;
// Init the codelet
// Init the codelet
void
initCodelets
(
const
bool
putNameInTask
){
void
initCodelets
(){
memset
(
&
p2p_model
,
0
,
sizeof
(
p2p_model
));
memset
(
&
p2p_model
,
0
,
sizeof
(
p2p_model
));
p2p_model
.
type
=
STARPU_HISTORY_BASED
;
p2p_model
.
type
=
STARPU_HISTORY_BASED
;
p2p_model
.
symbol
=
"P2P"
;
p2p_model
.
symbol
=
"P2P"
;
...
@@ -341,6 +342,8 @@ class FFmmAlgorithmStarpu : protected FAssertable{
...
@@ -341,6 +342,8 @@ class FFmmAlgorithmStarpu : protected FAssertable{
l2p_cl
.
where
=
STARPU_CPU
;
l2p_cl
.
where
=
STARPU_CPU
;
l2p_cl
.
cpu_funcs
[
0
]
=
l2p_cpu
;
l2p_cl
.
cpu_funcs
[
0
]
=
l2p_cpu
;
l2p_cl
.
nbuffers
=
2
;
l2p_cl
.
nbuffers
=
2
;
l2p_cl
.
modes
[
0
]
=
STARPU_R
;
l2p_cl
.
modes
[
1
]
=
STARPU_RW
;
if
(
putNameInTask
)
l2p_cl
.
model
=
&
l2p_model
;
if
(
putNameInTask
)
l2p_cl
.
model
=
&
l2p_model
;
// M2M & L2L
// M2M & L2L
...
@@ -400,6 +403,29 @@ class FFmmAlgorithmStarpu : protected FAssertable{
...
@@ -400,6 +403,29 @@ class FFmmAlgorithmStarpu : protected FAssertable{
}
}
void
releaseHandles
(){
void
releaseHandles
(){
typename
OctreeClass
::
Iterator
octreeIterator
(
tree
);
octreeIterator
.
gotoBottomLeft
();
typename
OctreeClass
::
Iterator
avoidGotoLeftIterator
(
octreeIterator
);
// init leaf handle
do
{
octreeIterator
.
getCurrentLeaf
()
->
getSrc
()
->
handle
.
unregisterData
();
if
(
octreeIterator
.
getCurrentLeaf
()
->
getSrc
()
!=
octreeIterator
.
getCurrentLeaf
()
->
getTargets
()){
octreeIterator
.
getCurrentLeaf
()
->
getTargets
()
->
handle
.
unregisterData
();
}
}
while
(
octreeIterator
.
moveRight
());
octreeIterator
=
avoidGotoLeftIterator
;
// init cells handle
for
(
int
idxLevel
=
OctreeHeight
-
1
;
idxLevel
>
1
;
--
idxLevel
){
do
{
octreeIterator
.
getCurrentCell
()
->
handleUp
.
unregisterData
();
octreeIterator
.
getCurrentCell
()
->
handleDown
.
unregisterData
();
}
while
(
octreeIterator
.
moveRight
());
avoidGotoLeftIterator
.
moveUp
();
octreeIterator
=
avoidGotoLeftIterator
;
}
}
}
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
...
@@ -433,20 +459,33 @@ public:
...
@@ -433,20 +459,33 @@ public:
* @param inKernels the kernels to call
* @param inKernels the kernels to call
* An assert is launched if one of the arguments is null
* An assert is launched if one of the arguments is null
*/
*/
FFmmAlgorithmStarpu
(
OctreeClass
*
const
inTree
,
KernelClass
*
const
inKernels
,
const
bool
putNameInTask
=
false
)
FFmmAlgorithmStarpu
(
OctreeClass
*
const
inTree
,
KernelClass
*
const
inKernels
,
const
bool
inPutNameInTask
=
false
)
:
tree
(
inTree
)
,
kernels
(
inKernels
),
OctreeHeight
(
tree
->
getHeight
())
{
:
tree
(
inTree
)
,
kernels
(
inKernels
),
OctreeHeight
(
tree
->
getHeight
()),
putNameInTask
(
inPutNameInTask
)
{
FDEBUG
(
FDebug
::
Controller
<<
"FFmmAlgorithmStarpu
\n
"
);
FDEBUG
(
FDebug
::
Controller
<<
"FFmmAlgorithmStarpu
\n
"
);
}
/** Default destructor */
virtual
~
FFmmAlgorithmStarpu
(){
}
/** Run starpu */
void
initStarpu
(
const
int
nbThreads
=
-
1
){
starpu_conf
setup
;
starpu_conf_init
(
&
setup
);
setup
.
ncpus
=
nbThreads
;
// Run starpu
// Run starpu
starpu_init
(
NULL
);
starpu_init
(
&
setup
);
FDEBUG
(
FDebug
::
Controller
<<
"Init starpu, there are "
<<
starpu_worker_get_count
()
<<
" workers
\n
"
);
// Init
// Init
initCodelets
(
putNameInTask
);
initCodelets
();
initHandles
();
initHandles
();
initKernels
();
initKernels
();
}
}
/**
Default destructor
*/
/**
Release starpu
*/
v
irtual
~
FFmmAlgorithm
Starpu
(){
v
oid
release
Starpu
(){
// Release stuff
// Release stuff
releaseCodelets
();
releaseCodelets
();
releaseHandles
();
releaseHandles
();
...
...
Src/Core/FFmmAlgorithmStarpuGroup.hpp
0 → 100644
View file @
1f69b258
This diff is collapsed.
Click to expand it.
Tests/Kernels/testSphericalAlgorithm.cpp
View file @
1f69b258
...
@@ -87,20 +87,31 @@ int main(int argc, char ** argv){
...
@@ -87,20 +87,31 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
FmmClassTask
algo
(
&
tree
,
&
kernels
);
FmmClassTask
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
{
else
{
FmmClassThread
algo
(
&
tree
,
&
kernels
);
FmmClassThread
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
...
...
Tests/Kernels/testSphericalBlasAlgorithm.cpp
View file @
1f69b258
...
@@ -92,21 +92,31 @@ int main(int argc, char ** argv){
...
@@ -92,21 +92,31 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
FmmClassTask
algo
(
&
tree
,
&
kernels
);
FmmClassTask
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
{
else
{
FmmClassThread
algo
(
&
tree
,
&
kernels
);
FmmClassThread
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
...
...
Tests/Kernels/testSphericalBlockBlasAlgorithm.cpp
View file @
1f69b258
...
@@ -93,21 +93,31 @@ int main(int argc, char ** argv){
...
@@ -93,21 +93,31 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
FmmClassTask
algo
(
&
tree
,
&
kernels
);
FmmClassTask
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
{
else
{
FmmClassThread
algo
(
&
tree
,
&
kernels
);
FmmClassThread
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
...
...
Tests/Kernels/testSphericalEwalAlgorithm.cpp
View file @
1f69b258
...
@@ -130,14 +130,24 @@ int main(int argc, char ** argv){
...
@@ -130,14 +130,24 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
(),
BoundaryDeep
);
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
(),
BoundaryDeep
);
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
FmmClass
algo
(
&
tree
,
&
kernels
,
BoundaryDeep
);
FmmClass
algo
(
&
tree
,
&
kernels
,
BoundaryDeep
);
algo
.
execute
();
counter
.
tic
();
algo
.
execute
();
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
// -----------------------------------------------------
...
...
Tests/Kernels/testSphericalProcAlgorithm.cpp
View file @
1f69b258
...
@@ -254,16 +254,23 @@ int main(int argc, char ** argv){
...
@@ -254,16 +254,23 @@ int main(int argc, char ** argv){
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Creating and Inserting Particles = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Creating and Inserting Particles = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Create kernel..."
<<
std
::
endl
;
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
FmmClass
algo
(
app
.
global
(),
&
tree
,
&
kernels
);
FmmClass
algo
(
app
.
global
(),
&
tree
,
&
kernels
);
algo
.
execute
();
counter
.
tic
();
algo
.
execute
();
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
{
// get sum forces&potential
{
// get sum forces&potential
...
@@ -311,8 +318,8 @@ int main(int argc, char ** argv){
...
@@ -311,8 +318,8 @@ int main(int argc, char ** argv){
}
}
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
counter
.
tic
();
FmmClassNoProc
algoValide
(
&
treeValide
,
&
kernels
);
FmmClassNoProc
algoValide
(
&
treeValide
,
&
kernels
);
counter
.
tic
();
algoValide
.
execute
();
algoValide
.
execute
();
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
...
...
Tests/Kernels/testSphericalRotationAlgorithm.cpp
View file @
1f69b258
...
@@ -87,21 +87,31 @@ int main(int argc, char ** argv){
...
@@ -87,21 +87,31 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-sequential"
)
!=
FParameters
::
NotFound
){
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
else
if
(
FParameters
::
findParameter
(
argc
,
argv
,
"-task"
)
!=
FParameters
::
NotFound
){
FmmClassTask
algo
(
&
tree
,
&
kernels
);
FmmClassTask
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
else
{
else
{
FmmClassThread
algo
(
&
tree
,
&
kernels
);
FmmClassThread
algo
(
&
tree
,
&
kernels
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
}
}
...
...
Tests/Kernels/testSphericalTsmAlgorithm.cpp
View file @
1f69b258
...
@@ -82,15 +82,24 @@ int main(int argc, char ** argv){
...
@@ -82,15 +82,24 @@ int main(int argc, char ** argv){
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"
Working on particles
..."
<<
std
::
endl
;
std
::
cout
<<
"
Create kernel
..."
<<
std
::
endl
;
counter
.
tic
();
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
counter
.
tac
();
std
::
cout
<<
"Done "
<<
" in "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
algo
.
execute
();
counter
.
tic
();
algo
.
execute
();
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
{
// get sum forces&potential
{
// get sum forces&potential
...
...
Tests/Kernels/testSphericalTsmNoTsm.cpp
View file @
1f69b258
...
@@ -116,16 +116,18 @@ int main(int argc, char ** argv){
...
@@ -116,16 +116,18 @@ int main(int argc, char ** argv){
std
::
cout
<<
"Done "
<<
"(@Creating and Inserting Particles = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Creating and Inserting Particles = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
// -----------------------------------------------------
std
::
cout
<<
"Create kernels ..."
<<
std
::
endl
;
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
counter
.
tic
();
KernelClass
kernels
(
DevP
,
NbLevels
,
BoxWidth
,
CenterOfBox
);
KernelClass
kernels
(
DevP
,
NbLevels
,
BoxWidth
,
CenterOfBox
);
KernelClassTyped
kernelsTyped
(
DevP
,
NbLevels
,
BoxWidth
,
CenterOfBox
);
KernelClassTyped
kernelsTyped
(
DevP
,
NbLevels
,
BoxWidth
,
CenterOfBox
);
std
::
cout
<<
"Working on particles ..."
<<
std
::
endl
;
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClass
algo
(
&
tree
,
&
kernels
);
FmmClassTyped
algoTyped
(
&
treeTyped
,
&
kernelsTyped
);
FmmClassTyped
algoTyped
(
&
treeTyped
,
&
kernelsTyped
);
counter
.
tic
();
algo
.
execute
();
algo
.
execute
();
algoTyped
.
execute
();
algoTyped
.
execute
();
...
...
Tests/Kernels/testStarpuAlgorithm.cpp
View file @
1f69b258
...
@@ -110,12 +110,15 @@ int main(int argc, char ** argv){
...
@@ -110,12 +110,15 @@ int main(int argc, char ** argv){
KernelClass
kernel
;
KernelClass
kernel
;
AlgorithmClass
algo
(
&
tree
,
&
kernel
);
AlgorithmClass
algo
(
&
tree
,
&
kernel
);
std
::
cout
<<
"There are "
<<
starpu_worker_get_count
()
<<
" workers"
<<
std
::
endl
;
algo
.
initStarpu
();
algo
.
execute
();
counter
.
tic
();
algo
.
execute
();
counter
.
tac
();
counter
.
tac
();
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
algo
.
releaseStarpu
();
// Check result
// Check result
ValidateFMMAlgo
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
(
&
tree
);
ValidateFMMAlgo
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
(
&
tree
);
...
...
Tests/Kernels/testStarpuAlgorithmGroup.cpp
0 → 100644
View file @
1f69b258
// ===================================================================================
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
// ===================================================================================
// ==== CMAKE =====
// @FUSE_STARPU
// ================
#include <starpu.h>
#include "../../Src/Utils/FTic.hpp"
#include "../../Src/Utils/FParameters.hpp"
#include "../../Src/Containers/FOctree.hpp"
#include "../../Src/Containers/FVector.hpp"
#include "../../Src/Components/FTestKernels.hpp"
#include "../../Src/Components/FTestParticle.hpp"
#include "../../Src/Components/FTestCell.hpp"
#include "../../Src/Core/FFmmAlgorithmStarpuGroup.hpp"
#include "../../Src/Core/FFmmAlgorithm.hpp"
#include "../../Src/Components/FSimpleLeaf.hpp"
#include "../../Src/Components/FFmaParticle.hpp"
#include "../../Src/Extensions/FExtendForces.hpp"
#include "../../Src/Extensions/FExtendPotential.hpp"
#include "../../Src/Components/FBasicCell.hpp"
#include "../../Src/Files/FFmaLoader.hpp"
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>