Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
a9511bb8
Commit
a9511bb8
authored
9 years ago
by
Martin Khannouz
Committed by
Berenger Bramas
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Symetrize P2P in implicit version.
Still have to fix memory leak, but it works.
parent
ecc9af44
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
+88
-83
88 additions, 83 deletions
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
Tests/GroupTree/compareDAGmapping.cpp
+0
-4
0 additions, 4 deletions
Tests/GroupTree/compareDAGmapping.cpp
with
88 additions
and
87 deletions
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
+
88
−
83
View file @
a9511bb8
...
...
@@ -41,7 +41,7 @@
#include
"../OpenCl/FOpenCLDeviceWrapper.hpp"
#endif
//
#define SCALFMM_SIMGRID_TASKNAMEPARAMS
#define SCALFMM_SIMGRID_TASKNAMEPARAMS
#ifdef SCALFMM_SIMGRID_TASKNAMEPARAMS
#include
"../StarPUUtils/FStarPUTaskNameParams.hpp"
#endif
...
...
@@ -435,6 +435,10 @@ public:
}
}
}
int
getOppositeInterIndex
(
const
int
index
)
const
{
// ((( (xdiff+3) * 7) + (ydiff+3))) * 7 + zdiff + 3
return
343
-
index
-
1
;
}
protected
:
/**
* Runs the complete algorithm.
...
...
@@ -1580,8 +1584,8 @@ protected:
for
(
int
idxInteraction
=
0
;
idxInteraction
<
int
(
externalInteractionsLeafLevel
[
idxGroup
].
size
())
;
++
idxInteraction
){
const
int
interactionid
=
externalInteractionsLeafLevel
[
idxGroup
][
idxInteraction
].
otherBlockId
;
const
std
::
vector
<
OutOfBlockInteraction
>*
outsideInteractions
=
&
externalInteractionsLeafLevel
[
idxGroup
][
idxInteraction
].
interactions
;
//
if(starpu_mpi_data_get_rank(particleHandles[idxGroup].down) == starpu_mpi_data_get_rank(particleHandles[interactionid].down))
//
{
if
(
starpu_mpi_data_get_rank
(
particleHandles
[
idxGroup
].
down
)
==
starpu_mpi_data_get_rank
(
particleHandles
[
interactionid
].
down
))
{
starpu_mpi_insert_task
(
MPI_COMM_WORLD
,
&
p2p_cl_inout
,
STARPU_VALUE
,
&
wrapperptr
,
sizeof
(
wrapperptr
),
...
...
@@ -1624,86 +1628,87 @@ protected:
#endif
#endif
0
);
//}
//else
//{
//starpu_mpi_insert_task(MPI_COMM_WORLD,
//&p2p_cl_inout_mpi,
//STARPU_VALUE, &wrapperptr, sizeof(wrapperptr),
//STARPU_VALUE, &outsideInteractions, sizeof(outsideInteractions),
//STARPU_VALUE, &particleHandles[idxGroup].intervalSize, sizeof(int),
//#ifdef SCALFMM_STARPU_USE_PRIO
//STARPU_PRIORITY, PrioClass::Controller().getInsertionPosP2PExtern(),
//#endif
//STARPU_R, particleHandles[idxGroup].symb,
//(STARPU_RW|STARPU_COMMUTE_IF_SUPPORTED), particleHandles[idxGroup].down,
//STARPU_R, particleHandles[interactionid].symb,
//#ifdef STARPU_USE_TASK_NAME
//#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
//STARPU_NAME, p2pOuterTaskNames.get(),
//#else
////"P2P_out-nb_i_p_nb_i_p_s"
//STARPU_NAME, taskNames->print("P2P_out", "%d, %lld, %lld, %d, %lld, %lld, %d, %lld, %lld, %lld, %lld, %d\n",
//tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
//tree->getParticleGroup(idxGroup)->getSizeOfInterval(),
//tree->getParticleGroup(idxGroup)->getNbParticlesInGroup(),
//tree->getParticleGroup(interactionid)->getNumberOfLeavesInBlock(),
//tree->getParticleGroup(interactionid)->getSizeOfInterval(),
//tree->getParticleGroup(interactionid)->getNbParticlesInGroup(),
//outsideInteractions->size(),
//tree->getParticleGroup(idxGroup)->getStartingIndex(),
//tree->getParticleGroup(idxGroup)->getEndingIndex(),
//tree->getParticleGroup(interactionid)->getStartingIndex(),
//tree->getParticleGroup(interactionid)->getEndingIndex(),
//starpu_mpi_data_get_rank(particleHandles[idxGroup].down)),
//#endif
//#endif
//0);
//std::vector<OutOfBlockInteraction> outsideInteractions_2 = externalInteractionsLeafLevel[idxGroup][idxInteraction].interactions;
//for(int i = 0; i < outsideInteractions_2.size(); ++i)
//{
//MortonIndex tmp = outsideInteractions_2[i].outIndex;
//outsideInteractions_2[i].outIndex = outsideInteractions_2[i].insideIndex;
//outsideInteractions_2[i].insideIndex = tmp;
//int tmp2 = outsideInteractions_2[i].insideIdxInBlock;
//outsideInteractions_2[i].insideIdxInBlock = outsideInteractions_2[i].outsideIdxInBlock;
//outsideInteractions_2[i].outsideIdxInBlock = tmp2;
//outsideInteractions_2[i].relativeOutPosition = getOppositeInterIndex(outsideInteractions_2[i].relativeOutPosition);
//}
//auto c = &outsideInteractions_2;
//starpu_mpi_insert_task(MPI_COMM_WORLD,
//&p2p_cl_inout_mpi,
//STARPU_VALUE, &wrapperptr, sizeof(wrapperptr),
//STARPU_VALUE, &outsideInteractions, sizeof(outsideInteractions),
//STARPU_VALUE, &particleHandles[idxGroup].intervalSize, sizeof(int),
//#ifdef SCALFMM_STARPU_USE_PRIO
//STARPU_PRIORITY, PrioClass::Controller().getInsertionPosP2PExtern(),
//#endif
//STARPU_R, particleHandles[interactionid].symb,
//(STARPU_RW|STARPU_COMMUTE_IF_SUPPORTED), particleHandles[interactionid].down,
//STARPU_R, particleHandles[idxGroup].symb,
//#ifdef STARPU_USE_TASK_NAME
//#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
//STARPU_NAME, p2pOuterTaskNames.get(),
//#else
////"P2P_out-nb_i_p_nb_i_p_s"
//STARPU_NAME, taskNames->print("P2P_out", "%d, %lld, %lld, %d, %lld, %lld, %d, %lld, %lld, %lld, %lld, %d\n",
//tree->getParticleGroup(interactionid)->getNumberOfLeavesInBlock(),
//tree->getParticleGroup(interactionid)->getSizeOfInterval(),
//tree->getParticleGroup(interactionid)->getNbParticlesInGroup(),
//tree->getParticleGroup(idxGroup)->getNumberOfLeavesInBlock(),
//tree->getParticleGroup(idxGroup)->getSizeOfInterval(),
//tree->getParticleGroup(idxGroup)->getNbParticlesInGroup(),
//outsideInteractions->size(),
//tree->getParticleGroup(interactionid)->getStartingIndex(),
//tree->getParticleGroup(interactionid)->getEndingIndex(),
//tree->getParticleGroup(idxGroup)->getStartingIndex(),
//tree->getParticleGroup(idxGroup)->getEndingIndex(),
//starpu_mpi_data_get_rank(particleHandles[interactionid].down)),
//#endif
//#endif
//0);
//}
}
else
{
starpu_mpi_insert_task
(
MPI_COMM_WORLD
,
&
p2p_cl_inout_mpi
,
STARPU_VALUE
,
&
wrapperptr
,
sizeof
(
wrapperptr
),
STARPU_VALUE
,
&
outsideInteractions
,
sizeof
(
outsideInteractions
),
STARPU_VALUE
,
&
particleHandles
[
idxGroup
].
intervalSize
,
sizeof
(
int
),
#ifdef SCALFMM_STARPU_USE_PRIO
STARPU_PRIORITY
,
PrioClass
::
Controller
().
getInsertionPosP2PExtern
(),
#endif
STARPU_R
,
particleHandles
[
idxGroup
].
symb
,
(
STARPU_RW
|
STARPU_COMMUTE_IF_SUPPORTED
),
particleHandles
[
idxGroup
].
down
,
STARPU_R
,
particleHandles
[
interactionid
].
symb
,
#ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
p2pOuterTaskNames
.
get
(),
#else
//"P2P_out-nb_i_p_nb_i_p_s"
STARPU_NAME
,
taskNames
->
print
(
"P2P_out"
,
"%d, %lld, %lld, %d, %lld, %lld, %d, %lld, %lld, %lld, %lld, %d
\n
"
,
tree
->
getParticleGroup
(
idxGroup
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getNbParticlesInGroup
(),
tree
->
getParticleGroup
(
interactionid
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
interactionid
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
interactionid
)
->
getNbParticlesInGroup
(),
outsideInteractions
->
size
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getStartingIndex
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getEndingIndex
(),
tree
->
getParticleGroup
(
interactionid
)
->
getStartingIndex
(),
tree
->
getParticleGroup
(
interactionid
)
->
getEndingIndex
(),
starpu_mpi_data_get_rank
(
particleHandles
[
idxGroup
].
down
)),
#endif
#endif
0
);
std
::
vector
<
OutOfBlockInteraction
>
outsideInteractions_2
=
externalInteractionsLeafLevel
[
idxGroup
][
idxInteraction
].
interactions
;
for
(
int
i
=
0
;
i
<
outsideInteractions_2
.
size
();
++
i
)
{
MortonIndex
tmp
=
outsideInteractions_2
[
i
].
outIndex
;
outsideInteractions_2
[
i
].
outIndex
=
outsideInteractions_2
[
i
].
insideIndex
;
outsideInteractions_2
[
i
].
insideIndex
=
tmp
;
int
tmp2
=
outsideInteractions_2
[
i
].
insideIdxInBlock
;
outsideInteractions_2
[
i
].
insideIdxInBlock
=
outsideInteractions_2
[
i
].
outsideIdxInBlock
;
outsideInteractions_2
[
i
].
outsideIdxInBlock
=
tmp2
;
outsideInteractions_2
[
i
].
relativeOutPosition
=
getOppositeInterIndex
(
outsideInteractions_2
[
i
].
relativeOutPosition
);
}
//TODO delete when done in the destructor
std
::
vector
<
OutOfBlockInteraction
>*
c
=
new
std
::
vector
<
OutOfBlockInteraction
>
(
outsideInteractions_2
);
starpu_mpi_insert_task
(
MPI_COMM_WORLD
,
&
p2p_cl_inout_mpi
,
STARPU_VALUE
,
&
wrapperptr
,
sizeof
(
wrapperptr
),
STARPU_VALUE
,
&
c
,
sizeof
(
c
),
STARPU_VALUE
,
&
particleHandles
[
idxGroup
].
intervalSize
,
sizeof
(
int
),
#ifdef SCALFMM_STARPU_USE_PRIO
STARPU_PRIORITY
,
PrioClass
::
Controller
().
getInsertionPosP2PExtern
(),
#endif
STARPU_R
,
particleHandles
[
interactionid
].
symb
,
(
STARPU_RW
|
STARPU_COMMUTE_IF_SUPPORTED
),
particleHandles
[
interactionid
].
down
,
STARPU_R
,
particleHandles
[
idxGroup
].
symb
,
#ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
p2pOuterTaskNames
.
get
(),
#else
//"P2P_out-nb_i_p_nb_i_p_s"
STARPU_NAME
,
taskNames
->
print
(
"P2P_out"
,
"%d, %lld, %lld, %d, %lld, %lld, %d, %lld, %lld, %lld, %lld, %d
\n
"
,
tree
->
getParticleGroup
(
interactionid
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
interactionid
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
interactionid
)
->
getNbParticlesInGroup
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getNbParticlesInGroup
(),
outsideInteractions
->
size
(),
tree
->
getParticleGroup
(
interactionid
)
->
getStartingIndex
(),
tree
->
getParticleGroup
(
interactionid
)
->
getEndingIndex
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getStartingIndex
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getEndingIndex
(),
starpu_mpi_data_get_rank
(
particleHandles
[
interactionid
].
down
)),
#endif
#endif
0
);
}
}
}
FLOG
(
timerOutBlock
.
tac
()
);
...
...
This diff is collapsed.
Click to expand it.
Tests/GroupTree/compareDAGmapping.cpp
+
0
−
4
View file @
a9511bb8
...
...
@@ -29,10 +29,6 @@ struct Task
{
if
(
type
!=
other
.
type
||
id
.
size
()
!=
other
.
id
.
size
())
return
false
;
if
(
type
==
P2P_OUT
)
//Symétrisation
if
(
id
[
0
]
==
other
.
id
[
2
]
&&
id
[
1
]
==
other
.
id
[
3
]
&&
id
[
2
]
==
other
.
id
[
0
]
&&
id
[
3
]
==
other
.
id
[
1
])
return
true
;
for
(
size_t
i
=
0
;
i
<
id
.
size
();
++
i
)
if
(
id
[
i
]
!=
other
.
id
[
i
])
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment