ANNarchy 4.8.2
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • Reference
  • Core components
    • Population
    • Projection
    • Neuron
    • Synapse
    • Monitor
    • PopulationView
    • Dendrite
    • Network
  • Configuration
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
  • Simulation
    • simulate
    • simulate_until
    • step
    • parallel_run
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • STP
    • STDP
    • Hebb
    • Oja
    • IBCM
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • IO
    • save
    • load
    • save_parameters
    • load_parameters
  • Utilities
    • report
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions and Constants
    • add_function
    • functions
    • Constant
    • get_constant
  • Plotting
    • raster_plot
    • histogram
    • inter_spike_interval
    • coefficient_of_variation
    • population_rate
    • smoothed_rate
  • Callbacks
    • every
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter

On this page

  • setup

setup

intern.ConfigManagement.setup(**keyValueArgs)

The setup function is used to configure ANNarchy simulation environment. It takes various optional arguments:

  • dt: simulation step size in milliseconds (default: 1.0).
  • paradigm: parallel framework for code generation. Accepted values: “openmp” or “cuda” (default: “openmp”).
  • method: default method to numerize ODEs. Default is the explicit forward Euler method (‘explicit’).
  • sparse_matrix_format: the default matrix format for projections in ANNarchy (by default: List-In-List for CPUs and Compressed Sparse Row). Note that affects only the C++ data structures.
  • sparse_matrix_storage_order: encodes whether the row in a connectivity matrix encodes pre-synaptic neurons (post_to_pre, default) or post-synaptic neurons (pre_to_post). Note that affects only the C++ data structures.
  • precision: default floating precision for variables in ANNarchy. Accepted values: “float” or “double” (default: “double”)
  • only_int_idx_type: if set to True (default) only signed integers are used to store pre-/post-synaptic ranks which was default until 4.7. If set to False, the index type used in a single projection is selected based on the size of the corresponding populations.
  • num_threads: number of treads used by openMP (overrides the environment variable OMP_NUM_THREADS when set, default = None).
  • visible_cores: allows a fine-grained control which cores are useable for the created threads (default = [] for no limitation). It can be used to limit created openMP threads to a physical socket.
  • structural_plasticity: allows synapses to be dynamically added/removed during the simulation (default: False).
  • seed: the seed (integer) to be used in the random number generators (default = None is equivalent to time(NULL)).

The following parameters are mainly for debugging and profiling, and should be ignored by most users:

  • verbose: shows details about compilation process on console (by default False). Additional some information of the network construction will be shown.
  • suppress_warnings: if True, warnings (e. g. from the mathematical parser) are suppressed.
  • show_time: if True, initialization times are shown. Attention: verbose should be set to True additionally.
  • disable_shared_library_time_offset: by default False. If set to True, the shared library generated by ANNarchy will not be extended by time offset.

Note:

This function should be used before any other functions of ANNarchy (including importing a network definition), right after import ANNarchy:

import ANNarchyas ann
ann.setup(dt=1.0, method='midpoint', num_threads=2)
Network
compile
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker