Commit d97868b2 authored by Quentin Khan's avatar Quentin Khan

Merge branch 'master' into 'adaptive'

Conflicts:
	CMakeLists.txt
	Examples/LagrangeInterpolationFMM.cpp
	Src/Components/FBasicParticleContainer.hpp
	Src/Containers/FMpiBufferReader.hpp
	Src/Containers/FMpiBufferWriter.hpp
	Src/Files/FMpiFmaGenericLoader.hpp
	Src/Kernels/Chebyshev/FChebCell.hpp
	Src/Kernels/Chebyshev/FChebKernel.hpp
	Src/Kernels/Chebyshev/FChebM2LHandler.hpp
	Src/Kernels/Chebyshev/FChebSymKernel.hpp
	Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp
	Src/Kernels/Chebyshev/FChebTensorialKernel.hpp
	Src/Kernels/Spherical/FSphericalRotationKernel.hpp
	Tests/GroupTree/testBlockedUniform.cpp
	UTests/utestLagrange.cpp
	UTests/utestMpiTreeBuilder.cpp
parents 97361262 6fa88aa4
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
//
// See LICENCE file at project root
#ifndef CKERNELAPI_H
#define CKERNELAPI_H
......@@ -891,9 +878,12 @@ void scalfmm_generic_partition(scalfmm_handle handle, FSize nbThings, size_t siz
/**
* @brief This fct will call delete on its arg, in order to free the
* memory allocated inside scalfmm, but given back to the user.
* memory allocated inside scalfmm, but given back to the user. Both
* the args are tested, so user can call delete(NULL,array);
* @param array : array of double to be deleted
* @param arrayOfFSize : array of FSize to be deleted
*/
void scalfmm_call_delete(void * array);
void scalfmm_call_delete(double * array, FSize * arrayOfFSize);
#endif //MPI_VERSION
......
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// See LICENCE file at project root
/**
* @file This file contains a class that inherits from FScalFMMEngine,
......
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// See LICENCE file at project root
/**
* @file This file contain a class, gathering all the function that
......@@ -428,7 +414,7 @@ public:
template<class ContainerClass,class LeafClass,class CellClass>
void generic_set_positions(FOctree<FReal,CellClass,ContainerClass,LeafClass> * octree,
int NbPositions, FReal * X, FReal * Y, FReal * Z, PartType type){
int NbPositions, FReal * X, FReal * Y, FReal * Z, PartType type){
int checkCount = 0;
if(type == SOURCE || type==BOTH){
octree->forEachLeaf([&](LeafClass* leaf){
......@@ -564,7 +550,7 @@ public:
template<class ContainerClass,class LeafClass,class CellClass>
void generic_get_positions_xyz(FOctree<FReal,CellClass,ContainerClass,LeafClass> * octree,
int NbPositions, FReal * positionsToFill, PartType type){
int NbPositions, FReal * positionsToFill, PartType type){
int checkCount = 0;
if(type == SOURCE || type==BOTH){
octree->forEachLeaf([&](LeafClass* leaf){
......@@ -599,7 +585,7 @@ public:
template<class ContainerClass,class LeafClass,class CellClass>
void generic_get_positions_xyz_npart(FOctree<FReal,CellClass,ContainerClass,LeafClass> * octree,
int NbPositions, int * idxOfParticles, FReal * positionsToFill, PartType type){
int NbPositions, int * idxOfParticles, FReal * positionsToFill, PartType type){
int checkCount = 0;
if(type == SOURCE || type==BOTH){
octree->forEachLeaf([&](LeafClass* leaf){
......@@ -654,7 +640,7 @@ public:
template<class ContainerClass,class LeafClass,class CellClass>
void generic_get_positions(FOctree<FReal,CellClass,ContainerClass,LeafClass> * octree,
int NbPositions, FReal * X, FReal * Y , FReal * Z, PartType type){
int NbPositions, FReal * X, FReal * Y , FReal * Z, PartType type){
int checkCount = 0;
if(type == SOURCE || type==BOTH){
octree->forEachLeaf([&](LeafClass* leaf){
......@@ -689,7 +675,7 @@ public:
template<class ContainerClass,class LeafClass,class CellClass>
void generic_get_positions_npart(FOctree<FReal,CellClass,ContainerClass,LeafClass> * octree,
int NbPositions, int * idxOfParticles,FReal * X, FReal * Y , FReal * Z,PartType type){
int NbPositions, int * idxOfParticles,FReal * X, FReal * Y , FReal * Z,PartType type){
int checkCount = 0;
if(type == SOURCE || type==BOTH){
octree->forEachLeaf([&](LeafClass* leaf){
......@@ -865,12 +851,12 @@ extern "C" void scalfmm_get_physical_values(scalfmm_handle Handle, int nbPhysica
extern "C" void scalfmm_set_physical_values_npart(scalfmm_handle Handle, int nbPhysicalValues,
int* idxOfParticles, double * physicalValues, PartType type){
((ScalFmmCoreHandle<double> * ) Handle)->engine->set_physical_values_npart(nbPhysicalValues,
idxOfParticles, physicalValues, type);
idxOfParticles, physicalValues, type);
}
extern "C" void scalfmm_get_physical_values_npart(scalfmm_handle Handle, int nbPhysicalValues,
int* idxOfParticles, double * physicalValues, PartType type){
((ScalFmmCoreHandle<double> * ) Handle)->engine->get_physical_values_npart(nbPhysicalValues,
idxOfParticles, physicalValues, type);
idxOfParticles, physicalValues, type);
}
//To get the result
......@@ -1073,6 +1059,13 @@ extern "C" void scalfmm_generic_partition(scalfmm_handle handle, FSize nbThings,
((ScalFmmCoreHandle<double> * ) handle)->engine->generic_partition(nbThings,sizeofthing,arrayOfThing,newArray);
}
extern "C" void scalfmm_call_delete(double * inDoublePtr,FSize * inFSizePtr){
if(inDoublePtr)
delete [] inDoublePtr;
if(inFSizePtr)
delete [] inFSizePtr;
}
#endif
#endif
// See LICENCE file at project root
/** It should be compiled with C export */
extern "C" {
#include "CScalfmmApi.h"
......
// See LICENCE file at project root
#ifndef FUSERKERNELDISTRENGINE_HPP
#define FUSERKERNELDISTRENGINE_HPP
......@@ -431,6 +433,8 @@ public:
~FUserKernelDistrEngine(){
delete comm;
comm = nullptr;
delete kernel;
delete octreeDist;
}
//Qu'est-ce qu'il faut que je surcharge ?
......@@ -486,15 +490,20 @@ public:
for(int id = 0 ; id<nbPoints ; ++id){
FTreeCoordinate host;
arrayToBeSorted[id].position = FPoint<FReal>(particleXYZ[id+0],particleXYZ[id+1],particleXYZ[id+2]);
arrayToBeSorted[id].position = FPoint<FReal>(particleXYZ[3*id+0],
particleXYZ[3*id+1],
particleXYZ[3*id+2]);
arrayToBeSorted[id].orIndex = id + Ind.getoriIntervals(myRank).first;
arrayToBeSorted[id].orOwner = myRank;
//Evaluate Morton Index
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+0] - this->getBoxCorner().getX(),this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+0] - this->getBoxCorner().getX(),
this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
this->getTreeHeight()));
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+1] - this->getBoxCorner().getY(),this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+1] - this->getBoxCorner().getY(),
this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
this->getTreeHeight()));
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+2] - this->getBoxCorner().getZ(),this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
host.setX(FCoordinateComputer::GetTreeCoordinate<FReal>(particleXYZ[id*3+2] - this->getBoxCorner().getZ(),
this->getBoxWidth(),this->getBoxWidthAtLeafLevel(),
this->getTreeHeight()));
arrayToBeSorted[id].index = host.getMortonIndex();
}
......@@ -578,11 +587,11 @@ public:
return A*stride;
});
std::transform(Ind.getDisplSendVector().begin(),Ind.getDisplSendVector().end(),displSendByte.begin(),
[&](const FSize & A){
[&](const FSize & A){
return A*stride;
});
std::transform(Ind.getDisplRecvVector().begin(),Ind.getDisplRecvVector().end(),displRecvByte.begin(),
[&](const FSize & A){
[&](const FSize & A){
return A*stride;
});
std::vector<char > recvBuffer;
......@@ -603,12 +612,13 @@ public:
//Then, i need to find the index where current index
//is sorted inside currentArray;
FSize idSearch = 0;
for(idSearch=0 ; idSearch < Ind.getCount(myRank) && (Ind.getCurrentArrayValue(idSearch) != currentIndex) ; ++idSearch);
memcpy(&output[idSearch*stride],&recvBuffer[idRead*stride],stride);
for(idSearch=0 ; idSearch < Ind.getCount(myRank) && (Ind.getCurrentArrayValue(idSearch) != currentIndex) ; ++idSearch){
memcpy(&output[idSearch*stride],&recvBuffer[idRead*stride],stride);
}
}
//C Part
*newArray = malloc(output.size());
*newArray = new char[output.size()];
memcpy(*newArray,output.data(),output.size());
}
......@@ -696,13 +706,13 @@ public:
//Only one config shall work , so let's use it
switch(FScalFMMEngine<FReal>::Algorithm){
case 5:
{
typedef FFmmAlgorithmThreadProc<OctreeClass,CoreCellDist,ContainerClass,CoreKernelClass,LeafClass> AlgoProcClass;
AlgoProcClass * algoProc = new AlgoProcClass(*comm,octreeDist,kernel);
FScalFMMEngine<FReal>::algoTimer = algoProc;
algoProc->execute(FFmmP2M | FFmmM2M | FFmmM2L | FFmmL2L | FFmmL2P | FFmmP2P);
break;
}
{
typedef FFmmAlgorithmThreadProc<OctreeClass,CoreCellDist,ContainerClass,CoreKernelClass,LeafClass> AlgoProcClass;
AlgoProcClass * algoProc = new AlgoProcClass(*comm,octreeDist,kernel);
FScalFMMEngine<FReal>::algoTimer = algoProc;
algoProc->execute(FFmmP2M | FFmmM2M | FFmmM2L | FFmmL2L | FFmmL2P | FFmmP2P);
break;
}
default:
break;
}
......@@ -714,13 +724,13 @@ public:
//Only one config shall work , so let's use it
switch(FScalFMMEngine<FReal>::Algorithm){
case 5:
{
typedef FFmmAlgorithmThreadProc<OctreeClass,CoreCellDist,ContainerClass,CoreKernelClass,LeafClass> AlgoProcClass;
AlgoProcClass * algoProc = new AlgoProcClass(*comm,octreeDist,kernel);
FScalFMMEngine<FReal>::algoTimer = algoProc;
algoProc->execute(FFmmP2M | FFmmM2M | FFmmM2L | FFmmL2L | FFmmL2P);
break;
}
{
typedef FFmmAlgorithmThreadProc<OctreeClass,CoreCellDist,ContainerClass,CoreKernelClass,LeafClass> AlgoProcClass;
AlgoProcClass * algoProc = new AlgoProcClass(*comm,octreeDist,kernel);
FScalFMMEngine<FReal>::algoTimer = algoProc;
algoProc->execute(FFmmP2M | FFmmM2M | FFmmM2L | FFmmL2L | FFmmL2P);
break;
}
default:
break;
}
......
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// See LICENCE file at project root
/**
* @file This file contains a class that inherits from FScalFMMEngine,
......
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// See LICENCE file at project root
#ifndef FUSERLEAFCONTAINER_HPP
#define FUSERLEAFCONTAINER_HPP
......
// See LICENCE file at project root
#ifndef TIMERS_H
#define TIMERS_H
......
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -175,9 +177,9 @@ void on_leaf(int level, FSize nbParts, const FSize * idxParts, long long morton_
double pot = 0;
for(int i=0 ; i<nbParts ; ++i){
pot += potentials[i];
ptrToUserData->totalEnergy += potentials[i]*(ptrToUserData->myPhyValues[idxParts[i]]);
}
ptrToUserData->totalEnergy += pot*(ptrToUserData->myPhyValues[idxParts[i]]);
}
/* printf("I'm leaf at %lld pos, of center [%e %e %e], containing %lld parts\n", */
/* morton_index,center[0],center[1],center[2],nbParts); */
......@@ -319,8 +321,6 @@ int main(int argc, char ** argv){
//Only read, so no split needed
userDatas.insertedPositions = outputArray; // Set the position
//Need to get the good ones...
double * newPhyValues = malloc(sizeof(double) * outputNbPoint);
//In this part, we store the physicalvalues
//Create as many array of forces as there are threads in order to
......@@ -364,6 +364,7 @@ int main(int argc, char ** argv){
//Dealloc scalfmm handle
scalfmm_dealloc_handle(Handle,cheb_free_cell);
{//This part will write generated particles to a file at ScalFMM
//format in order to verify numercal results
/* if(my_rank==0){ */
......@@ -395,8 +396,8 @@ int main(int argc, char ** argv){
/* } */
}
free(outputIndexes);
free(outputArray);
scalfmm_call_delete(outputArray,outputIndexes);
scalfmm_call_delete(*outputPhyValPtr,NULL);
MPI_Finalize();
......
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
// ===================================================================================
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
// ===================================================================================
// See LICENCE file at project root
#include <stdio.h>
#include <stdlib.h>
......
......@@ -109,9 +109,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
option( OPENMP_SUPPORT_PRIORITY "Set to ON to enable tasks priority (KSTAR/StarPU compiler only)" OFF )
option( OPENMP_SUPPORT_TASK_NAME "Set to ON to enable a taskname clause for tasks (KSTAR/StarPU compiler only)" OFF )
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
option( SCALFMM_DISABLE_NATIVE_OMP4 "Set to ON to disable the gcc/intel omp4" OFF )
option( SCALFMM_USE_OMP4 "Set to ON to disable the gcc/intel omp4" OFF )
else()
option( SCALFMM_DISABLE_NATIVE_OMP4 "Set to ON to disable the gcc/intel omp4" ON )
option( SCALFMM_USE_OMP4 "Set to ON to disable the gcc/intel omp4" ON )
endif()
option( SCALFMM_TIME_OMPTASKS "Set to ON to time omp4 tasks and generate output file" OFF )
# SIMGRID and peformance models options
......@@ -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")
set(SCALFMM_CXX_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/Src/Utils/Contribs")
#
#
......@@ -173,10 +173,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set(SSE_FLAGS "-msse3 -mfpmath=sse") # -mtune=native -march=native
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(AVX_FLAGS "-fp-model source -march=native -axCORE-AVX2,CORE-AVX-I,AVX") #-mavx
set(AVX2_FLAGS "-march=native -axCORE-AVX2,CORE-AVX-I,AVX") #-march=core-avx2
set(SSE_FLAGS "-axSSE4.2 -march=native")
endif(APPLE)
set(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} -fma -align -finline-functions")
#-Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wall -Wnosign-conversion ")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "XL")
set(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} -mcpu=power8 -mtune=power8")
......@@ -617,6 +618,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
list(APPEND FUSE_LIST "STARPU")
list(APPEND FUSE_LIST "CUDA")
list(APPEND FUSE_LIST "OPENCL")
list(APPEND FUSE_LIST "OMP4")
##################################################################
# Use SSE #
......@@ -800,7 +802,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 "")
......@@ -922,7 +924,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
#string_TRIM(PATCH1 PATCH)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "ON")
#
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Licence.txt")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE")
set(CPACK_PACKAGE_VERSION_MAJOR "${SCALFMM_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${SCALFMM_MINOR_VERSION}")
#
......@@ -954,10 +956,12 @@ 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}")
message(STATUS "SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
message(STATUS "FUSE_LIST = ${FUSE_LIST}")
#
##################################################################
# END #
......
......@@ -702,6 +702,7 @@ FILE_PATTERNS = *.c \
*.php3 \
*.inc \
*.m \
*.md \
*.mm \
*.dox \
*.py \
......
Downloading, Building and Installing ScalFMM {#install}
============================================
On this page, you will find all the requirements for building and installing ScalFMM.
[TOC]
# Download ScalFMM {#download}
ScalFMM can be downloaded from Inria's GitLab repository
- https://gitlab.inria.fr/solverstack/ScalFMM
It can also be installed using Spack, which will automatically manage its dependencies. You will find more information about Spack and ScalFMM here: http://morse.gforge.inria.fr/spack/spack.html#sec-2-6 .
git clone https://github.com/fpruvost/spack.git
cd spack
bin/spack install scalfmm
To receive updates about new versions, you can register to the users mailing list at http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/scalfmm-public-users . This list has a very low traffic.
# Dependencies {#deps}
- CMake v2.8.12 or later
- A C++ compiler that supports
- C++14
- OpenMP
**Optional dependencies**
- Doxygen 1.8.8 or later to build the documentation
- MPI, for distributed support
- BLAS
- FFTW
# Build {#build}
## Setup {#setup}
Building ScalFMM requires the standard CMake workflow.
cd scalfmm/Build
cmake .. [-DSCALFMM_USE_MPI=ON] # if MPI is needed
The build may be configured using `ccmake .`.
To build an executable, run:
make exec_name
The documentation can be built using `make doc` if you have Doxygen available.
**Example**
cd scalfmm/Build
cmake -DSCALFMM_USE_BLAS=ON -DSCALFMM_USE_MKL_AS_BLAS=ON \
-DSCALFMM_USE_SSE=OFF -DSCALFMM_USE_AVX=ON ..
## Configuration {#conf}
The following options are available.
* `CMAKE_INSTALL_PREFIX`: where to install ScalFmm
* `SCALFMM_USE_MPI`: to use and enable MPI. Warning, you need to use this parameter at the first cmake command you write.
* `SCALFMM_ATTACHE_SOURCE`: build with -g (which enables debugging with release binaries)
* `SCALFMM_BUILD_EXAMPLES`: build the examples
* `SCALFMM_BUILD_TESTS`: build the tests
* `SCALFMM_BUILD_UTESTS`: build the unit tests
* `SCALFMM_BUILD_DOC`: enable make doc generate the documentation
* `SCALFMM_USE_ADDONS`: activate add ons
* `SCALFMM_ADDON_FMMAPI`: build Fmm Api
* `ScalFMMUSE_MEM_STATS`: use memory stats (which count any new/delete done during a simulation)
* `SCALFMM_USE_BLAS`: enable BLAS (needed by Chebyshev interpolation kernel)
* `SCALFMM_USE_MKL_AS_BLAS`: use MKL as blas
* `SCALFMM_USE_FFT`: Use FFTW needed by the uniform interpolation kernel
* `SCALFMM_USE_MKL_AS_FFTW`: use MKL as FFTW
* `SCALFMM_USE_LOG`: print output debug information during the execution
* `SCALFMM_USE_ASSERT`: enable safe tests during execution
* `SCALFMM_USE_SSE`: compile with SEE support
* `SCALFMM_USE_AVX`: compile with AVX support
# Installation {#installation}
To install ScalFMM, use the `make install` command.
To run small tests on using ScalFMM, you can create a source file in the `Tests/Utils` folder. Run `cmake .` to update the available targets and compile your file as any other ScalFMM test.
/*! \page install Downloading, Building and Installing ScalFMM
*
* On this page, you will find all the requirements for building and installing ScalFMM.
*
* \tableofcontents
*
* \section download Download ScalFMM
*