Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
bee90b0d
Commit
bee90b0d
authored
Apr 07, 2015
by
BRAMAS Berenger
Browse files
Add the usage of arbiter if supported
parent
51119106
Changes
2
Hide whitespace changes
Inline
Side-by-side
Src/GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp
View file @
bee90b0d
...
...
@@ -112,6 +112,11 @@ protected:
FStarPUPtrInterface
wrappers
;
FStarPUPtrInterface
*
wrapperptr
;
#ifdef STARPU_SUPPORT_ARBITER
starpu_arbiter_t
arbiterPole
;
starpu_arbiter_t
arbiterLocal
;
starpu_arbiter_t
arbiterParticles
;
#endif
public:
FGroupTaskStarPUAlgorithm
(
OctreeClass
*
const
inTree
,
KernelClass
*
inKernels
)
:
tree
(
inTree
),
originalCpuKernel
(
inKernels
),
...
...
@@ -168,6 +173,12 @@ public:
initCodelet
();
#ifdef STARPU_SUPPORT_ARBITER
arbiterPole
=
starpu_arbiter_create
();
arbiterLocal
=
starpu_arbiter_create
();
arbiterParticles
=
starpu_arbiter_create
();
#endif
FLOG
(
FLog
::
Controller
<<
"FGroupTaskStarPUAlgorithm (Max Worker "
<<
starpu_worker_get_count
()
<<
")
\n
"
);
#ifdef STARPU_USE_CPU
FLOG
(
FLog
::
Controller
<<
"FGroupTaskStarPUAlgorithm (Max CPU "
<<
starpu_cpu_worker_get_count
()
<<
")
\n
"
);
...
...
@@ -214,6 +225,13 @@ public:
#endif
starpu_pthread_mutex_destroy
(
&
releaseMutex
);
#ifdef STARPU_SUPPORT_ARBITER
starpu_arbiter_destroy
(
arbiterPole
);
starpu_arbiter_destroy
(
arbiterLocal
);
starpu_arbiter_destroy
(
arbiterParticles
);
#endif
starpu_shutdown
();
}
...
...
@@ -495,6 +513,10 @@ protected:
starpu_variable_data_register
(
&
cellHandles
[
idxLevel
][
idxGroup
].
down
,
0
,
(
uintptr_t
)
currentCells
->
getRawLocalBuffer
(),
currentCells
->
getLocalBufferSizeInByte
());
cellHandles
[
idxLevel
][
idxGroup
].
intervalSize
=
int
(
currentCells
->
getEndingIndex
()
-
currentCells
->
getStartingIndex
());
#ifdef STARPU_SUPPORT_ARBITER
starpu_data_assign_arbiter
(
cellHandles
[
idxLevel
][
idxGroup
].
up
,
arbiterPole
);
starpu_data_assign_arbiter
(
cellHandles
[
idxLevel
][
idxGroup
].
down
,
arbiterLocal
);
#endif
}
}
{
...
...
@@ -506,6 +528,9 @@ protected:
starpu_variable_data_register
(
&
particleHandles
[
idxGroup
].
down
,
0
,
(
uintptr_t
)
containers
->
getRawAttributesBuffer
(),
containers
->
getAttributesBufferSizeInByte
());
particleHandles
[
idxGroup
].
intervalSize
=
int
(
containers
->
getEndingIndex
()
-
containers
->
getStartingIndex
());
#ifdef STARPU_SUPPORT_ARBITER
starpu_data_assign_arbiter
(
particleHandles
[
idxGroup
].
down
,
arbiterParticles
);
#endif
}
}
}
...
...
Src/GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp
View file @
bee90b0d
...
...
@@ -129,6 +129,11 @@ protected:
FStarPUPtrInterface
wrappers
;
FStarPUPtrInterface
*
wrapperptr
;
#ifdef STARPU_SUPPORT_ARBITER
starpu_arbiter_t
arbiterPole
;
starpu_arbiter_t
arbiterLocal
;
starpu_arbiter_t
arbiterParticles
;
#endif
public:
FGroupTaskStarPUMpiAlgorithm
(
const
FMpi
::
FComm
&
inComm
,
OctreeClass
*
const
inTree
,
KernelClass
*
inKernels
)
:
comm
(
inComm
),
tree
(
inTree
),
originalCpuKernel
(
inKernels
),
...
...
@@ -186,6 +191,11 @@ public:
initCodelet
();
initCodeletMpi
();
#ifdef STARPU_SUPPORT_ARBITER
arbiterPole
=
starpu_arbiter_create
();
arbiterLocal
=
starpu_arbiter_create
();
arbiterParticles
=
starpu_arbiter_create
();
#endif
FLOG
(
FLog
::
Controller
<<
"FGroupTaskStarPUAlgorithm (Max Worker "
<<
starpu_worker_get_count
()
<<
")
\n
"
);
#ifdef STARPU_USE_CPU
...
...
@@ -234,6 +244,12 @@ public:
#endif
starpu_pthread_mutex_destroy
(
&
releaseMutex
);
#ifdef STARPU_SUPPORT_ARBITER
starpu_arbiter_destroy
(
arbiterPole
);
starpu_arbiter_destroy
(
arbiterLocal
);
starpu_arbiter_destroy
(
arbiterParticles
);
#endif
starpu_mpi_shutdown
();
starpu_shutdown
();
}
...
...
@@ -1084,6 +1100,10 @@ protected:
starpu_variable_data_register
(
&
cellHandles
[
idxLevel
][
idxGroup
].
down
,
0
,
(
uintptr_t
)
currentCells
->
getRawLocalBuffer
(),
currentCells
->
getLocalBufferSizeInByte
());
cellHandles
[
idxLevel
][
idxGroup
].
intervalSize
=
int
(
currentCells
->
getEndingIndex
()
-
currentCells
->
getStartingIndex
());
#ifdef STARPU_SUPPORT_ARBITER
starpu_data_assign_arbiter
(
cellHandles
[
idxLevel
][
idxGroup
].
up
,
arbiterPole
);
starpu_data_assign_arbiter
(
cellHandles
[
idxLevel
][
idxGroup
].
down
,
arbiterLocal
);
#endif
}
}
{
...
...
@@ -1095,6 +1115,9 @@ protected:
starpu_variable_data_register
(
&
particleHandles
[
idxGroup
].
down
,
0
,
(
uintptr_t
)
containers
->
getRawAttributesBuffer
(),
containers
->
getAttributesBufferSizeInByte
());
particleHandles
[
idxGroup
].
intervalSize
=
int
(
containers
->
getEndingIndex
()
-
containers
->
getStartingIndex
());
#ifdef STARPU_SUPPORT_ARBITER
starpu_data_assign_arbiter
(
particleHandles
[
idxGroup
].
down
,
arbiterParticles
);
#endif
}
}
}
...
...
Write
Preview
Supports
Markdown
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