Commit b854d3b8 authored by BRAMAS Berenger's avatar BRAMAS Berenger

Ensure that headers (MPI, BLAS, FFT) are not included if SCALFMM_USE_X is...

Ensure that headers (MPI, BLAS, FFT) are not included if SCALFMM_USE_X is turned OFF, and let only one entry point in FGlobal to
parent 2f2a3665
......@@ -57,6 +57,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/")
option( SCALFMM_BUILD_TESTS "Set to ON to build functionalities Tests" OFF )
option( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" OFF )
option( SCALFMM_INSTALL_DATA "Set to ON to include the data when proceeding to the installtion " OFF )
option( SCALFMM_BUILD_DOC "Set to ON to build the Doxygen documentation " OFF )
option( SCALFMM_BUILD_DEBUG "Set to ON to build in Debug" OFF )
option( SCALFMM_USE_LOG "Set to ON to print output debug information" OFF )
option( SCALFMM_USE_MEM_STATS "Set to ON to profile memory" OFF )
......@@ -612,8 +613,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/")
##################################################################
# Add - doc #
##################################################################
#
add_subdirectory(Doc)
if(SCALFMM_BUILD_DOC)
add_subdirectory(Doc)
endif()
##################################################################
# Build - Addons #
##################################################################
......
# add a target to generate API documentation with Doxygen
OPTION( SCALFMM_BUILD_DOC "Set to ON to build the Doxygen documentation " OFF )
IF(SCALFMM_BUILD_DOC)
find_package(Doxygen)
if(DOXYGEN_FOUND)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(
doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
# INSTALL(FILES ${SCALFMM_BINARY_DIR}/Doc/scalfmm.tag
# DESTINATION doc/
# )
# INSTALL(DIRECTORY ${SCALFMM_BINARY_DIR}/Doc/html
# DESTINATION doc/
# )
endif(DOXYGEN_FOUND)
endif(SCALFMM_BUILD_DOC)
doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
# INSTALL(FILES ${SCALFMM_BINARY_DIR}/Doc/scalfmm.tag DESTINATION doc/ )
# INSTALL(DIRECTORY ${SCALFMM_BINARY_DIR}/Doc/html DESTINATION doc/ )
else()
message( WARNING "You ask to enable the doc generation but Doxygen cannot be found." )
endif(DOXYGEN_FOUND)
......@@ -22,8 +22,9 @@
* <ul>
* <li> CMake for compiling, ccmake for configuring the build. Version 2.8.12.1 or later </li>
* <li> Open MP </li>
* <li> MPI, if you want to use distributed version of the algorithm </li>
* <li> MPI, if you want to use distributed version of the algorithm (Optional) </li>
* <li> A compiler supporting C++ 2011 </li>
* <li> BLAS, FFTW, ... (Optionals) </li>
* </ul>
*
* \section build Build
......@@ -32,7 +33,7 @@
* <li> Go to scalfmm/Build directory </li>
* <li> type <b> $> cmake .. </b>
* <ul>
* <li> If you want to enable MPI, use <b> $> cmake .. -DScaLFMM_USE_MPI=ON </b> </li>
* <li> If you want to enable MPI, use <b> $> cmake .. -DSCALFMM_USE_MPI=ON </b> </li>
* </ul>
* </li>
* <li> then configure your build with <b> $> ccmake .. </b> if needed </li>
......@@ -50,30 +51,26 @@
* <ul>
* <li> CMAKE_INSTALL_PREFIX : to choose where to install ScalFmm </li>
* <li> SCALFMM_USE_MPI : to use and enable MPI. Warning, you need to use this parameter at the first cmake command you write. </li>
* <li> SCALFMM_ATTACHE_SOURCE : to build with -g </li>
* <li> SSCALFMM_BUILD_TESTS : to build the text and the examples </li>
* <li> SCALFMM_ATTACHE_SOURCE : to build with -g (which enables debugging with release binaries)</li>
* <li> SCALFMM_BUILD_EXAMPLES : to build the examples </li>
* <li> SCALFMM_BUILD_TESTS : to build the tests </li>
* <li> SCALFMM_BUILD_UTESTS : to build the unit tests </li>
* <li> SCALFMM_BUILD_DOC : to enable make doc to generate the documentation </li>
* <li> SCALFMM_USE_ADDONS : to activate add ons </li>
* <ul>
* <li> SCALFMM_ADDON_FMMAPI : to build Fmm Api </li>
* </ul>
* <li> SCALFMM_USE_DOUBLE_PRECISION : to build in double precision </li>
* <li> ScalFMMUSE_MEM_STATS : to use memory stats (which count any new/delete done during a simulation) </li>
* <li> SCALFMM_USE_BLAS : to enable BLAS (needed by Chebyshev interpolation kernel) </li>
* <ul>
* <li> SCALFMM_USE_MKL_AS_BLAS : to use MKL as blas </li>
* </ul>
* <li> SCALFMM_USE_FFT : Use FFTW needed for uniform point for interpolation kernel</li>
* <li> SCALFMM_USE_FFT : Use FFTW needed by the uniform interpolation kernel</li>
* <ul>
* <li> ( SCALFMM_USE_MKL_AS_FFTW : to use MKL as FFTW </li>
* <li> ( SCALFMM_USE_MKL_AS_FFTW : to use MKL as FFTW) </li>
* </ul>
* <li> SCALFMM_USE_TRACE : to create trace </li>
* <ul>
* <li> SCALFMM_USE_ITAC : to use Intel ITAC tool as trace generator </li>
* </ul>
* <li> SCALFMM_USE_LOG to print output debug information
* <li> SCALFMM_USE_LOG to print output debug information during the execution
* <li> SCALFMM_USE_ASSERT enable safe tests during execution
* <li> SCALFMM_USE_MEM_STATS to profile memory
* <li> SCALFMM_USE_SSE compile with SEE support
* <li> SCALFMM_USE_AVX compile with AVX support
* <li>
......@@ -86,6 +83,10 @@
* The whole project is documented using Doxygen. You can build the doc
* by typing <b> $> make doc </b> in the Build directory.
* Notice that if you would like to create you own executable and rely on ScalFMM you can simply create
* a .cpp file and store it inside the Tests/Utils directory. Then by running cmake one more time (cmake ..)
* you will be able to compile your file without the need to change CMake files.
*
*
*/
/*! \page quick Quick Start
* In this section, we present the data structure organization and the
* classes design to understand fully ScalFmm and customized it.
* classes design to understand fully ScalFmm and to customize it.
* Remark : There is a big difference between the versions 1.0 and 2.0
* Remark 1.2 : There is a big difference between the versions 1.0 and 1.2
* since we do not store array of particles anymore but rather several arrays.
* This was needed in order to be able to vectorize the P2P code.
* We would like to inform users that are not familiar with 'C++' and
* who are familiar with 'C' and would like to create a kernel
* (and do not want to work on the parallelization),
* that an C API have been made for them.
* Remark 1.3 : There is a big difference between the versions 1.2 and 1.3
* The precision is choosen with template (usually called FReal) and no more
* during the configure.
* We would like to inform users who want to create a kernel and who are not familiar with 'C++'
* but are familiar with 'C' that an C API have been made for them.
* In order to get access to this API, go in Addons/CKernelApi.
* (To compile, enable the addons and then the CKernelApi).
* (To compile, enable the addons and then the CKernelApi in the CMake stage).
* However, to have access to all the features of ScalFmm it is required to use C++
* as described in this QuickStart.
......
......@@ -16,7 +16,7 @@
#ifndef FTREEBUILDER_H
#define FTREEBUILDER_H
#include "ScalFmmConfig.h"
#include "../Utils/FGlobal.hpp"
#include "../Utils/FLog.hpp"
#include "../Utils/FQuickSort.hpp"
......
......@@ -16,6 +16,11 @@
#ifndef FAVX_HPP
#define FAVX_HPP
#include "FGlobal.hpp"
#ifndef SCALFMM_USE_AVX
#error The AVX header is included while SCALFMM_USE_AVX is turned OFF
#endif
#include "immintrin.h"
#ifdef __AVXPE_INTEL_COMPILER
......
......@@ -18,6 +18,10 @@
#include "FGlobal.hpp"
#ifndef SCALFMM_USE_BLAS
#error The BLAS header is included while SCALFMM_USE_BLAS is turned OFF
#endif
// This file interfaces the blas functions
// to enable a generic use.
// If no blas has been enabled in the cmake,
......
......@@ -15,7 +15,12 @@
// ===================================================================================
#ifndef FDFT_HPP
#define FDFT_HPP
#include "ScalFmmConfig.h"
#include "FGlobal.hpp"
#ifndef SCALFMM_USE_FFT
#error The FFT header is included while SCALFMM_USE_FFT is turned OFF
#endif
#ifdef SCALFMM_USE_FFT
#include <iostream>
......
......@@ -19,7 +19,12 @@
#include <cstdio>
//#include "FGlobal.hpp"
#include "FGlobal.hpp"
#ifndef SCALFMM_USE_MPI
#error The MPI header is included while SCALFMM_USE_MPI is turned OFF
#endif
#include "FNoCopyable.hpp"
#include "FMath.hpp"
......
......@@ -22,9 +22,8 @@
#include <cstring>
#include <iostream>
#include "ScalFmmConfig.h"
#include "FMath.hpp"
#include "FGlobal.hpp"
#include "FMath.hpp"
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
......
......@@ -16,6 +16,11 @@
#ifndef FSSE_HPP
#define FSSE_HPP
#include "FGlobal.hpp"
#ifndef SCALFMM_USE_SSE
#error The SSE header is included while SCALFMM_USE_SSE is turned OFF
#endif
#include <xmmintrin.h> // SSE
#include <emmintrin.h> //SSE2
#include <pmmintrin.h> //SSE3
......
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