Commit 43dbd9f7 authored by berenger-bramas's avatar berenger-bramas
Browse files

Changed the Multi threaded version to have only one openmp parallel section in P2P.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@87 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 897d4e11
...@@ -11,7 +11,7 @@ OPTION( SCALFMM_USE_CBLAS "Set to ON to build ScaFMM with BLAS" ON ) ...@@ -11,7 +11,7 @@ OPTION( SCALFMM_USE_CBLAS "Set to ON to build ScaFMM with BLAS" ON )
OPTION( SCALFMM_USE_MPI "Set to ON to build ScaFMM with MPI" ON ) OPTION( SCALFMM_USE_MPI "Set to ON to build ScaFMM with MPI" ON )
OPTION( SCALFMM_BUILD_TESTS "Set to ON to build fonctionnalities Tests" ON ) OPTION( SCALFMM_BUILD_TESTS "Set to ON to build fonctionnalities Tests" ON )
OPTION( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" ON ) OPTION( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" ON )
OPTION( SCALFMM_BUILD_DEBUG "Set to ON to build in Debug" OFF ) OPTION( SCALFMM_BUILD_DEBUG "Set to ON to build in Debug" ON )
# MPI option has to be set before project # MPI option has to be set before project
if( SCALFMM_USE_MPI ) if( SCALFMM_USE_MPI )
......
...@@ -325,13 +325,14 @@ public: ...@@ -325,13 +325,14 @@ public:
} }
FDEBUG(computationCounter.tic()); FDEBUG(computationCounter.tic());
for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){ #pragma omp parallel
const int leafAtThisShape = this->shapeLeaf[idxShape]; {
#pragma omp parallel Kernel * const myThreadkernels = kernels[omp_get_thread_num()];
{ // There is a maximum of 26 neighbors
Kernel * const myThreadkernels = kernels[omp_get_thread_num()]; FList<ParticleClass*>* neighbors[26];
// There is a maximum of 26 neighbors
FList<ParticleClass*>* neighbors[26]; for(int idxShape = 0 ; idxShape < SizeShape ; ++idxShape){
const int leafAtThisShape = this->shapeLeaf[idxShape];
#pragma omp for #pragma omp for
for(int idxLeafs = 0 ; idxLeafs < leafAtThisShape ; ++idxLeafs){ for(int idxLeafs = 0 ; idxLeafs < leafAtThisShape ; ++idxLeafs){
......
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