Skip to content
GitLab
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
654c2b4f
Commit
654c2b4f
authored
Nov 25, 2014
by
PIACIBELLO Cyrille
Browse files
Merge branch 'master' of
git+ssh://scm.gforge.inria.fr//gitroot/scalfmm/scalfmm
parents
d9dec37a
50fb98aa
Changes
7
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
654c2b4f
...
...
@@ -64,7 +64,10 @@ OPTION( ScalFMM_USE_AVX "Set to ON to compile with AVX support"
OPTION
(
ScalFMM_USE_ASSERT
"Set to ON to enable safe tests during execution"
ON
)
OPTION
(
ScalFMM_USE_MIC_NATIVE
"Set to ON to compile in native mode for MIC"
OFF
)
OPTION
(
ScalFMM_BUILD_ONLY_LIB
"Set to ON to compile only the lib (examples are not compiled) "
OFF
)
#OPTION( ScalFMM_ONLY_DEVEL "Set to ON to compile Development tools (only scalfmm team)" OFF )
OPTION
(
ScalFMM_ONLY_DEVEL
"Set to ON to compile Development tools (only scalfmm team)"
ON
)
if
(
ScalFMM_ONLY_DEVEL
)
OPTION
(
ScalFMM_USE_STARPU
"Set to ON to build ScaFMM with StarPU"
OFF
)
endif
# Set scalfmm to default libraries
SET
(
SCALFMM_LIBRARIES
""
)
SET
(
ScaLFMM_CXX_FLAGS
""
)
...
...
Src/Utils/FGlobal.hpp
View file @
654c2b4f
...
...
@@ -95,5 +95,14 @@ typedef long long MortonIndex;
#endif
#endif
///////////////////////////////////////////////////////
// Test OMP4
///////////////////////////////////////////////////////
#if _OPENMP >= 201307
#define ScalFMM_USE_OMP4
#endif
#endif //FGLOBAL_HPP
Src/Utils/FParameterNames.hpp
View file @
654c2b4f
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
é
renger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
e
renger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
...
...
@@ -76,7 +76,7 @@ static const FParameterNames InputFileTwow = {
};
static
const
FParameterNames
InputBinFormat
=
{
{
"-binin"
,
"-bininput"
,
"--binary-input"
}
,
{
"-binin"
,
"-bininput"
,
"--binary-input"
}
,
"To input is in binary format."
};
...
...
@@ -197,6 +197,11 @@ inline void PrintUsedOptions(const std::vector<FParameterNames>& options){
FParameterDefinitions::PrintUsedOptions(optionsvec);\
return 0;\
} \
{\
std::cout << "[ScalFMM] To have the help for this executable pass: "; \
for(auto pr: FParameterDefinitions::Help.options) std::cout << pr << ", "; \
std::cout << "\n";\
}
#endif // FPARAMETERNAMES_HPP
Tests/noDist/testBlockedAlgorithm.cpp
View file @
654c2b4f
#include
"../../Src/Utils/FGlobal.hpp"
#include
"../../Src/GroupTree/FGroupTree.hpp"
#include
"../../Src/Components/FSimpleLeaf.hpp"
...
...
@@ -29,15 +31,23 @@ int main(int argc, char* argv[]){
"The size of the block of the blocked tree"
};
FHelpDescribeAndExit
(
argc
,
argv
,
"Test the blocked tree by counting the particles."
,
FParameterDefinitions
::
OctreeHeight
,
FParameterDefinitions
::
OctreeHeight
,
FParameterDefinitions
::
NbThreads
,
FParameterDefinitions
::
NbParticles
,
LocalOptionBlocSize
);
// Initialize the types
typedef
FTestCell
GroupCellClass
;
typedef
FGroupTestParticleContainer
GroupContainerClass
;
typedef
FGroupTree
<
GroupCellClass
,
GroupContainerClass
,
2
,
long
long
int
>
GroupOctreeClass
;
typedef
FTestKernels
<
GroupCellClass
,
GroupContainerClass
>
GroupKernelClass
;
#ifdef ScalFMM_USE_STARPU
typedef
FGroupStarPUAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#elif defined(ScalFMM_USE_OMP4)
// Set the number of threads
omp_set_num_threads
(
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
NbThreads
.
options
,
omp_get_max_threads
()));
typedef
FGroupTaskDepAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#else
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
typedef
FGroupTaskDepAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
typedef
FGroupTaskAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#endif
typedef
FTestCell
CellClass
;
typedef
FTestParticleContainer
ContainerClass
;
...
...
Tests/noDist/testBlockedChebyshev.cpp
View file @
654c2b4f
#include
"../../Src/Utils/FGlobal.hpp"
#include
"../../Src/GroupTree/FGroupTree.hpp"
...
...
@@ -42,8 +43,6 @@ int main(int argc, char* argv[]){
FParameterDefinitions
::
OctreeHeight
,
FParameterDefinitions
::
InputFile
,
FParameterDefinitions
::
NbParticles
,
FParameterDefinitions
::
NbThreads
,
LocalOptionBlocSize
,
LocalOptionNoValidate
);
// Set the number of threads
omp_set_num_threads
(
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
NbThreads
.
options
,
omp_get_max_threads
()));
// Initialize the types
static
const
int
ORDER
=
6
;
...
...
@@ -52,9 +51,16 @@ int main(int argc, char* argv[]){
typedef
FP2PGroupParticleContainer
<>
GroupContainerClass
;
typedef
FGroupTree
<
GroupCellClass
,
GroupContainerClass
,
5
,
FReal
>
GroupOctreeClass
;
typedef
FChebSymKernel
<
GroupCellClass
,
GroupContainerClass
,
MatrixKernelClass
,
ORDER
>
GroupKernelClass
;
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
//typedef FGroupTaskAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
#ifdef ScalFMM_USE_STARPU
typedef
FGroupStarPUAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#elif defined(ScalFMM_USE_OMP4)
// Set the number of threads
omp_set_num_threads
(
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
NbThreads
.
options
,
omp_get_max_threads
()));
typedef
FGroupTaskDepAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#else
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
typedef
FGroupTaskAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#endif
// Get params
const
int
NbLevels
=
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
OctreeHeight
.
options
,
5
);
...
...
Tests/noDist/testBlockedRotation.cpp
View file @
654c2b4f
#include
"../../Src/Utils/FGlobal.hpp"
#include
"../../Src/GroupTree/FGroupTree.hpp"
#include
"../../Src/Components/FSimpleLeaf.hpp"
...
...
@@ -41,19 +43,23 @@ int main(int argc, char* argv[]){
FParameterDefinitions
::
NbThreads
,
FParameterDefinitions
::
NbParticles
,
LocalOptionBlocSize
,
LocalOptionNoValidate
);
// Set the number of threads
omp_set_num_threads
(
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
NbThreads
.
options
,
omp_get_max_threads
()));
// Initialize the types
static
const
int
P
=
9
;
typedef
FRotationCell
<
P
>
GroupCellClass
;
typedef
FP2PGroupParticleContainer
<>
GroupContainerClass
;
typedef
FGroupTree
<
GroupCellClass
,
GroupContainerClass
,
5
,
FReal
>
GroupOctreeClass
;
typedef
FRotationKernel
<
GroupCellClass
,
GroupContainerClass
,
P
>
GroupKernelClass
;
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
//typedef FGroupTaskAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
#ifdef ScalFMM_USE_STARPU
typedef
FGroupStarPUAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#elif defined(ScalFMM_USE_OMP4)
// Set the number of threads
omp_set_num_threads
(
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
NbThreads
.
options
,
omp_get_max_threads
()));
typedef
FGroupTaskDepAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#else
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, GroupCellClass, GroupKernelClass, typename GroupOctreeClass::ParticleGroupClass, GroupContainerClass > GroupAlgorithm;
typedef
FGroupTaskAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
GroupCellClass
,
GroupKernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
GroupContainerClass
>
GroupAlgorithm
;
#endif
// Get params
const
int
NbLevels
=
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
OctreeHeight
.
options
,
5
);
...
...
Tests/noDist/testBlockedTree.cpp
View file @
654c2b4f
#include
"../../Src/Utils/FGlobal.hpp"
#include
"../../Src/GroupTree/FGroupTree.hpp"
...
...
@@ -24,6 +25,8 @@
#include
"../../Src/Files/FFmaGenericLoader.hpp"
#include
"../../Src/GroupTree/FGroupSeqAlgorithm.hpp"
#include
"../../Src/GroupTree/FGroupTaskAlgorithm.hpp"
#include
"../../Src/GroupTree/FGroupTaskDepAlgorithm.hpp"
#include
"../../Src/GroupTree/FP2PGroupParticleContainer.hpp"
#include
"../../Src/Utils/FParameterNames.hpp"
...
...
@@ -84,7 +87,14 @@ int main(int argc, char* argv[]){
typedef
FRotationKernel
<
CellClass
,
FP2PGroupParticleContainer
<>
,
P
>
KernelClass
;
typedef
FGroupSeqAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
CellClass
,
KernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
FP2PGroupParticleContainer
<>
>
GroupAlgorithm
;
#ifdef ScalFMM_USE_STARPU
typedef
FGroupStarPUAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
CellClass
,
KernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
FP2PGroupParticleContainer
<>
>
GroupAlgorithm
;
#elif defined(ScalFMM_USE_OMP4)
typedef
FGroupTaskDepAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
CellClass
,
KernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
FP2PGroupParticleContainer
<>
>
GroupAlgorithm
;
#else
//typedef FGroupSeqAlgorithm<GroupOctreeClass, typename GroupOctreeClass::CellGroupClass, CellClass, KernelClass, typename GroupOctreeClass::ParticleGroupClass, FP2PGroupParticleContainer<> > GroupAlgorithm;
typedef
FGroupTaskAlgorithm
<
GroupOctreeClass
,
typename
GroupOctreeClass
::
CellGroupClass
,
CellClass
,
KernelClass
,
typename
GroupOctreeClass
::
ParticleGroupClass
,
FP2PGroupParticleContainer
<>
>
GroupAlgorithm
;
#endif
KernelClass
kernel
(
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
GroupAlgorithm
algo
(
&
groupedTree2
,
&
kernel
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment