diff --git a/doc/install/spack.rst b/doc/install/spack.rst index 447b411a0238934d3bbbd3dc86e8307b37bb2709..c3bac85b378b962a2f13a68776422e0412a9bf20 100644 --- a/doc/install/spack.rst +++ b/doc/install/spack.rst @@ -3,9 +3,36 @@ Spack Installation =================== -`Spack <https://spack.io>`_ is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. Spack isn’t tied to a particular language; you can build a software stack in Python or R, link to libraries written in C, C++, or Fortran, and easily swap compilers or target specific microarchitectures. +Install Arbor +------------- To install Arbor using Spack, run ``spack install arbor``. -.. Note:: - To get help in case of problems, please make an issue at `Arbor's issues page <https://github.com/arbor-sim/arbor/issues>`_. +Build Options +------------- + +Arbor can be built with various options, just like the regular CMake build. For instance, to have Spack build Arbor with MPI enabled, run ``spack install arbor +mpi``. For a full overview of the build options, please refer to the `our Spack package.yml <https://github.com/arbor-sim/arbor/blob/master/spack/package.py>`_. + +Why use Spack? +-------------- + +`Spack <https://spack.io>`_ is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. Spack isn’t tied to a particular language; you can build a software stack in Python or R, link to libraries written in C, C++, or Fortran, and easily swap compilers or target specific microarchitectures. + +A powerful feature for users of scientific software is Spack's `Environment feature <https://spack.readthedocs.io/en/latest/environments.html>`_. One can define and store software environments for reuse, to generate container images or reproduce and rerun software workflows at a later time. + +Issues when using Spack +----------------------- + +On some systems initial Spack setup requires an extra step currently not shown in the up-front installations instructions of the `Spack documentation <https://spack.readthedocs.io>`_, which is adding the compilers on your system to Spack's configuration. If you don't, you may get this error: + +.. code-block:: bash + + No satisfying compiler available is compatible with a satisfying os + +The solution is to run (`as described further down in the official documentation <https://spack.readthedocs.io/en/latest/getting_started.html#compiler-configuration>`_): + +.. code-block:: bash + + ./spack compiler add + +To get help in case of problems, please make an issue at `Arbor's issues page <https://github.com/arbor-sim/arbor/issues>`_. diff --git a/doc/tutorial/network_ring.rst b/doc/tutorial/network_ring.rst index 6c650ae1ac8107222f73839d787995bc799dc5d4..25a53d95ccf52e9c6d808dfc0d3f8bb49d9ce046 100644 --- a/doc/tutorial/network_ring.rst +++ b/doc/tutorial/network_ring.rst @@ -73,8 +73,7 @@ The recipe is where the different cells and the :ref:`connections <interconnecti Step **(5)** shows a class definition for a recipe with multiple cells. Instantiating the class requires the desired number of cells as input. Compared to the :ref:`simple cell recipe <tutorialsinglecellrecipe>`, the main differences -are connecting the cells **(8)**, returning a configurable number of cells **(6)** and returning a new cell per ``gid`` **(7)** -(``make_cable_cell()`` returns the cell above). +are connecting the cells **(8)**, returning a configurable number of cells **(6)** and returning a new cell per ``gid`` **(7)**. Step **(8)** creates an :py:class:`arbor.connection` between consecutive cells. If a cell has gid ``gid``, the previous cell has a gid ``(gid-1)%self.ncells``. The connection has a weight of 0.01 (inducing a conductance of 0.01 μS @@ -108,7 +107,7 @@ Step **(11)** instantiates the recipe with 4 cells. .. literalinclude:: ../../python/example/network_ring.py :language: python - :lines: 61-111 + :lines: 61-110 The execution ************* @@ -136,7 +135,7 @@ Step **(15)** executes the simulation for a duration of 100 ms. .. literalinclude:: ../../python/example/network_ring.py :language: python - :lines: 113-126 + :lines: 111-125 The results *********** @@ -145,7 +144,7 @@ Step **(16)** prints the timestamps of the spikes: .. literalinclude:: ../../python/example/network_ring.py :language: python - :lines: 128-131 + :lines: 126-131 Step **(17)** generates a plot of the sampling data. :py:func:`arbor.simulation.samples` takes a ``handle`` of the probe we wish to examine. It returns a list @@ -157,7 +156,7 @@ It could have described a :term:`locset`.) .. literalinclude:: ../../python/example/network_ring.py :language: python - :lines: 133-141 + :lines: 133- Since we have created ``ncells`` cells, we have ``ncells`` traces. We should be seeing phase shifted traces, as the action potential propagated through the network. @@ -170,4 +169,4 @@ We plot the results using pandas and seaborn: The full code ************* -You can find the full code of the example at ``python/examples/network_ring.py``. +You can find the full code of the example at ``python/example/network_ring.py``.