diff --git a/CMakeLists.txt b/CMakeLists.txt index c2c7e3e67a..ccaa11e31b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,55 +40,50 @@ if( NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX}) message(STATUS "Relative CMAKE_INSTALL_PREFIX has been set to absolute path ${CMAKE_INSTALL_PREFIX}") endif() -############################################################################### +################################################################################ ################## All User Defined options ################## ################################################################################ -# set NEST defaults -set( tics_per_ms "1000.0" CACHE STRING "Specify elementary unit of time. [default 1000.0]" ) -set( tics_per_step "100" CACHE STRING "Specify resolution. [default 100]" ) - -# add user modules -set( external-modules OFF CACHE STRING "External NEST modules to be linked in, separated by ';'. [default=OFF]" ) - -# use detailed NEST internal timers -set( with-detailed-timers OFF CACHE STRING "Enable detailed NEST internal time measurements. Detailed timers can affect the performance. [default=OFF]" ) - -# connect NEST with external projects -set( with-libneurosim OFF CACHE STRING "Request the use of libneurosim. Optionally give the directory, where libneurosim is installed. [default=OFF]" ) -set( with-music OFF CACHE STRING "Request the use of MUSIC. Optionally give the directory, where MUSIC is installed. [default=OFF]" ) -set( with-sionlib OFF CACHE STRING "Request the use of SIONlib. Optionally give the directory where SIONlib is installed. [default=OFF]" ) - -# set parallelization scheme -set( with-mpi OFF CACHE STRING "Request compilation with MPI. Optionally give directory with MPI installation. [default=OFF]" ) -set( with-openmp ON CACHE BOOL "Enable OpenMP multithreading. Optional: set OMP flag. [default=ON]" ) - -# define default libraries -set( with-gsl ON CACHE STRING "Find a gsl library. To set a specific gsl installation, set install path. [default=ON]" ) -set( with-readline ON CACHE STRING "Find a readline library. To set a specific readline, set install path. [default=ON]" ) -set( with-ltdl ON CACHE STRING "Find a ltdl library. To set a specific ltdl, set install path. [default=ON]" ) -set( with-python ON CACHE STRING "Build PyNEST. To set a specific Python, set install path. [default=ON]" ) -option( cythonize-pynest "Use Cython to cythonize pynestkernel.pyx. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx. [default=ON]" ON ) -set( with-boost ON CACHE STRING "Find a Boost library. To set a specific Boost installation, set install path. [default=ON]" ) - -# Whether to build a 'mostly' static executable and static libraries. -option( static-libraries "Build static executable and libraries. [default=OFF]" OFF ) -# additional compile flags -set( with-optimize ON CACHE STRING "Enable user defined optimizations. [default ON, when ON, defaults to '-O2']" ) -set( with-warning ON CACHE STRING "Enable user defined warnings. [default ON, when ON, defaults to '-Wall']" ) -set( with-debug OFF CACHE STRING "Enable user defined debug flags. [default OFF, when ON, defaults to '-g']" ) -set( with-intel-compiler-flags OFF CACHE STRING "User defined flags for the Intel compiler. [defaults to '-fp-model strict']" ) -set( with-libraries OFF CACHE STRING "Link additional libraries. Give full path. Separate multiple libraries by ';'. [default OFF]" ) -set( with-includes OFF CACHE STRING "Add additional include paths. Give full path without '-I'. Separate multiple include paths by ';'. [default OFF]" ) -set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1'. Separate multiple defines by ';'. [default OFF]" ) -set( with-version-suffix "" CACHE STRING "Set a user defined version suffix. [default '']" ) +# use Python to build PyNEST +set( with-python ON CACHE STRING "Build PyNEST [default=ON]. To set a specific Python, give the install path." ) +option( cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx." ON ) + +# select parallelization scheme +set( with-mpi OFF CACHE STRING "Build with MPI parallelization [default=OFF]. Optionally give directory with MPI installation." ) +set( with-openmp ON CACHE BOOL "Build with OpenMP multi-threading [default=ON]. Optionally set OMP compiler flags." ) + +# external libraries +set( with-libneurosim OFF CACHE STRING "Build with libneurosim [default=OFF]. Optionally give the directory where libneurosim is installed." ) +set( with-music OFF CACHE STRING "Build with MUSIC [default=OFF]. Optionally give the directory where MUSIC is installed." ) +set( with-sionlib OFF CACHE STRING "Build with SIONlib [default=OFF]. Optionally give the directory where sionlib is installed." ) +set( with-boost ON CACHE STRING "Build with Boost [default=ON]. To set a specific Boost installation, give the install path." ) +set( with-readline ON CACHE STRING "Build with GNU Readline library [default=ON]. To set a specific library, give the install path." ) +set( with-ltdl ON CACHE STRING "Build with ltdl library [default=ON]. To set a specific ltdl, give the install path. NEST uses ltdl for dynamic loading of external user modules." ) +set( with-gsl ON CACHE STRING "Build with the GSL library [default=ON]. To set a specific library, give the install path." ) + +# NEST properties +set( tics_per_ms "1000.0" CACHE STRING "Specify elementary unit of time [default=1000 tics per ms]." ) +set( tics_per_step "100" CACHE STRING "Specify resolution [default=100 tics per step]." ) +set( external-modules OFF CACHE STRING "External NEST modules to be linked in, separated by ';', [default=OFF]." ) +set( with-detailed-timers OFF CACHE STRING "Build with detailed internal time measurements [default=OFF]. Detailed timers can affect the performance." ) +set( target-bits-split "standard" CACHE STRING "Split of the 64-bit target neuron identifier type [default='standard']. 'standard' is recommended for most users. If running on more than 262144 MPI processes or more than 512 threads, change to 'hpc'." ) + +# generic build configuration +option( static-libraries "Build static executable and libraries [default=OFF]" OFF ) +set( with-optimize ON CACHE STRING "Enable user defined optimizations [default=OFF (uses '-O2')]. When ON, '-O3' is used. Separate multiple flags by ';'." ) +set( with-warning ON CACHE STRING "Enable user defined warnings [default=ON (uses '-Wall')]. Separate multiple flags by ';'." ) +set( with-debug OFF CACHE STRING "Enable user defined debug flags [default=OFF]. When ON, '-g' is used. Separate multiple flags by ';'." ) +set( with-intel-compiler-flags OFF CACHE STRING "User defined flags for the Intel compiler [default='-fp-model strict']. Separate multiple flags by ';'." ) +set( with-libraries OFF CACHE STRING "Link additional libraries [default=OFF]. Give full path. Separate multiple libraries by ';'." ) +set( with-includes OFF CACHE STRING "Add additional include paths [default=OFF]. Give full path without '-I'. Separate multiple include paths by ';'." ) +set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate multiple defines by ';'." ) +set( with-version-suffix "" CACHE STRING "Set a user defined version suffix [default='']." ) # cross-compiling # should be set via toolchain files set( enable-bluegene OFF CACHE STRING "Configure for BlueGene." ) option( k-computer "Enable K computer." OFF ) -set( target-bits-split "standard" CACHE STRING "Split of the 64-bit target neuron identifier type. 'standard' is recommended for most users. If running on more than 262144 MPI processes or more than 512 threads, change to 'hpc'. [default standard]" ) ################################################################################ ################## Project Directory variables ################## diff --git a/doc/userdoc/installation/cmake_options.rst b/doc/userdoc/installation/cmake_options.rst index 770574e454..3c148a4e57 100644 --- a/doc/userdoc/installation/cmake_options.rst +++ b/doc/userdoc/installation/cmake_options.rst @@ -28,70 +28,107 @@ Options for configuring NEST NEST allows for several configuration options for custom builds: -Change NEST behavior:: - - -Dtics_per_ms=[number] Specify elementary unit of time. [default 1000.0] - -Dtics_per_step=[number] Specify resolution. [default 100] - -Add user modules:: - - -Dexternal-modules=[OFF|] External NEST modules to be linked - in, separated by ';'. [default=OFF] - -Connect NEST with external projects:: - - -Dwith-music=[OFF|ON|] Request the use of MUSIC. Optionally - give the directory, where MUSIC is installed. - [default=OFF] - -Change parallelization scheme:: - - -Dwith-mpi=[OFF|ON|] Request compilation with MPI. Optionally - give directory with MPI installation. - [default=OFF] - -Dwith-openmp=[OFF|ON|] Enable OpenMP multi-threading. - Optional: set OMP flag. [default=ON] - -Set default libraries:: - - -Dwith-gsl=[OFF|ON|] Find a gsl library. To set a specific - library, set install path.[default=ON] - -Dwith-readline=[OFF|ON|] Find a GNU Readline library. To set - a specific library, set install path. - [default=ON] - -Dwith-ltdl=[OFF|ON|] Find an ltdl library. To set a specific - ltdl, set install path. NEST uses the - ltdl for dynamic loading of external - user modules. [default=ON] - -Dwith-python=[OFF|ON] Build PyNEST. [default=ON] - -Dcythonize-pynest=[OFF|ON] Use Cython to cythonize pynestkernel.pyx. - If OFF, PyNEST has to be build from - a pre-cythonized pynestkernel.pyx. - [default=ON] - -Change compilation behavior:: - - -Dstatic-libraries=[OFF|ON] Build static executable and libraries. [default=OFF] - -Dwith-optimize=[OFF|ON|] Enable user defined optimizations. Separate - multiple flags by ';'. - [default OFF, when ON, defaults to '-O3'] - -Dwith-warning=[OFF|ON|] Enable user defined warnings. Separate - multiple flags by ';'. - [default ON, when ON, defaults to '-Wall'] - -Dwith-debug=[OFF|ON|] Enable user defined debug flags. Separate - multiple flags by ';'. - [default OFF, when ON, defaults to '-g'] - -Dwith-intel-compiler-flags=[] User defined flags for the Intel compiler. - Separate multiple flags by ';'. - [defaults to '-fp-model strict'] - -Dwith-libraries= Link additional libraries. Give full path. - Separate multiple libraries by ';'. - [default OFF] - -Dwith-includes= Add additional include paths. Give full - path without '-I'. Separate multiple include - paths by ';'. [default OFF] - -Dwith-defines= Additional defines, e.g. '-DXYZ=1'. - Separate multiple defines by ';'. [default OFF] + +Use Python to build PyNEST +~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dwith-python=[OFF|ON|]`` | Build PyNEST [default=ON]. To set a specific Python, give the | +| | install path. | ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dcythonize-pynest=[OFF|ON]`` | Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, | +| | PyNEST has to be build from a pre-cythonized pynestkernel.pyx. | ++-----------------------------------------------+----------------------------------------------------------------+ + +For more details, see the :ref:`Python binding ` section below. + +Select parallelization scheme +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++---------------------------------------------+----------------------------------------------------------------+ +| ``-Dwith-mpi=[OFF|ON|]`` | Build with MPI parallelization [default=OFF]. Optionally give | +| | directory with MPI installation. | ++---------------------------------------------+----------------------------------------------------------------+ +| ``-Dwith-openmp=[OFF|ON|]`` | Build with OpenMP multi-threading [default=ON]. Optionally set | +| | OMP compiler flags. | ++---------------------------------------------+----------------------------------------------------------------+ + +See also the section on :ref:`building with mpi ` below. + +External libraries +~~~~~~~~~~~~~~~~~~ + ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-libneurosim=[OFF|ON|]``| Build with `libneurosim `_ [default=OFF]. Optionally | +| | give the directory where libneurosim is installed. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-music=[OFF|ON|]`` | Build with `MUSIC `_ [default=OFF]. Optionally give the | +| | directory where MUSIC is installed. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-sionlib=[OFF|ON|]`` | Build with | +| | `sionlib `_| +| | [default=OFF]. Optionally give the directory where sionlib is installed. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-boost=[OFF|ON|]`` | Build with Boost [default=ON]. To set a specific Boost installation, give the install path. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-readline=[OFF|ON|]`` | Build with GNU Readline library [default=ON]. To set a specific library, give the install path.| ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-ltdl=[OFF|ON|]`` | Build with ltdl library [default=ON]. To set a specific ltdl, give the install path. NEST uses| +| | ltdl for dynamic loading of external user modules. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ +| ``-Dwith-gsl=[OFF|ON|]`` | Build with the GSL library [default=ON]. To set a specific library, give the install path. | ++-------------------------------------------------------+------------------------------------------------------------------------------------------------+ + +NEST properties +~~~~~~~~~~~~~~~ + ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dtics_per_ms=[number]`` | Specify elementary unit of time [default=1000 tics per ms]. | ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dtics_per_step=[number]`` | Specify resolution [default=100 tics per step]. | ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dexternal-modules=[OFF|]``| External NEST modules to be linked in, separated by ';', | +| | [default=OFF]. | ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dwith-detailed-timers=[OFF|ON]`` | Build with detailed internal time measurements [default=OFF]. | +| | Detailed timers can affect the performance. | ++-----------------------------------------------+----------------------------------------------------------------+ +| ``-Dtarget-bits-split=['standard'|'hpc']`` | Split of the 64-bit target neuron identifier type | +| | [default='standard']. 'standard' is recommended for most users.| +| | If running on more than 262144 MPI processes or more than 512 | +| | threads, change to 'hpc'. | ++-----------------------------------------------+----------------------------------------------------------------+ + +Generic build configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dstatic-libraries=[OFF|ON]`` | Build static executable and libraries [default=OFF]. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-optimize=[OFF|ON|]`` | Enable user defined optimizations | +| | [default=OFF (uses '-O2')]. When ON, '-O3' is used. Separate | +| | multiple flags by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-warning=[OFF|ON|]`` | Enable user defined warnings [default=ON (uses '-Wall')]. | +| | Separate multiple flags by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-debug=[OFF|ON|]`` | Enable user defined debug flags [default=OFF]. When ON, '-g' is | +| | used. Separate multiple flags by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-intel-compiler-flags=[OFF|]``| User defined flags for the Intel compiler | +| | [default='-fp-model strict']. Separate multiple flags by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-libraries=[OFF|]`` | Link additional libraries [default=OFF]. Give full path. Separate| +| | multiple libraries by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-includes=[OFF|]`` | Add additional include paths [default=OFF]. Give full path | +| | without '-I'. Separate multiple include paths by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-defines=[OFF|]`` | Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate | +| | multiple defines by ';'. | ++------------------------------------------------------+------------------------------------------------------------------+ +| ``-Dwith-version-suffix=[string]`` | Set a user defined version suffix [default='']. | ++------------------------------------------------------+------------------------------------------------------------------+ .. _compile-with-mpi: @@ -111,10 +148,10 @@ following steps in order to add support for MPI: 3. If 2. does not work, but you know the correct compiler wrapper for your installation, try adding the following to the invocation of ``cmake``:: - -DMPI_CXX_COMPILER=myC++_CompilerWrapper + -DMPI_CXX_COMPILER=myC++_CompilerWrapper \ -DMPI_C_COMPILER=myC_CompilerWrapper -Dwith-mpi=ON -When running large-scale parallel simualations and recording from many +When running large-scale parallel simulations and recording from many neurons, writing to ASCII files might become prohibitively slow due to the large number of resulting files. By installing the `SIONlib library `_ and supplying its @@ -149,16 +186,7 @@ follwing switch for the invocation of ``cmake``. It expects either For details on how to use the Connection Generator Interface, see the :ref:`guide on connection management `. -Disabling the Python Bindings (PyNEST) --------------------------------------- - -To disable Python bindings use:: - - -Dwith-python=OFF - -as an argument to ``cmake``. - -Please see the :doc:`README ` for details. +.. _compile_with_python: Python Binding (PyNEST) -----------------------