Skip to content
Snippets Groups Projects
  1. Apr 02, 2020
    • Hannes Vogt's avatar
      Add Gitpod setup (#996) · 4286a713
      Hannes Vogt authored
      A support for Gitpod.io, a free automated
      dev environment that makes contributing and generally working on GitHub
      projects much easier. It allows anyone to start a ready-to-code dev
      environment for any branch, issue and pull request with a single click.
  2. Apr 01, 2020
  3. Mar 31, 2020
  4. Mar 30, 2020
    • Nora Abi Akar's avatar
      Fix warning (#992) · 515cebf1
      Nora Abi Akar authored
      Fix warning generated when `delay` and `weight` were accidentally swapped in #984 
      Match `cell_connection` delay type to `connection` delay type
  5. Mar 27, 2020
    • Nora Abi Akar's avatar
      Fix mech_vec (#987) · 5228512f
      Nora Abi Akar authored
      Fixed `mech_vec` to work with new API and re-enabled the benchmark. Had to disable some of the tests because of long run-times (function responsible for slow-down is `cv_geometry::location_cv`, called from `fvm_layout.cpp:721` and is probably related to unrealistically large cv counts). 
    • Nora Abi Akar's avatar
      optimize model-init runtime (#985) · 27ff4163
      Nora Abi Akar authored
      `model-init` run-times have been observed to be too high when running systems with many synapses.
       
      The main culprit is the `sort_by` function (fvm_layout:723). When testing on a model with 1024 cells and 10000 synapses, 65% of model-init is spent in this function. 
      
      Comparing two `std::map<std::string, double>` is really expensive. We can replace the string map `synapse_instance.param_value` with a sorted `std::vector<std::pair<unsigned, double>>`, and have an additional `std::map<std::string, unsigned> param_map`  to keep track of all the param_name -> unsigned mappings.
      
      `model-init` run-time is 2.5x faster (tested on my 4 core  i7-7600U laptop):
      ```
      10000 synapses/cell 
      --------------------------------------------------------------------
      |  num cells       | model-init before  (s) | model-init after (s) |
      --------------------------------------------------------------------
      |       1024       |          12            |       5              |
      |       2048       |          25.5          |       10.8           |
      |       4096       |          55.5          |       23.2           |
      |       8192       |          121.8         |       49             |
      --------------------------------------------------------------------
      ```
    • Nora Abi Akar's avatar
      bug fix: fine matrix solve · 6008f78b
      Nora Abi Akar authored
  6. Mar 25, 2020
  7. Mar 24, 2020
    • Nora Abi Akar's avatar
      execution_context in unit tests (#983) · 9e0aff1b
      Nora Abi Akar authored
      * Provide GPU aware `execution_contexts` to unit tests that run on the GPU.
      * Provide multithreaded `execution_contexts` to unit tests that use `thread_private_spike_store`.
      * Provide multithreaded `execution_contexts` to unit tests in `test_fvm_lowered.cpp` as a means to test the parallel implementation of `fvm_lowered_cell_impl::initialize`.
      
      Addresses #982
    • Nora Abi Akar's avatar
      time_type = double (#984) · d04f39fc
      Nora Abi Akar authored
      * Change `time_type` to `double` to support time-step accuracy in longer running simulations.
      * Change connection delay to `float` from `time_type` in order to avoid unnecessary memory overheads.
    • Nora Abi Akar's avatar
      Remove TCLAP (#981) · 321a5a24
      Nora Abi Akar authored
      * Replace TCLAP with tinyopt, remove TCLAP from `ext/`.
      * Replace `sup/tinyopt.hpp` with copy of external tinyopt, update use of `tinyopt` in unit tests and examples to suit.
      * Use tinyopt's 'smallopt' interface in `modcc`, `brunel` example.
      * Update tinyopt interface in `single` example.
       Fix our attributions and add HBP acknowledgement
      
      Addresses #557 #695 #803 
  8. Mar 16, 2020
  9. Mar 11, 2020
    • Sam Yates's avatar
      Implement mextent representation for concrete regions (#978) · ae7e95d2
      Sam Yates authored
      Use a wrapper `mextent` around an `mcable_list` with a stronger invariant for the representation of thingified regions, with public intersection and union and intersection-testing operations. Creation of an `mextent` requires a morphology, but any further operations on one do not.
      
      * Implement `mextent`, wrapping an `mcable_list` and enforcing an invariant: all cables on the same branch are distinct; and there is a cable in the extent for every branch that intersects with the region on the morphology tree described by the cable list.
      * Recast region union and intersection operations on regions in terms of `mextent` objects.
      * Use `mextent` objects as the concrete representation for regions in `mprovider`.
      * Modify region/locset expression implementations to accommodate new representation.
      * Add `region` ctors that wrap an explicit cable list or `mextent`.
      * Add a lazy range-based merge view in `util/mergeview.hpp`.
    • Nora Abi Akar's avatar
      fix examples (#979) · 01548527
      Nora Abi Akar authored
      Remove cell_stats from gap junction, dry run and ring examples.
      
      Fixes #962
  10. Feb 28, 2020
    • Benjamin Cumming's avatar
      pip / setuptools support (#977) · 45885c22
      Benjamin Cumming authored
      Add a `setup.py` for installing Arbor directly with pip/setuptools.
      
      Implement a setuptools extension for CMake in `setup.py`. To be honest, I don't understand entirely how it works, but setuptools is obtuse enough that I don't feel at all guilty about this.
      
      Define additional flags for optionally enabling GPUs, MPI, Vectorization and micro-architecture targets, for more adventurous users.
      
      The documentation is updated with a "howto pip" for more casual users who don't want anything to do with CMake.
      
      Fixes #958 .
  11. Feb 26, 2020
  12. Feb 25, 2020
    • Sam Yates's avatar
      Permit size_t to be unsigned int for MPI. (#976) · fb5d4ea7
      Sam Yates authored
      * Amend `size_t` type check in `mpi.hpp` to support 32-bit builds.
    • Nora Abi Akar's avatar
      Fix neon flag (#975) · ec60bcc1
      Nora Abi Akar authored
      Replace deprecated `__ARM_NEON__` preprocessor define with `__ARM_NEON`, which should be defined by the compiler provided `ARB_ARCH` is set correctly, e.g. with `-DARB_ARCH=armv8-a+simd `
    • Benjamin Cumming's avatar
      More robust Python installation (#971) · b43cd07e
      Benjamin Cumming authored
      Improve the Python wrapper generation and installation:
        - install a proper module that can be extended with Python code;
        - give the user more control over where to install the module (e.g. as a user package or in a virtualenv).
      
      During building, the following sub-directory is built in the build director (`CMAKE_BINARY_DIR`)
      ```
      └── python
          └── arbor
                  ├── __init__.py
                  ├── arbor.so
                  └── VERSION
      ```
      This path can then be copied VERBATIM to the target installation path. By default this will be in `CMAKE_INSTALL_PREFIX/lib/python%d.%d/site-packages`.
      An additional CMake parameter `ARB_PYTHON_PREFIX` can be used to specify an alternative destination for installing the Python module.
      
      The Python part of the wrapper, implemented in `__init__.py` is currently very limited, only providing `__version__` and `__config__` variables.
      
      The installation guide was updated to cover the Python installation.
  13. Feb 24, 2020
  14. Feb 23, 2020
  15. Feb 19, 2020
    • Benjamin Cumming's avatar
      ability to query cable_cell for cable segments that define a region (#961) · f12f934f
      Benjamin Cumming authored
      Add `cable_cell::concrete_region(region)` method that returns a the cable segments in a region.
      
      This is required by the Arbor GUI #953 so that it can illustrate regions (and locsets) defined by users on a concrete cell morphology.
      
      Note that the `concrete_region` and `concrete_locset` interfaces will need to be extended with random number seed information when we add full support for that, but shouldn't need to be replaced or changed otherwise.
      
      Fixes #960.
  16. Feb 11, 2020
    • Nora Abi Akar's avatar
      Modcc: modify semantic passes (#932) · 6e2be21b
      Nora Abi Akar authored
      - Reset the error of the semantic pass of an expression at the start of the function call. 
      - Check the errors of sub-expressions after applying to them their semantic passes, and report errors if found. If the error could disrupt the rest of the original semantic pass, return.
      - Check errors in functions/procedures before and after inlining, but not during. 
      
      Fixes #931 
    • Benjamin Cumming's avatar
      enable locset names for probe sites in single cell model. (#955) · ec1f7520
      Benjamin Cumming authored
      Use locset names to set probe sites in single cell model.
      
      1. Extend C++ cable_cell interface to provide a concrete list of locations associated with a locset on the cell.
      2. Extend Python single_cell_model to allow placement of probes on locsets.
      3. Remove "debug" output in Python ring example.
      
      The single cell model maintains a trace callback for each probe location, and needs to know the explicit locations before starting the simulation. The first step is required to enumerate and record the locations associated with a locset when attaching probes.
      
      Open issues: 
      
      1. The extension to `cable_cell` won't sufficiently support locsets that rely on random number generators with global seeds (it would require passing additional meta data required to fully instantiate the locset)
      2. Enhancing the probe recipe interface to be able to associate one `probe_id` with all locations in a locset (the number of which is not specified at the time the `probe_id` is created) would support the interface implemented for the `single_cell_model`.
      
      Note: The richer interface on the C++ side will be implemented in time (see #957).
  17. Feb 06, 2020
  18. Feb 04, 2020
    • Benjamin Cumming's avatar
      Python Interface (#948) · cfad427a
      Benjamin Cumming authored
      A big update that wraps over 90% of the public C++ API, with enough functionality to let Python users to perform useful modelling.
      
      Key features
      - wrapping of cable cell functionality
        - user-defined explicit compartmentalisation not supported
      - `single_cell_model` abstraction unique to the Python wrapper that simplifies developing and testing single cell models
      - one-dimensional cell builder for Python wrapper that simplfies building cells that 
        - in and of itself limited in scope, but a very useful example of mapping a richer morphology builder onto `sample_tree`s.
      - parsing of region and location expressions from strings
        - implements a generic s-expression parser that we can use for other purposes later
  19. Feb 03, 2020
  20. Jan 30, 2020
    • Sam Yates's avatar
      Address poor fvm_cv_discretize performance. (#949) · 59df0da0
      Sam Yates authored
      * Provide (internal) locset wrapper for mlocation_list so as to avoid quadratic mlocation sum(...) behaviour.
      * Add ubench for fvm_discretize, with lmorpho-generated test SWC.
      * Rewire `cv_policy_every_sample` to produce a locset that thingifies faster.
      
      Fixes #946 .
  21. Jan 28, 2020
    • Sam Yates's avatar
      Fix error in pw_ratpoly building in embed_pwlin. (#945) · 717f7cb5
      Sam Yates authored
      * Fix '==' vs '=' error in assignment.
      * Use last element (index 2) not index 1 of parent area and ixa tile to start from on new branch.
      * Expose cross-branch consistency via point-to-point integration functions for branch length and area.
      * Extend unit tests to suit.
    • Nora Abi Akar's avatar
      Add new regions and locsets (#944) · b6d24da4
      Nora Abi Akar authored
      Extends the available locset/region expressions.
      
      * Add `distal_interval` and `proximal_interval` expressions that return a region defined by an initial locset and a distance to extend in the distal or proximal directions respectively.
      * Add `radius_lt`, `radius_le`, `radius_gt`, `radius_ge` region expressions describing the subset of the morphology with radius less than (or less than or equal to etc.) a given value.
      * Add `z_dist_from_soma_lt`, `z_dist_from_soma_le`, `z_dist_from_soma_gt`, `z_dist_from_soma_ge` region expressions describing the subset of the morphology which is less than (resp. less than or equal to, etc.) the given distance along the z-axis from the root sample.
      * Add `uniform` locset expression giving a uniformly sampled set of locations from a given region based on a supplied PRNG seed value and a closed interval [left, right] of elements from the corresponding pseudo-random sequence.
      * Add `Random123` as a library to `ext` and `util::uniform` wrapper for use in the `uniform` locset expression.
      * Add unit tests to suit.
      
      Fixes #939 
      b6d24da4
  22. Jan 24, 2020
    • Sam Yates's avatar
      Replace cable cell discretization. (#941) · b7361a1f
      Sam Yates authored
      Replace branch/cable-based cell representation and discretization with
      free specification of control volumes over the cell morphology.
      
      Implements functionality required for issues #859 and #732, and the
      reworking of inter-CV conductance computation addresses issue #635,
      although there is possible room for improvement by treating CV voltages
      as averages rather than point estimates.
      
      * Remove arbor/segment.hpp and segment-based representation in `cable_cell`.
      * Add a new discretization policy `cv_policy_every_sample` that replaces
        the `compartments_from_discretization` flag in the `cable_cell`
        constructor.
      * Remove use of `cable_cell::num_compartments()` in example code (see
        issue #940).
      * Add command line argument to `single_cell` example to specify number
        of CVs per branch.
      * Replace fvm layout `fvm_discretization` with new representation
        `fvm_cv_discretization`, which in turn wraps a `cv_geometry` object
        representing CVs as cables within cells in a cell group.
      * Provide `cv_geometry_from_ends` that produces `cv_geometry`
        discretization for a cell given a locset comprising CV boundary points.
      * Provide interface and functionality for merging discretization
        structures `cv_geometry`, `fvm_cv_discretization`, `fvm_mechanism_data`
        from multiple cells, in order to support (in the future) parallelized
        discretization across a cell group.
      * Provide complete reimplementation of `fvm_discretize(...)`.
      * Remove now redundant `arbor/fvm_compartment.hpp`.
      * Add new locset expression `on_branches`, representing a point on every
        branch at a given relative position.
      * Fix implementation bug in `pw_elements` `zip` function.
      * Add `util::equal` range-based analogue of `std::equal`.
      * Remove the compartments_from_discretization argument from cable cell
        made in python module. (Does this need to begiven a discretization policy?
        It is not clear.)
  23. Jan 23, 2020
    • Nora Abi Akar's avatar
      Modcc: Add vectorization support for conditionals (#930) · 31cae053
      Nora Abi Akar authored
      * Add support for conditionals with the SIMD printer by using `where_expresssions` to mask assignments to range variables that happen inside if/else blocks. Assignments to non-range variables are executed non-masked when correctness is ensured. 
      
      Fixes #836 
      31cae053
    • Sam Yates's avatar
      Make region/locset interface more consistent. (#943) · f4add04f
      Sam Yates authored
      * Add implicit conversions from mlocation and mlocation_list to locset.
      * Add implicit conversions from mcable and mcable_list to region.
      * Change arguments for `ls::location` to `(branch, position)`.
      * Extend unit tests to suit.
      * Make locset and region wrapping less promiscuous by demanding that
      expression implementation classes derive from locset_tag or region_tag
      respectively.
  24. Jan 22, 2020