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
507e5629
Commit
507e5629
authored
Dec 05, 2016
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://scm.gforge.inria.fr//gitroot/scalfmm/scalfmm
parents
d7a72e3f
fa06c40b
Changes
81
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
81 changed files
with
10616 additions
and
8637 deletions
+10616
-8637
Addons/CKernelApi/CMakeLists.txt
Addons/CKernelApi/CMakeLists.txt
+1
-1
Addons/CKernelApi/Src/CScalfmmApi.h
Addons/CKernelApi/Src/CScalfmmApi.h
+2
-1
Addons/CKernelApi/Src/FUserKernelDistrEngine.hpp
Addons/CKernelApi/Src/FUserKernelDistrEngine.hpp
+23
-12
Addons/CKernelApi/Src/FUserKernelEngine.hpp
Addons/CKernelApi/Src/FUserKernelEngine.hpp
+4
-3
Addons/CKernelApi/Tests/testMpiUserKernel.c
Addons/CKernelApi/Tests/testMpiUserKernel.c
+1
-1
Addons/FmmApi/CMakeLists.txt
Addons/FmmApi/CMakeLists.txt
+57
-58
CMakeLists.txt
CMakeLists.txt
+3
-1
CMakeModules/getCpuInfos.cpp
CMakeModules/getCpuInfos.cpp
+6
-1
CMakeModules/morse/AuxilaryFlags.cmake
CMakeModules/morse/AuxilaryFlags.cmake
+59
-7
CMakeModules/morse/FindHeadersAndLibs.cmake
CMakeModules/morse/FindHeadersAndLibs.cmake
+49
-49
CMakeModules/morse/MorseInit.cmake
CMakeModules/morse/MorseInit.cmake
+7
-5
CMakeModules/morse/ParseArguments.cmake
CMakeModules/morse/ParseArguments.cmake
+30
-30
CMakeModules/morse/PrintFindStatus.cmake
CMakeModules/morse/PrintFindStatus.cmake
+113
-113
CMakeModules/morse/Ressources.cmake
CMakeModules/morse/Ressources.cmake
+19
-19
CMakeModules/morse/RulesPrecisions.cmake
CMakeModules/morse/RulesPrecisions.cmake
+19
-19
CMakeModules/morse/find/FindBLAS.cmake
CMakeModules/morse/find/FindBLAS.cmake
+1066
-1063
CMakeModules/morse/find/FindBLASEXT.cmake
CMakeModules/morse/find/FindBLASEXT.cmake
+250
-259
CMakeModules/morse/find/FindCBLAS.cmake
CMakeModules/morse/find/FindCBLAS.cmake
+285
-283
CMakeModules/morse/find/FindCHAMELEON.cmake
CMakeModules/morse/find/FindCHAMELEON.cmake
+661
-659
CMakeModules/morse/find/FindEZTRACE.cmake
CMakeModules/morse/find/FindEZTRACE.cmake
+249
-247
CMakeModules/morse/find/FindFFTW.cmake
CMakeModules/morse/find/FindFFTW.cmake
+211
-208
CMakeModules/morse/find/FindFXT.cmake
CMakeModules/morse/find/FindFXT.cmake
+203
-201
CMakeModules/morse/find/FindHWLOC.cmake
CMakeModules/morse/find/FindHWLOC.cmake
+232
-231
CMakeModules/morse/find/FindHYPRE.cmake
CMakeModules/morse/find/FindHYPRE.cmake
+273
-0
CMakeModules/morse/find/FindLAPACK.cmake
CMakeModules/morse/find/FindLAPACK.cmake
+502
-476
CMakeModules/morse/find/FindLAPACKE.cmake
CMakeModules/morse/find/FindLAPACKE.cmake
+271
-268
CMakeModules/morse/find/FindLAPACKEXT.cmake
CMakeModules/morse/find/FindLAPACKEXT.cmake
+231
-228
CMakeModules/morse/find/FindMAGMA.cmake
CMakeModules/morse/find/FindMAGMA.cmake
+298
-296
CMakeModules/morse/find/FindMETIS.cmake
CMakeModules/morse/find/FindMETIS.cmake
+127
-124
CMakeModules/morse/find/FindMPIEXT.cmake
CMakeModules/morse/find/FindMPIEXT.cmake
+8
-8
CMakeModules/morse/find/FindMUMPS.cmake
CMakeModules/morse/find/FindMUMPS.cmake
+495
-434
CMakeModules/morse/find/FindPAMPA.cmake
CMakeModules/morse/find/FindPAMPA.cmake
+383
-0
CMakeModules/morse/find/FindPAPI.cmake
CMakeModules/morse/find/FindPAPI.cmake
+310
-0
CMakeModules/morse/find/FindPARMETIS.cmake
CMakeModules/morse/find/FindPARMETIS.cmake
+127
-124
CMakeModules/morse/find/FindPARSEC.cmake
CMakeModules/morse/find/FindPARSEC.cmake
+462
-460
CMakeModules/morse/find/FindPASTIX.cmake
CMakeModules/morse/find/FindPASTIX.cmake
+443
-441
CMakeModules/morse/find/FindPETSc.cmake
CMakeModules/morse/find/FindPETSc.cmake
+318
-0
CMakeModules/morse/find/FindPTSCOTCH.cmake
CMakeModules/morse/find/FindPTSCOTCH.cmake
+215
-193
CMakeModules/morse/find/FindQUARK.cmake
CMakeModules/morse/find/FindQUARK.cmake
+162
-160
CMakeModules/morse/find/FindSCALAPACK.cmake
CMakeModules/morse/find/FindSCALAPACK.cmake
+331
-327
CMakeModules/morse/find/FindSCOTCH.cmake
CMakeModules/morse/find/FindSCOTCH.cmake
+171
-162
CMakeModules/morse/find/FindSIMGRID.cmake
CMakeModules/morse/find/FindSIMGRID.cmake
+203
-201
CMakeModules/morse/find/FindSTARPU.cmake
CMakeModules/morse/find/FindSTARPU.cmake
+754
-752
CMakeModules/morse/find/FindSUITESPARSE.cmake
CMakeModules/morse/find/FindSUITESPARSE.cmake
+433
-0
CMakeModules/morse/find/FindTMG.cmake
CMakeModules/morse/find/FindTMG.cmake
+204
-202
CMakeModules/morse/find/RulesJDF.cmake
CMakeModules/morse/find/RulesJDF.cmake
+9
-9
CMakeModules/morse/precision_generator/subs.py
CMakeModules/morse/precision_generator/subs.py
+39
-12
Examples/ChebyshevInterpolationMPIFMM.cpp
Examples/ChebyshevInterpolationMPIFMM.cpp
+2
-2
Examples/ChebyshevInterpolationMPIFMMSplit.cpp
Examples/ChebyshevInterpolationMPIFMMSplit.cpp
+3
-3
Examples/LagrangeInterpolationFMM.cpp
Examples/LagrangeInterpolationFMM.cpp
+184
-182
Examples/RotationMPIFMM.cpp
Examples/RotationMPIFMM.cpp
+4
-4
Src/Files/FGenerateDistribution.hpp
Src/Files/FGenerateDistribution.hpp
+28
-10
Src/Files/FMpiTreeBuilder.hpp
Src/Files/FMpiTreeBuilder.hpp
+3
-3
Src/Kernels/Uniform/FUnifInterpolator.hpp
Src/Kernels/Uniform/FUnifInterpolator.hpp
+1
-0
Src/Utils/FAbstractBalanceAlgorithm.hpp
Src/Utils/FAbstractBalanceAlgorithm.hpp
+0
-0
Src/Utils/FAlgorithmTimers.cpp
Src/Utils/FAlgorithmTimers.cpp
+11
-0
Src/Utils/FEqualize.hpp
Src/Utils/FEqualize.hpp
+0
-0
Src/Utils/FLeafBalance.hpp
Src/Utils/FLeafBalance.hpp
+0
-0
Src/Utils/FPartitionsMapping.hpp
Src/Utils/FPartitionsMapping.hpp
+0
-0
Tests/Kernels/DirectAlgorithm.cpp
Tests/Kernels/DirectAlgorithm.cpp
+0
-1
Tests/Kernels/testChebAlgorithmProc.cpp
Tests/Kernels/testChebAlgorithmProc.cpp
+1
-1
Tests/Kernels/testOmniPath.cpp
Tests/Kernels/testOmniPath.cpp
+6
-7
Tests/Kernels/testRotationAlgorithmProc.cpp
Tests/Kernels/testRotationAlgorithmProc.cpp
+1
-2
Tests/Kernels/testSphericalProcAlgorithm.cpp
Tests/Kernels/testSphericalProcAlgorithm.cpp
+4
-7
Tests/Kernels/testUnifAlgorithmProc.cpp
Tests/Kernels/testUnifAlgorithmProc.cpp
+2
-2
Tests/Utils/testFmmAlgorithmProc.cpp
Tests/Utils/testFmmAlgorithmProc.cpp
+1
-4
Tests/Utils/testFmmAlgorithmProcPeriodic.cpp
Tests/Utils/testFmmAlgorithmProcPeriodic.cpp
+1
-4
Tests/Utils/testFmmAlgorithmProcRandom.cpp
Tests/Utils/testFmmAlgorithmProcRandom.cpp
+1
-5
Tests/Utils/testFmmAlgorithmProcRotation.cpp
Tests/Utils/testFmmAlgorithmProcRotation.cpp
+1
-1
Tests/Utils/testOctreeRearrangeProc.cpp
Tests/Utils/testOctreeRearrangeProc.cpp
+3
-6
Tests/Utils/testPartitionsMapping.cpp
Tests/Utils/testPartitionsMapping.cpp
+2
-3
Tests/noDist/testMpiInsert.cpp
Tests/noDist/testMpiInsert.cpp
+1
-1
Tests/noDist/testParticlesDistrMpi.cpp
Tests/noDist/testParticlesDistrMpi.cpp
+1
-3
Tests/noDist/testSphericalBlasBlockProc.cpp
Tests/noDist/testSphericalBlasBlockProc.cpp
+4
-4
Tests/noDist/testSphericalBlasProc.cpp
Tests/noDist/testSphericalBlasProc.cpp
+4
-4
UTests/utestChebyshevMpi.cpp
UTests/utestChebyshevMpi.cpp
+5
-5
UTests/utestFmmAlgorithmProc.cpp
UTests/utestFmmAlgorithmProc.cpp
+1
-3
UTests/utestLagrangeMpi.cpp
UTests/utestLagrangeMpi.cpp
+5
-5
UTests/utestMpiTreeBuilder.cpp
UTests/utestMpiTreeBuilder.cpp
+1
-1
Utils/scripts/checkTaskAlgo.slurm
Utils/scripts/checkTaskAlgo.slurm
+8
-8
Utils/scripts/perfOpenMP.slurm
Utils/scripts/perfOpenMP.slurm
+8
-8
No files found.
Addons/CKernelApi/CMakeLists.txt
View file @
507e5629
...
...
@@ -35,7 +35,7 @@ if(SCALFMM_ADDON_CKERNELAPI)
)
# Install lib
install
(
TARGETS scalfmmckernelapi ARCHIVE DESTINATION lib
)
install
(
TARGETS scalfmmckernelapi ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
# Install header
SET
(
my_include_dirs
"Src"
)
...
...
Addons/CKernelApi/Src/CScalfmmApi.h
View file @
507e5629
...
...
@@ -146,8 +146,9 @@ typedef void (*Callback_free_cell)(void*);
* @brief Callback used to know the size of userData.
* @param level current level of current cell
* @param morton_index of the current cell
* @param userData : ptr to user's kernel
*/
typedef
FSize
(
*
Callback_get_cell_size
)(
int
level
,
long
long
morton_index
);
typedef
FSize
(
*
Callback_get_cell_size
)(
int
level
,
long
long
morton_index
,
void
*
userData
);
/**
* @brief Callback used to serialize userdata inside an array of size
...
...
Addons/CKernelApi/Src/FUserKernelDistrEngine.hpp
View file @
507e5629
...
...
@@ -11,17 +11,21 @@
#include "Utils/FMpi.hpp"
#include "FUserKernelEngine.hpp"
#include "
BalanceTree
/FLeafBalance.hpp"
#include "
Utils
/FLeafBalance.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "Containers/FVector.hpp"
#include "Core/FFmmAlgorithmThreadProc.hpp"
class
CoreCellDist
:
public
CoreCell
,
public
FAbstractSendable
{
int
level
;
void
*
userKernelData
;
public:
CoreCellDist
()
:
level
(
-
1
){
CoreCellDist
()
:
level
(
-
1
),
userKernelData
(
nullptr
){
}
void
init_UserKernelData
(
void
*
in
){
this
->
userKernelData
=
in
;
}
/**
...
...
@@ -32,7 +36,7 @@ public:
FBasicCell
::
save
<
BufferWriterClass
>
(
buffer
);
buffer
<<
level
;
if
(
user_cell_descriptor
.
user_get_size
){
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
user_cell_descriptor
.
user_copy_cell
(
CoreCell
::
getContainer
(),
sizeToSave
,(
void
*
)
temp
);
buffer
.
write
(
temp
,
sizeToSave
);
...
...
@@ -48,7 +52,7 @@ public:
FBasicCell
::
restore
<
BufferReaderClass
>
(
buffer
);
buffer
>>
level
;
if
(
user_cell_descriptor
.
user_restore_cell
){
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
buffer
.
fillArray
(
temp
,
sizeToSave
);
CoreCell
::
setContainer
(
user_cell_descriptor
.
user_restore_cell
(
level
,
temp
));
...
...
@@ -61,7 +65,7 @@ public:
*/
template
<
class
BufferWriterClass
>
void
serializeUp
(
BufferWriterClass
&
buffer
)
const
{
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
user_cell_descriptor
.
user_copy_cell
(
CoreCell
::
getContainer
(),
sizeToSave
,(
void
*
)
temp
);
buffer
.
write
(
temp
,
sizeToSave
);
...
...
@@ -69,7 +73,7 @@ public:
}
template
<
class
BufferWriterClass
>
void
serializeDown
(
BufferWriterClass
&
buffer
)
const
{
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
user_cell_descriptor
.
user_copy_cell
(
CoreCell
::
getContainer
(),
sizeToSave
,(
void
*
)
temp
);
buffer
.
write
(
temp
,
sizeToSave
);
...
...
@@ -77,7 +81,7 @@ public:
}
template
<
class
BufferReaderClass
>
void
deserializeUp
(
BufferReaderClass
&
buffer
)
const
{
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
buffer
.
fillArray
(
temp
,
sizeToSave
);
CoreCell
::
setContainer
(
user_cell_descriptor
.
user_restore_cell
(
level
,
temp
));
...
...
@@ -86,7 +90,7 @@ public:
}
template
<
class
BufferReaderClass
>
void
deserializeDown
(
BufferReaderClass
&
buffer
)
const
{
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
FSize
sizeToSave
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
()
,
userKernelData
);
char
*
temp
=
new
char
[
sizeToSave
];
buffer
.
fillArray
(
temp
,
sizeToSave
);
CoreCell
::
setContainer
(
user_cell_descriptor
.
user_restore_cell
(
level
,
temp
));
...
...
@@ -99,7 +103,8 @@ public:
*/
FSize
getSavedSize
()
const
{
FSize
toReturn
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
())
getMortonIndex
(),
userKernelData
)
+
FBasicCell
::
getSavedSize
()
//Size of storage needed for Basic Cell
+
sizeof
(
int
)
//Size of storage needed for this class
+
sizeof
(
nullptr
);
//Size of storage needed for the parent class
...
...
@@ -107,12 +112,14 @@ public:
}
FSize
getSavedSizeUp
()
const
{
FSize
toReturn
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
getMortonIndex
(),
userKernelData
);
return
toReturn
;
}
FSize
getSavedSizeDown
()
const
{
FSize
toReturn
=
user_cell_descriptor
.
user_get_size
(
level
,
getMortonIndex
());
getMortonIndex
(),
userKernelData
);
return
toReturn
;
}
};
...
...
@@ -451,6 +458,10 @@ public:
Parent
::
boxWidthAtLeafLevel
=
BoxWidth
/
(
2
<<
TreeHeight
);
printf
(
"Tree Height : %d
\n
"
,
TreeHeight
);
octreeDist
=
new
OctreeClass
(
TreeHeight
,
FMath
::
Min
(
3
,
TreeHeight
-
1
),
BoxWidth
,
FPoint
<
FReal
>
(
BoxCenter
));
//There : for each cell, set a ptr to UserkernelData
octreeDist
->
forEachCell
([
&
](
CoreCellDist
*
currCell
){
currCell
->
init_UserKernelData
(
Parent
::
getKernelPtr
()
->
getUserKernelDatas
());
});
}
void
user_kernel_config
(
Scalfmm_Kernel_Descriptor
userKernel
,
void
*
userDatas
){
...
...
Addons/CKernelApi/Src/FUserKernelEngine.hpp
View file @
507e5629
...
...
@@ -324,9 +324,6 @@ protected:
OctreeClass
*
getTree
()
const
{
return
octree
;
}
CoreKernelClass
*
getKernelPtr
()
const
{
return
kernel
;
}
public:
...
...
@@ -353,6 +350,10 @@ public:
}
}
CoreKernelClass
*
getKernelPtr
()
{
return
kernel
;
}
virtual
void
user_kernel_config
(
Scalfmm_Kernel_Descriptor
userKernel
,
void
*
userDatas
){
if
(
!
kernel
){
kernel
=
new
CoreKernelClass
(
userKernel
,
userDatas
);
...
...
Addons/CKernelApi/Tests/testMpiUserKernel.c
View file @
507e5629
...
...
@@ -105,7 +105,7 @@ void cheb_resetCell(int level, long long morton_index, int* tree_position,
* @brief Following functions are defined in order to serialize the
* cells
*/
FSize
cheb_get_size
(
int
level
,
long
long
morton_index
){
FSize
cheb_get_size
(
int
level
,
long
long
morton_index
,
void
*
userData
){
return
ChebCell_getSize
(
level
,
morton_index
);
}
...
...
Addons/FmmApi/CMakeLists.txt
View file @
507e5629
...
...
@@ -17,69 +17,68 @@ OPTION( SCALFMM_ADDON_FMMAPI "Set to ON to build ScaFMM FMM API interface" OFF )
# if ask to build addon
if
(
SCALFMM_ADDON_FMMAPI
)
# first build lib scalfmmapi
set
(
LIBRARY_OUTPUT_PATH ../lib/
${
CMAKE_BUILD_TYPE
}
)
# first build lib scalfmmapi
set
(
LIBRARY_OUTPUT_PATH ../lib/
${
CMAKE_BUILD_TYPE
}
)
# Searching all cpp file
file
(
GLOB_RECURSE source_lib_files Src/*.cpp
)
# Searching all cpp file
file
(
GLOB_RECURSE source_lib_files Src/*.cpp
)
# Adding cpp files to project
add_library
(
scalfmmapi
${
source_lib_files
}
)
# Adding cpp files to project
add_library
(
scalfmmapi
${
source_lib_files
}
)
# Add blas library (even if it is set to off)
target_link_libraries
(
scalfmmapi scalfmm
)
# Add blas library (even if it is set to off)
target_link_libraries
(
scalfmmapi scalfmm
)
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Src
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Src
${
SCALFMM_INCLUDES
}
)
# Install lib
install
(
TARGETS scalfmmapi ARCHIVE DESTINATION lib
)
# Install header
SET
(
my_include_dirs
"Src"
)
file
(
GLOB hpp_in_dir Src/*.hpp
)
INSTALL
(
FILES
${
hpp_in_dir
}
DESTINATION include/ScalFmm/FmmApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.cpp
)
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
)
# Then build test files
foreach
(
exec
${
source_tests_files
}
)
get_filename_component
(
execname
${
exec
}
NAME_WE
)
set
(
compile_exec
"TRUE"
)
foreach
(
fuse_key
${
FUSE_LIST
}
)
file
(
STRINGS
"
${
exec
}
"
lines_fuse REGEX
"@FUSE_
${
fuse_key
}
"
)
if
(
lines_fuse
)
if
(
NOT SCALFMM_USE_
${
fuse_key
}
)
MESSAGE
(
STATUS
"This needs
${
fuse_key
}
=
${
exec
}
"
)
set
(
compile_exec
"FALSE"
)
endif
()
endif
()
endforeach
()
# Dependency are OK
if
(
compile_exec
)
add_executable
(
${
execname
}
${
exec
}
)
# link to scalfmm and scalfmmapi
target_link_libraries
(
${
execname
}
${
scalfmm_lib
}
scalfmmapi
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
${
SCALFMM_LIBRARIES
}
)
endif
()
endforeach
(
exec
)
endif
()
# Install lib
install
(
TARGETS scalfmmapi ARCHIVE DESTINATION lib LIBRARY DESTINATION lib
)
# Install header
SET
(
my_include_dirs
"Src"
)
file
(
GLOB hpp_in_dir Src/*.hpp
)
INSTALL
(
FILES
${
hpp_in_dir
}
DESTINATION include/ScalFmm/FmmApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.cpp
)
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
)
# Then build test files
foreach
(
exec
${
source_tests_files
}
)
get_filename_component
(
execname
${
exec
}
NAME_WE
)
set
(
compile_exec
"TRUE"
)
foreach
(
fuse_key
${
FUSE_LIST
}
)
file
(
STRINGS
"
${
exec
}
"
lines_fuse REGEX
"@FUSE_
${
fuse_key
}
"
)
if
(
lines_fuse
)
if
(
NOT SCALFMM_USE_
${
fuse_key
}
)
MESSAGE
(
STATUS
"This needs
${
fuse_key
}
=
${
exec
}
"
)
set
(
compile_exec
"FALSE"
)
endif
()
endif
()
endforeach
()
# Dependency are OK
if
(
compile_exec
)
add_executable
(
${
execname
}
${
exec
}
)
# link to scalfmm and scalfmmapi
target_link_libraries
(
${
execname
}
${
scalfmm_lib
}
scalfmmapi
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
${
SCALFMM_LIBRARIES
}
)
endif
()
endforeach
(
exec
)
endif
()
CMakeLists.txt
View file @
507e5629
...
...
@@ -171,7 +171,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set
(
SSE_FLAGS
"-axSSE4.2 -march=native"
)
endif
(
APPLE
)
#-Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wall -Wnosign-conversion ")
else
()
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"XL"
)
set
(
SCALFMM_CXX_FLAGS
"
${
SCALFMM_CXX_FLAGS
}
-mcpu=power8 -mtune=power8"
)
else
()
#if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# NOT INTEL
if
(
NOT SCALFMM_USE_MPI
)
include
(
CheckCCompilerFlag
)
...
...
CMakeModules/getCpuInfos.cpp
View file @
507e5629
...
...
@@ -34,6 +34,8 @@ enum RegistersNum {
// we would like to have the same name for not windows
#define cpuid __cpuid
#elif _ARCH_PPC
#error("PPC")
#else
// Else we have to ask the CPU directly by executin cpuid.
...
...
@@ -75,7 +77,7 @@ void cpuid(int CPUInfo[4],int InfoType){
#endif
#ifndef _ARCH_PPC
bool
CPUInfoGetEAX
(
const
int
CPUInfo
[
4
],
const
int
position
){
return
(
CPUInfo
[
EaxRegister
]
&
((
int
)
1
<<
position
))
!=
0
;
}
...
...
@@ -309,6 +311,9 @@ std::list<CpuProperty> getProperties(){
return
properties
;
}
#else
// POWER (IBM)
#endif
///////////////////////////////////////////////////////////////////////////
...
...
CMakeModules/morse/AuxilaryFlags.cmake
View file @
507e5629
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -20,20 +20,72 @@
#
# @version 0.9.0
# @author Xavier Lacoste
# @author Florent Pruvost
# @date 30-01-2015
#
# Define auxilary variables:
# Update CMAKE auxilary variables:
# - CMAKE_C_FLAGS: C compiler flags
# - CMAKE_CXX_FLAGS: CXX compiler flags
# - CMAKE_Fortran_FLAGS: Fortran compiler flags
# - CMAKE_Fortran_PREPROCESS_FLAGS : force C preprocessor.
# - CMAKE_Fortran_FREEFORM_FLAG : Force free format.
# - CMAKE_Fortran
###
if
(
MORSE_ENABLE_WARNING
)
IF
(
CMAKE_Fortran_COMPILER_ID MATCHES GNU
)
if
(
CMAKE_C_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall"
)
elseif
(
CMAKE_C_COMPILER_ID MATCHES Intel
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-w3 -diag-disable:remark"
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES Intel
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-w3 -diag-disable:remark"
)
endif
()
if
(
CMAKE_Fortran_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-Wall"
)
elseif
(
CMAKE_Fortran_COMPILER_ID MATCHES Intel
)
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-warn all -diag-disable:remark"
)
endif
()
endif
(
MORSE_ENABLE_WARNING
)
if
(
MORSE_ENABLE_COVERAGE
)
if
(
CMAKE_C_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
--coverage"
)
else
()
message
(
FATAL_ERROR
"Code coverage is only available with the GNU C (gcc)"
"
\n
compiler, please turn MORSE_ENABLE_COVERAGE OFF
\n
."
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
--coverage"
)
else
()
message
(
FATAL_ERROR
"Code coverage is only available with the GNU CXX"
"
\n
(g++) compiler, please turn MORSE_ENABLE_COVERAGE OFF
\n
."
)
endif
()
if
(
CMAKE_Fortran_COMPILER_ID MATCHES GNU
)
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
--coverage"
)
else
()
message
(
FATAL_ERROR
"Code coverage is only available with the GNU"
"
\n
Fortran (gfortran) compiler, please turn MORSE_ENABLE_COVERAGE"
"
\n
OFF
\n
."
)
endif
()
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
--coverage"
)
endif
(
MORSE_ENABLE_COVERAGE
)
if
(
CMAKE_Fortran_COMPILER_ID MATCHES GNU
)
list
(
APPEND CMAKE_Fortran_PREPROCESS_FLAGS
"-cpp"
)
list
(
APPEND CMAKE_Fortran_FREEFORM_FLAG
"-ffree-form"
)
ELSEIF
(
CMAKE_Fortran_COMPILER_ID MATCHES Intel
)
elseif
(
CMAKE_Fortran_COMPILER_ID MATCHES Intel
)
list
(
APPEND CMAKE_Fortran_PREPROCESS_FLAG
"-fpp"
)
list
(
APPEND CMAKE_Fortran_FREEFORM_FLAG
""
)
ENDIF
()
endif
()
CMakeModules/morse/FindHeadersAndLibs.cmake
View file @
507e5629
...
...
@@ -37,60 +37,60 @@ include(PrintFindStatus)
function
(
FindHeader _libname _header_to_find
)
# save _libname upper and lower case
string
(
TOUPPER
${
_libname
}
LIBNAME
)
string
(
TOLOWER
${
_libname
}
libname
)
# save _libname upper and lower case
string
(
TOUPPER
${
_libname
}
LIBNAME
)
string
(
TOLOWER
${
_libname
}
libname
)
# Looking for include
# -------------------
# Looking for include
# -------------------
# Add system include paths to search include
# ------------------------------------------
unset
(
_inc_env
)
if
(
WIN32
)
string
(
REPLACE
":"
";"
_inc_env
"$ENV{INCLUDE}"
)
else
()
string
(
REPLACE
":"
";"
_path_env
"$ENV{INCLUDE}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{C_INCLUDE_PATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{CPATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{INCLUDE_PATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
endif
()
list
(
APPEND _inc_env
"
${
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
APPEND _inc_env
"
${
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
REMOVE_DUPLICATES _inc_env
)
# Add system include paths to search include
# ------------------------------------------
unset
(
_inc_env
)
if
(
WIN32
)
string
(
REPLACE
":"
";"
_inc_env
"$ENV{INCLUDE}"
)
else
()
string
(
REPLACE
":"
";"
_path_env
"$ENV{INCLUDE}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{C_INCLUDE_PATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{CPATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
string
(
REPLACE
":"
";"
_path_env
"$ENV{INCLUDE_PATH}"
)
list
(
APPEND _inc_env
"
${
_path_env
}
"
)
endif
()
list
(
APPEND _inc_env
"
${
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
APPEND _inc_env
"
${
CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
}
"
)
list
(
REMOVE_DUPLICATES _inc_env
)
# Try to find the _header_to_find in the given paths
# --------------------------------------------------
# call cmake macro to find the header path
if
(
${
LIBNAME
}
_INCDIR
)
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${${
LIBNAME
}
_INCDIR
}
)
elseif
(
${
LIBNAME
}
_DIR
)
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${${
LIBNAME
}
_DIR
}
PATH_SUFFIXES include
)
else
()
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${
_inc_env
}
)
endif
()
mark_as_advanced
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
)
# Try to find the _header_to_find in the given paths
# --------------------------------------------------
# call cmake macro to find the header path
if
(
${
LIBNAME
}
_INCDIR
)
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${${
LIBNAME
}
_INCDIR
}
)
elseif
(
${
LIBNAME
}
_DIR
)
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${${
LIBNAME
}
_DIR
}
PATH_SUFFIXES include
)
else
()
set
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
"
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS-NOTFOUND"
)
find_path
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
NAMES
${
_header_to_find
}
HINTS
${
_inc_env
}
)
endif
()
mark_as_advanced
(
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
)
# Print status if not found
# -------------------------
if
(
NOT
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
)
Print_Find_Header_Status
(
${
libname
}
${
_header_to_find
}
)
endif
()
# Print status if not found
# -------------------------
if
(
NOT
${
LIBNAME
}
_
${
_header_to_find
}
_DIRS
)
Print_Find_Header_Status
(
${
libname
}
${
_header_to_find
}
)
endif
()
endfunction
(
FindHeader
)
...
...
CMakeModules/morse/MorseInit.cmake
View file @
507e5629
...
...
@@ -3,7 +3,7 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-201
4
Inria. All rights reserved.
# @copyright (c) 2012-201
6
Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
...
...
@@ -31,7 +31,7 @@
include
(
CheckFunctionExists
)
# To colorize messages
include
(
ColorizeMessage
)
#
include(ColorizeMessage)
# To find headers and libs
include
(
FindHeadersAndLibs
)
...
...
@@ -49,9 +49,11 @@ include(Ressources)
# Add the path where we handle our FindFOO.cmake to seek for liraries
list
(
APPEND CMAKE_MODULE_PATH
${
MORSE_CMAKE_MODULE_PATH
}
/find
)
option
(
MORSE_VERBOSE_FIND_PACKAGE
"Add additional messages concerning no found packages"
OFF
)
#message("-- ${BoldGreen}MORSE_VERBOSE_FIND_PACKAGE is set to OFF, turn it ON to get"
# "information about packages not found${ColourReset}")
option
(
MORSE_ENABLE_WARNING
"Enable warning messages"
OFF
)
option
(
MORSE_ENABLE_COVERAGE
"Enable flags for coverage test"
OFF
)
#option(MORSE_VERBOSE_FIND_PACKAGE "Add additional messages concerning packages not found" OFF)
#message(STATUS "MORSE_VERBOSE_FIND_PACKAGE is set to OFF, turn it ON to get"
# " information about packages not found")
##
## @end file MorseInit.cmake
...
...
CMakeModules/morse/ParseArguments.cmake
View file @
507e5629
...
...
@@ -16,7 +16,7 @@
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
# Univ. of Colorado Denver.
#
# @version 0.9.0
# @author Cedric Castagnede
...
...
@@ -27,43 +27,43 @@
###
MACRO
(
PARSE_ARGUMENTS prefix arg_names option_names
)
set
(
DEFAULT_ARGS
)
foreach
(
arg_name
${
arg_names
}
)
set
(
${
prefix
}
_
${
arg_name
}
)
endforeach
(
arg_name
)
foreach
(
option
${
option_names
}
)
set
(
${
prefix
}
_
${
option
}
FALSE
)