Commit 464daaf8 authored by BRAMAS Berenger's avatar BRAMAS Berenger
parents 74dada66 f2c01d27
......@@ -5,6 +5,18 @@ STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../")
endif(insource)
#
# MPI option has to be set before project, cannot be changed in the cache!
if( ScalFMM_USE_MPI )
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(mpicc "MPI C Compiler")
CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")
set(ScalFMM_USE_MPI ON CACHE BOOL "ScalFmm use MPI")
else()
MESSAGE(STATUS "Remove CMake cache and run cmake .. -DScalFMM_USE_MPI=ON to enable MPI" )
endif(ScalFMM_USE_MPI)
#
# Project Infos
project(ScalFMM)
......@@ -23,18 +35,9 @@ SET(ScalFMM_VERSION "${ScalFMM_MAJOR_VERSION}.${ScalFMM_MINOR_VERSION}.${ScalFM
# -----------------------
ENABLE_LANGUAGE(CXX )
MESSAGE(STATUS " CXX ${CMAKE_CXX_COMPILER_ID}" )
#
# MPI option has to be set before project, cannot be changed in the cache!
if( ScalFMM_USE_MPI )
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(mpicc "MPI C Compiler")
CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")
else()
MESSAGE(STATUS "Remove CMake cache and run cmake .. -DSCALFMM_USE_MPI=ON to enable MPI" )
endif(ScalFMM_USE_MPI)
#
# Options
OPTION( ScalFMM_USE_MPI "Set to ON to build ScaFMM with MPI" OFF )
OPTION( ScalFMM_USE_BLAS "Set to ON to build ScaFMM with BLAS" OFF )
OPTION( ScalFMM_USE_TRACE "Set to ON to print trace or use itac trace" OFF )
OPTION( ScalFMM_BUILD_TESTS "Set to ON to build fonctionnalities Tests" OFF )
......
......@@ -201,7 +201,7 @@ public:
/** Change the group size */
void groupReduce(const int from , const int to){
int procsIdArray[to - from + 1];
int * procsIdArray = new int [to - from + 1];
for(int idxProc = from ;idxProc <= to ; ++idxProc){
procsIdArray[idxProc - from] = idxProc;
}
......@@ -216,6 +216,7 @@ public:
MPI_Group_free(&previousGroup);
reset();
delete procsIdArray ;
}
};
......
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