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
9d5a03e4
Commit
9d5a03e4
authored
Sep 13, 2016
by
Berenger Bramas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update M2L
parent
b6a71aab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
Src/GroupTree/Core/FGroupOfCells.hpp
Src/GroupTree/Core/FGroupOfCells.hpp
+6
-2
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
+17
-15
No files found.
Src/GroupTree/Core/FGroupOfCells.hpp
View file @
9d5a03e4
...
...
@@ -406,23 +406,27 @@ public:
size_t
extractGetSizeSymbUp
(
const
std
::
vector
<
int
>&
cellsToExtract
)
const
{
return
cellsToExtract
.
size
()
*
sizeof
(
SymboleCellClass
)
*
sizeof
(
PoleCellClass
);
return
cellsToExtract
.
size
()
*
(
sizeof
(
SymboleCellClass
)
+
sizeof
(
PoleCellClass
)
);
}
void
extractDataUp
(
const
std
::
vector
<
int
>&
cellsToExtract
,
unsigned
char
*
outputBuffer
,
const
size_t
outputBufferSize
)
const
{
FAssertLF
(
outputBuffer
||
outputBufferSize
==
0
);
size_t
idxValue
=
0
;
for
(
size_t
idxEx
=
0
;
idxEx
<
cellsToExtract
.
size
()
;
++
idxEx
){
const
int
idCell
=
cellsToExtract
[
idxEx
];
FAssertLF
(
idCell
<
blockHeader
->
numberOfCellsInBlock
);
memcpy
(
&
outputBuffer
[
idxValue
],
&
blockCells
[
idCell
],
sizeof
(
SymboleCellClass
));
idxValue
+=
sizeof
(
SymboleCellClass
);
FAssertLF
(
idxValue
<=
outputBufferSize
);
memcpy
(
&
outputBuffer
[
idxValue
],
&
cellMultipoles
[
idCell
],
sizeof
(
PoleCellClass
));
idxValue
+=
sizeof
(
PoleCellClass
);
FAssertLF
(
idxValue
<=
outputBufferSize
);
}
FAssertLF
(
idxValue
==
outputBufferSize
);
}
...
...
@@ -445,7 +449,7 @@ public:
}
size_t
extractGetSizeSymbDown
(
const
std
::
vector
<
int
>&
cellsToExtract
)
const
{
return
cellsToExtract
.
size
()
*
sizeof
(
SymboleCellClass
)
*
sizeof
(
LocalCellClass
);
return
cellsToExtract
.
size
()
*
(
sizeof
(
SymboleCellClass
)
+
sizeof
(
LocalCellClass
)
);
}
void
extractDataDown
(
const
std
::
vector
<
int
>&
cellsToExtract
,
...
...
Src/GroupTree/Core/FGroupTaskStarpuImplicitAlgorithm.hpp
View file @
9d5a03e4
...
...
@@ -852,9 +852,10 @@ protected:
cell_extract_up
.
where
|=
STARPU_CPU
;
memset
(
&
cell_insert_up
,
0
,
sizeof
(
cell_insert_up
));
cell_
extrac
t_up
.
nbuffers
=
3
;
cell_
inser
t_up
.
nbuffers
=
3
;
cell_insert_up
.
modes
[
0
]
=
STARPU_R
;
cell_insert_up
.
modes
[
1
]
=
STARPU_RW
;
cell_insert_up
.
modes
[
2
]
=
STARPU_RW
;
cell_insert_up
.
name
=
"cell_insert_up"
;
cell_insert_up
.
cpu_funcs
[
0
]
=
ThisClass
::
InsertCellUp
;
cell_insert_up
.
where
|=
STARPU_CPU
;
...
...
@@ -889,29 +890,29 @@ protected:
static
void
InsertCellUp
(
void
*
buffers
[],
void
*
cl_arg
){
CellContainerClass
currentCells
((
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
1
]),
STARPU_VECTOR_GET_NX
(
buffers
[
1
]),
nullptr
,
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
2
]));
unsigned
char
*
inBuffer
=
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
0
]);
size_t
size
=
STARPU_VECTOR_GET_NX
(
buffers
[
0
]);
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
2
]),
nullptr
);
CellExtractedHandles
*
interactionBufferPtr
;
starpu_codelet_unpack_args
(
cl_arg
,
&
interactionBufferPtr
);
currentCells
.
restoreDataUp
(
interactionBufferPtr
->
cellsToExtract
,
inBuffer
,
size
);
currentCells
.
restoreDataUp
(
interactionBufferPtr
->
cellsToExtract
,
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
0
]),
STARPU_VECTOR_GET_NX
(
buffers
[
0
]));
}
static
void
ExtractCellUp
(
void
*
buffers
[],
void
*
cl_arg
){
CellContainerClass
currentCells
((
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
0
]),
STARPU_VECTOR_GET_NX
(
buffers
[
0
]),
nullptr
,
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
1
]));
unsigned
char
*
inBuffer
=
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
2
]);
size_t
size
=
STARPU_VECTOR_GET_NX
(
buffers
[
2
]);
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
1
]),
nullptr
);
CellExtractedHandles
*
interactionBufferPtr
;
starpu_codelet_unpack_args
(
cl_arg
,
&
interactionBufferPtr
);
currentCells
.
extractDataUp
(
interactionBufferPtr
->
cellsToExtract
,
inBuffer
,
size
);
currentCells
.
extractDataUp
(
interactionBufferPtr
->
cellsToExtract
,
(
unsigned
char
*
)
STARPU_VECTOR_GET_PTR
(
buffers
[
2
]),
STARPU_VECTOR_GET_NX
(
buffers
[
2
]));
}
void
initCodeletMpi
(){
...
...
@@ -1549,8 +1550,9 @@ protected:
}
interactionBuffer
.
size
=
tree
->
getCellGroup
(
idxLevel
,
interactionid
)
->
extractGetSizeSymbUp
(
interactionBuffer
.
cellsToExtract
);
// I allocate only if I will use it to extract
if
(
starpu_mpi_data_get_rank
(
cellHandles
[
idxLevel
][
interactionid
].
symb
)){
if
(
starpu_mpi_data_get_rank
(
cellHandles
[
idxLevel
][
interactionid
].
symb
)
==
mpi_rank
){
interactionBuffer
.
data
.
reset
(
new
unsigned
char
[
interactionBuffer
.
size
]);
FAssertLF
(
interactionBuffer
.
data
);
}
else
{
interactionBuffer
.
data
.
reset
(
nullptr
);
...
...
@@ -1655,7 +1657,7 @@ protected:
}
interactionBuffer
.
size
=
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
extractGetSizeSymbUp
(
interactionBuffer
.
cellsToExtract
);
// I allocate only if I will use it to extract
if
(
starpu_mpi_data_get_rank
(
cellHandles
[
idxLevel
][
idxGroup
].
symb
)){
if
(
starpu_mpi_data_get_rank
(
cellHandles
[
idxLevel
][
idxGroup
].
symb
)
==
mpi_rank
){
interactionBuffer
.
data
.
reset
(
new
unsigned
char
[
interactionBuffer
.
size
]);
}
else
{
...
...
@@ -1725,8 +1727,8 @@ protected:
#endif
STARPU_R
,
cellHandles
[
idxLevel
][
interactionid
].
symb
,
(
STARPU_RW
|
STARPU_COMMUTE_IF_SUPPORTED
),
cellHandles
[
idxLevel
][
interactionid
].
down
,
STARPU_R
W
,
duplicateB
.
symb
,
STARPU_R
W
,
duplicateB
.
other
,
STARPU_R
,
duplicateB
.
symb
,
STARPU_R
,
duplicateB
.
other
,
#ifdef STARPU_USE_TASK_NAME
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
m2lOuterTaskNames
[
idxLevel
].
get
(),
...
...
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