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
=1.0, method='midpoint', num_threads=2) ann.setup(dt