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
cd3568f2
Commit
cd3568f2
authored
Mar 03, 2016
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update simgrid task name system
parent
a5616c5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
21 deletions
+35
-21
Src/GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp
Src/GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp
+11
-11
Src/GroupTree/StarPUUtils/FStarPUTaskNameParams.hpp
Src/GroupTree/StarPUUtils/FStarPUTaskNameParams.hpp
+24
-10
No files found.
Src/GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp
View file @
cd3568f2
...
...
@@ -1018,7 +1018,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
p2mTaskNames
.
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"P2M
_
nb%d_i%lld_p%lld"
,
STARPU_NAME
,
taskNames
.
print
(
"P2M
"
,
"
nb%d_i%lld_p%lld"
,
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getNbParticlesInGroup
()),
...
...
@@ -1080,7 +1080,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
task
->
name
=
m2mTaskNames
[
idxLevel
].
get
();
#else
task
->
name
=
taskNames
.
print
(
"M2M
_
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
task
->
name
=
taskNames
.
print
(
"M2M
"
,
"
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
(),
...
...
@@ -1127,7 +1127,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
task
->
name
=
m2mTaskNames
[
idxLevel
].
get
();
#else
task
->
name
=
taskNames
.
print
(
"M2M
_
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
task
->
name
=
taskNames
.
print
(
"M2M
"
,
"
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
(),
...
...
@@ -1170,7 +1170,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
m2lTaskNames
[
idxLevel
].
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"M2L
_
l%d_nb%d_i%lld"
,
STARPU_NAME
,
taskNames
.
print
(
"M2L
"
,
"
l%d_nb%d_i%lld"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
()),
...
...
@@ -1205,7 +1205,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
m2lOuterTaskNames
[
idxLevel
].
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"M2L_out
_
l%d_nb%d_i%lld_nb%d_i%lld_s%d"
,
STARPU_NAME
,
taskNames
.
print
(
"M2L_out
"
,
"
l%d_nb%d_i%lld_nb%d_i%lld_s%d"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
(),
...
...
@@ -1234,7 +1234,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
m2lOuterTaskNames
[
idxLevel
].
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"M2L_out
_
l%d_nb%d_i%lld_nb%d_i%lld_s%d"
,
STARPU_NAME
,
taskNames
.
print
(
"M2L_out
"
,
"
l%d_nb%d_i%lld_nb%d_i%lld_s%d"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
interactionid
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
interactionid
)
->
getSizeOfInterval
(),
...
...
@@ -1307,7 +1307,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
task
->
name
=
l2lTaskNames
[
idxLevel
].
get
();
#else
task
->
name
=
taskNames
.
print
(
"L2L
_
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
task
->
name
=
taskNames
.
print
(
"L2L
"
,
"
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
(),
...
...
@@ -1357,7 +1357,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
task
->
name
=
l2lTaskNames
[
idxLevel
].
get
();
#else
task
->
name
=
taskNames
.
print
(
"L2L
_
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
task
->
name
=
taskNames
.
print
(
"L2L
"
,
"
l%d_nb%d_i%lld_nbc%d_ic%lld_s%lld"
,
idxLevel
,
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
idxLevel
,
idxGroup
)
->
getSizeOfInterval
(),
...
...
@@ -1410,7 +1410,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
p2pOuterTaskNames
.
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"P2P_out
_
nb%d_i%lld_p%lld_nb%d_i%lld_p%lld_s%d"
,
STARPU_NAME
,
taskNames
.
print
(
"P2P_out
"
,
"
nb%d_i%lld_p%lld_nb%d_i%lld_p%lld_s%d"
,
tree
->
getParticleGroup
(
idxGroup
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getNbParticlesInGroup
(),
...
...
@@ -1442,7 +1442,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
p2pTaskNames
.
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"P2P
_
nb%d_i%lld_p%lld"
,
STARPU_NAME
,
taskNames
.
print
(
"P2P
"
,
"
nb%d_i%lld_p%lld"
,
tree
->
getParticleGroup
(
idxGroup
)
->
getNumberOfLeavesInBlock
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getParticleGroup
(
idxGroup
)
->
getNbParticlesInGroup
()),
...
...
@@ -1484,7 +1484,7 @@ protected:
#ifndef SCALFMM_SIMGRID_TASKNAMEPARAMS
STARPU_NAME
,
l2pTaskNames
.
get
(),
#else
STARPU_NAME
,
taskNames
.
print
(
"L2P
_
nb%d_i%lld_p%lld"
,
STARPU_NAME
,
taskNames
.
print
(
"L2P
"
,
"
nb%d_i%lld_p%lld"
,
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getNumberOfCellsInBlock
(),
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getSizeOfInterval
(),
tree
->
getCellGroup
(
tree
->
getHeight
()
-
1
,
idxGroup
)
->
getNbParticlesInGroup
()),
...
...
Src/GroupTree/StarPUUtils/FStarPUTaskNameParams.hpp
View file @
cd3568f2
...
...
@@ -14,12 +14,18 @@
class
FStarPUTaskNameParams
{
protected:
std
::
list
<
const
char
*>
names
;
FILE
*
fout
;
int
taskid
;
public:
FStarPUTaskNameParams
(){
FStarPUTaskNameParams
()
:
fout
(
nullptr
),
taskid
(
0
){
const
char
*
fname
=
getenv
(
"SCALFMM_SIMGRIDOUT"
)
?
getenv
(
"SCALFMM_SIMGRIDOUT"
)
:
"/tmp/scalfmm.out"
;
fout
=
fopen
(
fname
,
"w"
);
std
::
cout
<<
"output task name in "
<<
fname
<<
"
\n
"
;
}
~
FStarPUTaskNameParams
(){
fclose
(
fout
);
clear
();
}
...
...
@@ -31,22 +37,30 @@ public:
}
template
<
typename
...
Params
>
const
char
*
print
(
const
char
format
[],
Params
...
args
){
const
char
*
print
(
const
char
key
[],
const
char
format
[],
Params
...
args
){
const
size_t
length
=
512
;
char
*
name
=
new
char
[
length
+
1
];
snprintf
(
name
,
length
,
format
,
args
...
);
snprintf
(
name
,
length
,
"%s_%d"
,
key
,
taskid
++
);
name
[
length
]
=
'\0'
;
names
.
push_back
(
name
);
fprintf
(
fout
,
"%s="
,
name
);
fprintf
(
fout
,
format
,
args
...);
return
name
;
}
const
char
*
add
(
const
char
*
strToCpy
){
const
size_t
length
=
strlen
(
strToCpy
);
char
*
cpy
=
new
char
[
length
+
1
];
memcpy
(
cpy
,
length
,
strToCpy
,
length
);
cpy
[
length
]
=
'\0'
;
names
.
push_back
(
cpy
);
return
cpy
;
const
char
*
add
(
const
char
key
[],
const
char
*
strToCpy
){
const
size_t
length
=
512
;
char
*
name
=
new
char
[
length
+
1
];
snprintf
(
name
,
length
,
"%s_%d"
,
key
,
taskid
++
);
name
[
length
]
=
'\0'
;
names
.
push_back
(
name
);
fprintf
(
fout
,
"%s="
,
name
);
fprintf
(
fout
,
strToCpy
);
return
name
;
}
};
...
...
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