Commit b41fbaf5 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files
parents ebd25174 88ba6f4a
...@@ -45,7 +45,7 @@ if( SCALFMM_BUILD_DEBUG ) ...@@ -45,7 +45,7 @@ if( SCALFMM_BUILD_DEBUG )
else() else()
SET(CMAKE_BUILD_TYPE Release) SET(CMAKE_BUILD_TYPE Release)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") IF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ADD_DEFINITIONS(-ip) # ADD_DEFINITIONS(-ip)
ENDIF() ENDIF()
endif() endif()
...@@ -59,6 +59,8 @@ if( SCALFMM_USE_STARPU ) ...@@ -59,6 +59,8 @@ if( SCALFMM_USE_STARPU )
# Adding the project sources dir as an include dir # Adding the project sources dir as an include dir
include_directories(${STARPU_INCLUDE_DIRS}) include_directories(${STARPU_INCLUDE_DIRS})
link_directories(${STARPU_LIBRARY_DIRS}) link_directories(${STARPU_LIBRARY_DIRS})
ADD_DEFINITIONS(-DFUSE_STARPU)
endif() endif()
# Attach source code to exec # Attach source code to exec
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#ifdef FUSE_STARPU
#include <starpu.h> #include <starpu.h>
#endif
#include "../../Src/Kernels/Chebyshev/FChebParticle.hpp" #include "../../Src/Kernels/Chebyshev/FChebParticle.hpp"
#include "../../Src/Kernels/Chebyshev/FChebLeaf.hpp" #include "../../Src/Kernels/Chebyshev/FChebLeaf.hpp"
#include "../../Src/Kernels/Chebyshev/FChebCell.hpp" #include "../../Src/Kernels/Chebyshev/FChebCell.hpp"
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
#include "../../Src/Core/FFmmAlgorithm.hpp" #include "../../Src/Core/FFmmAlgorithm.hpp"
#include "../../Src/Core/FFmmAlgorithmThread.hpp" #include "../../Src/Core/FFmmAlgorithmThread.hpp"
#ifdef FUSE_STARPU
#include "../../Src/Core/FFmmAlgorithmStarpu.hpp" #include "../../Src/Core/FFmmAlgorithmStarpu.hpp"
#endif
/** This program show an example of use of /** This program show an example of use of
* the fmm basic algo * the fmm basic algo
...@@ -101,6 +102,8 @@ int main(int argc, char* argv[]) ...@@ -101,6 +102,8 @@ int main(int argc, char* argv[])
// init timer // init timer
FTic time; FTic time;
#ifndef FUSE_STARPU
// typedefs // typedefs
typedef FChebParticle ParticleClass; typedef FChebParticle ParticleClass;
typedef FVector<FChebParticle> ContainerClass; typedef FVector<FChebParticle> ContainerClass;
...@@ -108,11 +111,11 @@ int main(int argc, char* argv[]) ...@@ -108,11 +111,11 @@ int main(int argc, char* argv[])
typedef FChebMatrixKernelR MatrixKernelClass; typedef FChebMatrixKernelR MatrixKernelClass;
typedef FChebCell<ORDER> CellClass; typedef FChebCell<ORDER> CellClass;
typedef FOctree<ParticleClass,CellClass,ContainerClass,LeafClass> OctreeClass; typedef FOctree<ParticleClass,CellClass,ContainerClass,LeafClass> OctreeClass;
typedef FChebKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass; //typedef FChebKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
//typedef FChebSymKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass; typedef FChebSymKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef FFmmAlgorithm<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass; typedef FFmmAlgorithm<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
//typedef FFmmAlgorithmThread<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass; //typedef FFmmAlgorithmThread<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
#else
// // typedefs for STARPU // // typedefs for STARPU
// typedef FChebParticle ParticleClass; // typedef FChebParticle ParticleClass;
// typedef StarVector<ParticleClass> ContainerClass; // typedef StarVector<ParticleClass> ContainerClass;
...@@ -125,7 +128,7 @@ int main(int argc, char* argv[]) ...@@ -125,7 +128,7 @@ int main(int argc, char* argv[])
// //typedef FChebKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass; // //typedef FChebKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
// typedef FChebSymKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass; // typedef FChebSymKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
// typedef FFmmAlgorithmStarpu<OctreeClass,ParticleClass,CellClass,RealCellClass,ContainerClass,KernelClass,LeafClass> FmmClass; // typedef FFmmAlgorithmStarpu<OctreeClass,ParticleClass,CellClass,RealCellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
#endif
// What we do ////////////////////////////////////////////////////// // What we do //////////////////////////////////////////////////////
std::cout << ">> Testing the Chebyshev interpolation base FMM algorithm.\n"; std::cout << ">> Testing the Chebyshev interpolation base FMM algorithm.\n";
...@@ -182,7 +185,7 @@ int main(int argc, char* argv[]) ...@@ -182,7 +185,7 @@ int main(int argc, char* argv[])
ContainerClass::ConstBasicIterator iSource(*Sources); ContainerClass::ConstBasicIterator iSource(*Sources);
while(iSource.hasNotFinished()) { while(iSource.hasNotFinished()) {
if (&iTarget.data() != &iSource.data()) { if (&iTarget.data() != &iSource.data()) {
const FReal one_over_r = MatrixKernel.evaluate(iTarget.data().getPosition(), const FReal one_over_r = MatrixKernel.evaluate(iTarget.data().getPosition(),
iSource.data().getPosition()); iSource.data().getPosition());
const FReal ws = iSource.data().getPhysicalValue(); const FReal ws = iSource.data().getPhysicalValue();
// potential // potential
......
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