Commit a237c838 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille
parents c1b1b17a c51c84a5
I don't know if theses ideas are relevant since ScallFMM is only supposed to be a library, but as an everyday UNIX // GNU/Linux user, some things struck me.
* About the -f / -infile / -fin argument
For some reason, all tests have similar arguments that differs in name from one to another.
I suggest that this should be standardized as "-if" for "input file" and "-of" for "output file" just like in the dd UNIX command.
Therefore we won't spend anymore time wondering what the proper argument for the tool is.
* About arguments in general
Maybe it would be clearer to use one or two letters when using a single hyphen-minus and full words when using a double hyphen-minus.
Here's an exemple to make my idea clearer:
-h | --help
-v | --verbose
-d | --depth
-sd | --subdepth
-if | --input
-of | --output
etc...
......@@ -26,24 +26,24 @@
#include "ScalFmmConfig.h"
#include "../../Src/Containers/FOctree.hpp"
#include "../../Src/Utils/FMpi.hpp"
#include "../../Src/Core/FFmmAlgorithmThreadProc.hpp"
#include "../Src/Containers/FOctree.hpp"
#include "../Src/Utils/FMpi.hpp"
#include "../Src/Core/FFmmAlgorithmThreadProc.hpp"
#include "../../Src/Files/FFmaGenericLoader.hpp"
#include "../../Src/Files/FMpiFmaGenericLoader.hpp"
#include "../../Src/Files/FMpiTreeBuilder.hpp"
#include "../Src/Files/FFmaGenericLoader.hpp"
#include "../Src/Files/FMpiFmaGenericLoader.hpp"
#include "../Src/Files/FMpiTreeBuilder.hpp"
#include "../../Src/BalanceTree/FLeafBalance.hpp"
#include "../Src/BalanceTree/FLeafBalance.hpp"
#include "../../Src/Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "../../Src/Kernels/Chebyshev/FChebSymKernel.hpp"
#include "../../Src/Kernels/Chebyshev/FChebCell.hpp"
#include "../Src/Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "../Src/Kernels/Chebyshev/FChebSymKernel.hpp"
#include "../Src/Kernels/Chebyshev/FChebCell.hpp"
#include "../../Src/Components/FSimpleLeaf.hpp"
#include "../../Src/Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "../Src/Components/FSimpleLeaf.hpp"
#include "../Src/Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "../../Src/Utils/FParameters.hpp"
#include "../Src/Utils/FParameters.hpp"
/// \file ChebyshevInterpolationMPIFMM
......
......@@ -566,6 +566,9 @@ int main(int argc, char* argv[])
typedef FSphericalKernel< CellClass, ContainerClass > KernelClass;
typedef FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClass;
#ifndef ScalFMM_USE_BLAS
CellClass::Init(DevP, true);
#endif
OctreeClass tree(TreeHeight, SubTreeHeight, loader.getBoxWidth(), loader.getCenterOfBox());
std::cout << "\nFFmaSpherical FMM ... P: " << DevP<< std::endl;
......
......@@ -9,16 +9,14 @@ version 1.1
1.2 ()
1.2-
-----
- New FMA format to read/write particles
- Add examples repository
- Add distributions generator
- Fix bugs in periodic model
- Fix bug and performance improvements in MPI thread algorithms
- Now we use MPI_THREAD_SERIALIZED rather than MPI_THREAD_MULTIPLE in MPI+OpenMP algorithm.
- Add Uniform interpolation based on Lagrange polynomials
- Improve tests -> now we use CTest and CDash (Thanks to F Rue (Inria))
- Add support for Intel icl++ compiler (Intel 2015 compiler) on MacOS X and Clang on linux system
- Add SSE and AVX support in CMake
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FEQUALIZE_HPP
#define FEQUALIZE_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FALGORITHMBUILDER_HPP
#define FALGORITHMBUILDER_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FCORECOMMON_HPP
#define FCORECOMMON_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FFMMALGORITHMPERIODIC_HPP
#define FFMMALGORITHMPERIODIC_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FPERLEAFLOADER_HPP
#define FPERLEAFLOADER_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2P_HPP
#define FP2P_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PAVX_H
#define FP2PAVX_H
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PCLASSIC_HPP
#define FP2PCLASSIC_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PR_HPP
#define FP2PR_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PRAVX_HPP
#define FP2PRAVX_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PRCLASSIC_HPP
#define FP2PRCLASSIC_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PRSSE_HPP
#define FP2PRSSE_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FP2PSSE_HPP
#define FP2PSSE_HPP
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FAVX_HPP
#define FAVX_HPP
......
......@@ -21,7 +21,7 @@ FMemStats FMemStats::controler;
#ifdef ScalFMM_USE_MEM_STATS
// Regular scalar new
void* operator new(std::size_t n) throw(std::bad_alloc)
void* operator new(std::size_t n)
{
using namespace std;
......@@ -44,7 +44,7 @@ FMemStats FMemStats::controler;
}
// Nothrow scalar new
void* operator new(size_t n, std::nothrow_t const&) throw()
void* operator new(size_t n,const std::nothrow_t& nothrow_value)
{
//if (n == 0) n = 1;
void* const allocated = malloc(n + 8);
......@@ -57,19 +57,19 @@ FMemStats FMemStats::controler;
}
// Regular array new
void* operator new[](size_t n) throw(std::bad_alloc)
void* operator new[](size_t n)
{
return ::operator new(n);
}
// Nothrow array new
void* operator new[](size_t n, std::nothrow_t const&) throw()
void* operator new[](size_t n,const std::nothrow_t& nothrow_value)
{
return ::operator new(n, std::nothrow);
}
// Regular scalar delete
void operator delete(void* p) throw(){
void operator delete(void* p) noexcept {
if(p){
FMemStats::controler.deallocate( *(reinterpret_cast<size_t*>(static_cast<unsigned char*>(p) - 8)) );
free(static_cast<unsigned char*>(p) - 8);
......@@ -77,18 +77,18 @@ FMemStats FMemStats::controler;
}
// Nothrow scalar delete
void operator delete(void* p, std::nothrow_t const&) throw(){
void operator delete(void* p,const std::nothrow_t& nothrow_value) noexcept {
::operator delete(p);
}
// Regular array delete
void operator delete[](void* p) throw()
void operator delete[](void* p) noexcept
{
::operator delete(p);
}
// Nothrow array delete
void operator delete[](void* p, std::nothrow_t const&) throw()
void operator delete[](void* p,const std::nothrow_t& nothrow_value) noexcept
{
::operator delete(p);
}
......
......@@ -31,14 +31,14 @@
#include <new>
#include <stdexcept>
#warning You are using meme stats
void* operator new(std::size_t n) throw(std::bad_alloc);
void* operator new(size_t n, std::nothrow_t const&) throw();
void* operator new[](size_t n) throw(std::bad_alloc);
void* operator new[](size_t n, std::nothrow_t const&) throw();
void operator delete(void* p) throw();
void operator delete(void* p, std::nothrow_t const&) throw();
void operator delete[](void* p) throw();
void operator delete[](void* p, std::nothrow_t const&) throw();
void* operator new(std::size_t n);
void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) ;
void* operator new[](std::size_t n);
void* operator new[] (std::size_t size, const std::nothrow_t& nothrow_value) ;
void operator delete(void* p) noexcept;
void operator delete (void* ptr, const std::nothrow_t& nothrow_constant) noexcept;
void operator delete[](void* p) noexcept;
void operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) noexcept;
#endif
/** Give the memory allocation details
......@@ -68,14 +68,14 @@ private:
}
#ifdef ScalFMM_USE_MEM_STATS
friend void* operator new(std::size_t n) throw(std::bad_alloc);
friend void* operator new(size_t n, std::nothrow_t const&) throw();
friend void* operator new[](size_t n) throw(std::bad_alloc);
friend void* operator new[](size_t n, std::nothrow_t const&) throw();
friend void operator delete(void* p) throw();
friend void operator delete(void* p, std::nothrow_t const&) throw();
friend void operator delete[](void* p) throw();
friend void operator delete[](void* p, std::nothrow_t const&) throw();
friend void* operator new(std::size_t n);
friend void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) ;
friend void* operator new[](std::size_t n);
friend void* operator new[] (std::size_t size, const std::nothrow_t& nothrow_value) ;
friend void operator delete(void* p) noexcept;
friend void operator delete (void* ptr, const std::nothrow_t& nothrow_constant) noexcept;
friend void operator delete[](void* p) noexcept;
friend void operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) noexcept;
#endif
public:
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// 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".
// ===================================================================================
#ifndef FSSE_HPP
#define FSSE_HPP
......
......@@ -15,3 +15,4 @@ ToDO
2) Non cubic box.
3) Compute the virial for MD simulations
4) Hybrid parallelism for the tree build
5) Use the same parameters for all tests (-f -file -h -depth ...)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto scalfmm/Build and tapes cmake ../")
endif(insource)
project(Examples_scalfmm CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
ADD_DEFINITIONS( ${ScaLFMM_CXX_FLAGS})
# Find all code files
file(
GLOB_RECURSE
source_tests_files
./*.cpp
)
# Adding the project sources dir as an include dir
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/Src
${CMAKE_SOURCE_DIR}/Src
)
# Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files})
get_filename_component(
execname ${exec}
NAME_WE
)
set(compile_exec "TRUE")
# Test Blas dependency
file(STRINGS "${exec}" lines_blas REGEX "@FUSE_BLAS")
if(lines_blas)
if( NOT ScalFMM_USE_BLAS )
MESSAGE( STATUS "This needs BLAS = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
# Test FFT dependency
file(STRINGS "${exec}" lines_fft REGEX "@FUSE_FFT")
if(lines_fft)
if( NOT ScalFMM_USE_FFT )
MESSAGE( STATUS "This needs FFT = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
# Test MPI dependency
file(STRINGS "${exec}" lines_mpi REGEX "@FUSE_MPI")
if(lines_mpi)
if( NOT ScalFMM_USE_MPI )
MESSAGE( STATUS "This needs MPI = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
# Dependency are OK
if( compile_exec )
add_executable(
${execname}
${exec}
)
SET_TARGET_PROPERTIES(${execname} PROPERTIES ENABLE_EXPORTS TRUE)
target_link_libraries(
${execname}
${scalfmm_lib}
${SCALFMM_LIBRARIES}
)
# Install bin
install( TARGETS ${execname} DESTINATION bin )
endif()
endforeach(exec)
......@@ -33,6 +33,7 @@ shujin.cao@163.com
t.ben.thompson@gmail.com
t.betcke@ucl.ac.uk
vitoreafeliciano@msn.com
wangjun5505@163.com
weygand@kit.edu
wgs@theworld.com
zcos123@gmail.com
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