Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
332026ab
Commit
332026ab
authored
Apr 04, 2017
by
COULAUD Olivier
Browse files
Bug with Chebyshev Kernels seems to be fixed with Intel compiler - (not sure to underdtand why)
parent
a113ea91
Changes
6
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
332026ab
...
...
@@ -139,7 +139,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
message
(
STATUS
"CXX
${
CMAKE_CXX_COMPILER_ID
}
"
)
# Set scalfmm to default libraries
set
(
SCALFMM_LIBRARIES
""
)
set
(
SCALFMM_CXX_FLAGS
"-std=c++1
1
-fpic -Wall"
)
set
(
SCALFMM_CXX_FLAGS
"-std=c++1
4
-fpic -Wall"
)
#
#
# Test if openmp is here
...
...
@@ -173,7 +173,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
ENDIF
(
CPUOPTION_SSE42
)
else
(
APPLE
)
set
(
AVX_FLAGS
"-march=native -axCORE-AVX2,CORE-AVX-I,AVX"
)
#-mavx
set
(
AVX2_FLAGS
"-march=native -axCORE-AVX2,CORE-AVX-I"
)
#-march=core-avx2
set
(
AVX2_FLAGS
"-march=native -axCORE-AVX2,CORE-AVX-I
,AVX
"
)
#-march=core-avx2
set
(
SSE_FLAGS
"-axSSE4.2 -march=native"
)
endif
(
APPLE
)
#-Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wall -Wnosign-conversion ")
...
...
@@ -800,7 +800,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
#
# Generate ScalFmmConfig.h
#
set
(
SCALFMM_COMPILE_FLAGS
"
${
SCALFMM_CXX_FLAGS
}
${
CMAKE_CXX_FLAGS_TYPE
}
${
CMAKE_CXX_FLAGS
}
"
)
set
(
SCALFMM_COMPILE_FLAGS
"
${
SCALFMM_CXX_FLAGS
}
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
SCALFMM_COMPILE_FLAGS
}
"
)
# We need the libraries without spaces (inside the config file)
set
(
SCALFMM_COMPILE_LIBS
""
)
...
...
@@ -954,6 +954,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
message
(
STATUS
"SCALFMM_USE_FFT =
${
SCALFMM_USE_FFT
}
"
)
message
(
STATUS
"SCALFMM_USE_MKL =
${
SCALFMM_USE_MKL
}
"
)
#
message
(
STATUS
"CMAKE_CXX_FLAGS_TYPE =
${
CMAKE_CXX_FLAGS_TYPE
}
"
)
message
(
STATUS
"CMAKE_CXX_FLAGS =
${
CMAKE_CXX_FLAGS
}
"
)
message
(
STATUS
"SCALFMM_CXX_FLAGS =
${
SCALFMM_CXX_FLAGS
}
"
)
message
(
STATUS
"SCALFMM_LIBRARIES =
${
SCALFMM_LIBRARIES
}
"
)
...
...
Examples/CMakeLists.txt
View file @
332026ab
...
...
@@ -6,7 +6,7 @@ endif(insource)
project
(
EXAMPLES_SCALFMM CXX
)
set
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_BUILD_TYPE
}
)
ADD_DEFINITIONS
(
${
S
ca
LFMM_CXX_FLAGS
}
)
#
ADD_DEFINITIONS( ${S
CA
LFMM_CXX_FLAGS})
# Find all code files
file
(
GLOB_RECURSE
...
...
Examples/ChebyshevInterpolationFMM.cpp
View file @
332026ab
...
...
@@ -72,7 +72,7 @@ int main(int argc, char* argv[])
FParameterDefinitions
::
NbThreads
);
const
std
::
string
defaultFile
(
/*
SCALFMMDataPath+
*/
"Data/
unitCubeXYZQ100.bfma"
);
const
std
::
string
defaultFile
(
SCALFMMDataPath
+
"
unitCubeXYZQ100.bfma"
);
const
std
::
string
filename
=
FParameters
::
getStr
(
argc
,
argv
,
FParameterDefinitions
::
InputFile
.
options
,
defaultFile
.
c_str
());
const
unsigned
int
TreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
OctreeHeight
.
options
,
5
);
const
unsigned
int
SubTreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
FParameterDefinitions
::
OctreeSubHeight
.
options
,
2
);
...
...
@@ -111,7 +111,7 @@ int main(int argc, char* argv[])
typedef
FChebCell
<
FReal
,
ORDER
>
CellClass
;
typedef
FOctree
<
FReal
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
//
typedef
FInterpMatrixKernelR
<
FReal
>
MatrixKernelClass
;
typedef
FInterpMatrixKernelR
<
FReal
>
MatrixKernelClass
;
const
MatrixKernelClass
MatrixKernel
;
typedef
FChebSymKernel
<
FReal
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
//
...
...
Src/Kernels/Chebyshev/FChebCmpKernel.hpp
View file @
332026ab
...
...
@@ -17,8 +17,8 @@
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#ifndef FCHEBKERNEL_HPP
#define FCHEBKERNEL_HPP
#ifndef FCHEB
CMP
KERNEL_HPP
#define FCHEB
CMP
KERNEL_HPP
#include "../../Utils/FGlobal.hpp"
...
...
Src/Kernels/Chebyshev/FChebCmpM2LHandler.hpp
View file @
332026ab
...
...
@@ -17,8 +17,8 @@
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#ifndef FCHEBM2LHANDLER_HPP
#define FCHEBM2LHANDLER_HPP
#ifndef FCHEB
CMP
M2LHANDLER_HPP
#define FCHEB
CMP
M2LHANDLER_HPP
#include <numeric>
#include <stdexcept>
...
...
UTests/utestChebyshev.cpp
View file @
332026ab
...
...
@@ -29,6 +29,7 @@
#include "Kernels/Chebyshev/FChebCell.hpp"
#include "Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "Kernels/Chebyshev/FChebKernel.hpp"
#include "Kernels/Chebyshev/FChebCmpKernel.hpp"
#include "Kernels/Chebyshev/FChebSymKernel.hpp"
#include "Kernels/P2P/FP2PParticleContainerIndexed.hpp"
...
...
@@ -63,6 +64,23 @@ class TestChebyshevDirect : public FUKernelTester<TestChebyshevDirect> {
return
std
::
unique_ptr
<
KernelClass
>
(
new
KernelClass
(
NbLevels
,
boxWidth
,
centerOfBox
,
MatrixKernel
));
});
}
/** TestChebKernel */
void
TestChebKernelCmp
(){
typedef
double
FReal
;
const
unsigned
int
ORDER
=
6
;
typedef
FP2PParticleContainerIndexed
<
FReal
>
ContainerClass
;
typedef
FSimpleLeaf
<
FReal
,
ContainerClass
>
LeafClass
;
typedef
FInterpMatrixKernelR
<
FReal
>
MatrixKernelClass
;
typedef
FChebCell
<
FReal
,
ORDER
>
CellClass
;
typedef
FOctree
<
FReal
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FChebCmpKernel
<
FReal
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
typedef
FFmmAlgorithm
<
OctreeClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
// run test
RunTest
<
FReal
,
CellClass
,
ContainerClass
,
KernelClass
,
MatrixKernelClass
,
LeafClass
,
OctreeClass
,
FmmClass
>
(
[
&
](
int
NbLevels
,
FReal
boxWidth
,
FPoint
<
FReal
>
centerOfBox
,
const
MatrixKernelClass
*
const
MatrixKernel
){
return
std
::
unique_ptr
<
KernelClass
>
(
new
KernelClass
(
NbLevels
,
boxWidth
,
centerOfBox
,
MatrixKernel
));
});
}
/** TestChebSymKernel */
void
TestChebSymKernel
(){
...
...
@@ -91,6 +109,7 @@ class TestChebyshevDirect : public FUKernelTester<TestChebyshevDirect> {
/** set test */
void
SetTests
(){
AddTest
(
&
TestChebyshevDirect
::
TestChebKernel
,
"Test Chebyshev Kernel with one big SVD"
);
AddTest
(
&
TestChebyshevDirect
::
TestChebKernelCmp
,
"Test Chebyshev Kernel with 16 small SVDs"
);
AddTest
(
&
TestChebyshevDirect
::
TestChebSymKernel
,
"Test Chebyshev Kernel with 16 small SVDs and symmetries"
);
}
};
...
...
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