{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Ball and stick 4: Parallel vs serial mode" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is the final part of the series where we build a multicompartment cell and evolve it into a network of cells running on a parallel machine (which is basically all computers made within the last decade). On this page, we translate the classes we have previously constructed so that they operate in either a parallel or serial mode." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Note:** If you followed the [installation instructions](../install/install_instructions.html) on the NEURON website, you should have everything you need to run parallel simulations.\n", "If not, if you do not already have an MPI installation, go to that link and follow the instructions related to MPI.\n", "If you compiled NEURON yourself instead of using an installer (this is rarely necessary), this part of the tutorial requires you to have used the `-DNRN_ENABLE_MPI=ON` flag at configure time." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Parallel communication in NEURON" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Parallel communication takes place via logical events in network connection objects known as [NetCon](../python/modelspec/programmatic/network/netcon.html).\n", "NetCon sources are threshold detectors. They monitor some variable, say the membrane potential of a cell, and when the variable reaches some threshold, it triggers an event sent to the targets. Targets are frequently synapses on other cells. When they receive the event, they activate.\n", "\n", "In a parallel context across several machines, communication between hosts can be computationally inefficient when the frequency of events is high and when the message being sent is large. NEURON uses an efficient priority queueing mechanism to deliver events to targets after the delay specified by the NetCon. The message passed is succinct. It is an integer, the unique global identifier (gid) of the source.\n", "The following two figures illustrate these ideas and come from [Hines M.L. and Carnevale N.T, Translating network models to parallel hardware in NEURON, Journal of Neuroscience Methods 169 (2008) 425–455](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2430920).\n", "Users should also consult the [ParallelContext](../python/modelspec/programmatic/network/parcon.html) reference." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "