Commit 332026ab authored by COULAUD Olivier's avatar COULAUD Olivier

Bug with Chebyshev Kernels seems to be fixed with Intel compiler - (not sure to underdtand why)

parent a113ea91
......@@ -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++11 -fpic -Wall")
set(SCALFMM_CXX_FLAGS "-std=c++14 -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}")
......
......@@ -6,7 +6,7 @@ endif(insource)
project(EXAMPLES_SCALFMM CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
ADD_DEFINITIONS( ${ScaLFMM_CXX_FLAGS})
#ADD_DEFINITIONS( ${SCALFMM_CXX_FLAGS})
# Find all code files
file(
GLOB_RECURSE
......
......@@ -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;
//
......
......@@ -17,8 +17,8 @@
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#ifndef FCHEBKERNEL_HPP
#define FCHEBKERNEL_HPP
#ifndef FCHEBCMPKERNEL_HPP
#define FCHEBCMPKERNEL_HPP
#include "../../Utils/FGlobal.hpp"
......
......@@ -17,8 +17,8 @@
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
#ifndef FCHEBM2LHANDLER_HPP
#define FCHEBM2LHANDLER_HPP
#ifndef FCHEBCMPM2LHANDLER_HPP
#define FCHEBCMPM2LHANDLER_HPP
#include <numeric>
#include <stdexcept>
......
......@@ -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");
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment