Overview¶
The Python frontend for Arbor is an interface that the vast majority of users will use to interact with Arbor. This section covers how to use the frontend with examples and detailed descriptions of features.
Prerequisites¶
Once Arbor has been built and installed (see the installation guide),
the location of the installed module needs to be set in the PYTHONPATH
environment variable.
For example:
export PYTHONPATH="/usr/lib/python3.7/site-packages/:$PYTHONPATH"
With this setup, Arbor’s python module arbor
can be imported with python3 via
>>> import arbor
Simulation steps¶
The workflow for defining and running a model defined in Simulations can be performed in Python as follows:
Describe the neuron model by defining an
arbor.recipe
;Describe the computational resources to use for simulation using
arbor.proc_allocation
andarbor.context
;Partition the model over the hardware resources using
arbor.partition_load_balance
;Run the model by initiating then running the
arbor.simulation
.
These details are described and examples are given in the next sections Common Types, Recipes, Domain Decomposition, Simulations, and Metering.
Note
Detailed information on Arbor’s python features can also be obtained with Python’s help
function, e.g.
>>> help(arbor.proc_allocation)
Help on class proc_allocation in module arbor:
class proc_allocation(pybind11_builtins.pybind11_object)
| Enumerates the computational resources on a node to be used for simulation.
|...