Skip to content
Snippets Groups Projects
  1. Aug 27, 2020
    • Sam Yates's avatar
      Retrieve probe metadata from simulator object. (#1101) · 3cc73f1e
      Sam Yates authored
      * Add `get_probe_metadata` method to `simulator` that forwards probe metadata queries to appropriate cell group, via new interface method in cell group base class.
      * Replace `gid_to_local_` map in simulator implementation with a map that takes gid to local cell index _and_ local cell group index.
      * Move scheduler association map mutex into the cell group where it is being used (i.e. `mc_cell_group`).
      * Add generic (`visit`-able) interface to specifc fvm-probe types for accessing metadata via `any_ptr`.
      * Implement (override) `get_probe_metadata` method for `mc_cell_group`.
      * Use new cv policy API for LFP example discretization.
      * Use new probe metadata API to simplify LFP example sampler callback.
      * Add `on_components` locset expression that gives points a relative distance from the head of each component of a region.
      * Simplify implementation of thingification of `ls::boundary`.
      
      Fixes #1079 
  2. Aug 26, 2020
  3. Aug 20, 2020
    • Nora Abi Akar's avatar
      Expose `time` to the mechanisms (#1113) · 57394539
      Nora Abi Akar authored
      The `vec_t_` time vector is already available to the mechanisms, but not exposed. It is indexed by `cell_index` instead of directly by the `node_index` (`vec_t[vec_ci_[node_index_[i]]]`). This kind of indexing was previously unavailble. It has not been added to the printers. 
      This PR also includes some cleanup in the vectorized code printer. 
      
      Address #1109
  4. Aug 13, 2020
  5. Aug 10, 2020
  6. Aug 06, 2020
  7. Aug 05, 2020
  8. Jul 28, 2020
  9. Jul 24, 2020
  10. Jul 23, 2020
    • Harmen Stoppels's avatar
      Set the status on the commit from the PR (#1099) · 4d328ee0
      Harmen Stoppels authored
      This is copied from DLA Future. It should set the CI status on the commit from the PR instead of just on the Bors commit. This way the gitlab CI status also appears in the checks section below the PR.
    • Nora Abi Akar's avatar
      Fix python examples (#1096) · 5933b6f1
      Nora Abi Akar authored
      Fix a Python example that was out of date.
    • thorstenhater's avatar
      Gpu/restrict all the things (#1026) · 5ace929e
      thorstenhater authored
      Make all pointer arguments to kernels `__restrict__` to avoid unnecessary loads.
      
      The effect on the busyring benchmark (swapped pas -> hh) with 8192 cells on a V100 GPU (time for model-run in seconds): 
      ```
      |----------+-------|
      | Baseline | After |
      |----------+-------|
      |    2.347 | 2.268 |
      |    2.345 | 2.262 |
      |    2.321 | 2.276 |
      |    2.323 | 2.267 |
      |    2.330 | 2.249 |
      |----------+-------|
      |    2.321 | 2.249 |
      |----------+-------|
      ```
  11. Jul 21, 2020
  12. Jul 13, 2020
    • Benjamin Cumming's avatar
      flexible cable-based cable_cell representation (#1083) · 9dc8969c
      Benjamin Cumming authored
      * Remove spherical root/soma from morphology representations and logic.
      * Replace `sample_tree` with `segment_tree`, which represents sample points in pairs and allows the representation of detached branches and cable segments.
      * Remove sample point properties and predicates.
      * Remove `cv_policy_flag::single_root_cv` as somata with a single attached dendrite will have a representation in the morphology of a single branch.
      * Remove `arb::math::{volume/area}_sphere`, which are no longer being used.
      * Remove spherical root special cases from `embed_pwlin` and `place_pwlin` objects.
      * Add textual representation of `mnpos` in morphology exception text.
      * Rename `sample_tree_from_swc` to `segement_tree_from_swc` and remove any special casing for one point somata.
      * Remove `msample` and `mbranch` types.
      * Update unit tests and python wrapper to reflect the changes.
    • thorstenhater's avatar
      Python/allen catalogue (#1074) · 6151e173
      thorstenhater authored
      * Add import method for mechanism catalogues, allowing mechanisms from a second catalogue to be incorporated with a prefix, together with Python interface.
      * Expose `global_allen_catalogue`.
      * Extend unit tests to cover mechanism catalogue import and check for name collision error cases.
  13. Jul 08, 2020
  14. Jul 07, 2020
  15. Jul 02, 2020
    • Sam Yates's avatar
      Allow CV policies to be composed over subregions. (#1078) · 2e90a382
      Sam Yates authored
      * Move `cv_policy` classes to new source files.
      * Remove `cv_policy_flag::single_root_cv`.
      * Allow all supplied `cv_policy` makers to be restricted a domain specified by a region: the policy is then applied per component, with the boundary points of the completion of the components included.
      * Expose `cv_policy` domain in public interface.
      * Add `components` function for splitting an extent into disconnected components. Add comment describing what is meant by connected in this context.
      * Rename `super` region function to `complete`.
      * Add region expression functions `complement` and `difference`.
      * Add new locset expression function `boundary` which returns the extrmal points of each component of a region.
      * Add new locset expression `cboundary` which returns the extremal points of the completion of each component of the region, which is what we need to close off CVs generated by region-restricted CV policies.
      * Add locset expression `support` which returns the multiset support of the points in a locset, i.e. all points in the locset but with multiplicity one.
      * Replace hodgepodge of `join` expressions in `cv_policy` implementations with locset `support` and `sum`.
      * Inline `mcable::prox_loc` and `mcable::dist_loc`.
      * Add cv policy combinators +_and |.
      * Add `util::foldl` which acts like `std::accumulate` for ranges, except it explicitly allows mutation of the sequence, and pass the accumulation value by rvalue.
      * Add unit tests for mextent components, new locset expressions.
      * Remove spherical soma cases from `cv_policy` testing.
      * Extent `cv_policy` unit tests to cover new functionality.
      * Rejig `cv_policy` unit tests to use the morphology testing predicates.
      * Add `cv_policy` documentation to cable cell docs.
      
      Fixes #1058.
  16. Jun 25, 2020
    • Nora Abi Akar's avatar
      Refactor simd API and add SVE backend (#1044) · 7fe3141d
      Nora Abi Akar authored
      * Add new API for the SIMD library that is compatible with the ARM 'sizeless' SVE vectors. Language restrictions prevent the use of the operator overload interface used up to this point for SIMD.
      * Add `indirect_expressions` and `indirect_indexed_expressions` for describing memory reads/writes. `where_expressions` control masked access to simd vectors.
      * Implement the SVE SIMD back-end in accordance with the alternate SIMD API.
      * Retrieve vector width information from compiled mechanisms.
      * Use alternate SIMD API in modcc-generated mechanisms.
      * Add assertion in generated mechanism code that checks runtime vector width compatibility.
      
      Fixess #1021. 
    • Sam Yates's avatar
      Add LFP example/demo. (#1073) · 0c374140
      Sam Yates authored
      * Add C++ analogue to simple NEURON demo provided by LFPy project under example/lfp.
      * Add plot script for rending example output to match that from NEURON demo.
  17. Jun 24, 2020
    • thorstenhater's avatar
      Performance/copy to swap (#1027) · a316dd87
      thorstenhater authored
      Remove a redundant copy in favor of a swap operation for a gain in performance;
      especially on GPU since copies are synchronous. Similarly, instead of solving the 
      linear system into an intermediate array, write output directly into the target.
      
      Here is the effect on the busyring benchmark (swapped pas -> hh) with 8192 cells on a
      V100 GPU (time for model-run in seconds).
      ```
      |----------+--------------------------------+------------------------------------|
      | Baseline | fvm_lowered_cell: copy -> swap | matrix: solve + copy -> solve_into |
      |----------+--------------------------------+------------------------------------|
      |    2.230 |                          2.199 |                              2.129 |
      |    2.231 |                          2.209 |                              2.132 |
      |    2.225 |                          2.209 |                              2.136 |
      |    2.227 |                          2.186 |                              2.130 |
      |    2.220 |   ...
    • thorstenhater's avatar
      Allen catalogue (#1071) · a9f0b2fa
      thorstenhater authored
      Add a new catalogue comprising optimised version of some of the mechanisms commonly used in models of the Allen Cell Types Database, eg http://celltypes.brain-map.org/mouse/experiment/electrophysiology/323535089.
      This made required extending modcc to some new NMODL features, as well as to expose some optimisations.
      
      In addition clean up the default catalogue by moving test mechanisms to their proper place in the unit tests.
    • Benjamin Cumming's avatar
      Pycat (#1072) · e0c14f34
      Benjamin Cumming authored
      Update core library:
      * support derivation of named mechanisms in catalogue from a string description of the parent.
      * fix bug in radois_ge region expression that was finding region_lt.
      * fix test for radius_ge region expression
      
      Add support for mechanism, global properties and catalogue shenanigans to python wrapper
  18. Jun 23, 2020
    • Sam Yates's avatar
      Fix event_generator constructor. (#1067) · c0b1ee06
      Sam Yates authored
      * Guard `event_generator` implicit constructor with type test.
      * Fix linking error from use of `empty_generator` by replacing pointers to `no_event` with nullptr.
      * Clarify `regular_generator` semantics in comment.
      * Add unit test for checking.
      
      Fixes #1066
  19. Jun 22, 2020
    • Sam Yates's avatar
      Add place_pwlin for morphology geometry queries. (#1062) · 58c4abef
      Sam Yates authored
      * Add new `isometry` class representing a direct Euclidean isometry comprising a rotation and translation. Translations are always taken with respect to absolute coordinates, but rotations are composed with respect to intrinsic coordinates.
      * Add new `place_pwlin` class, that takes a morphology and an isometry, and answers location queries: where in space does a particular `mlocation` lie?
      * Split out (some of) the common code between `place_pwlin` and `embed_pwlin`.
      * Add equality operator to `mpoint`.
      
      This functionality is added to aid the presentation of the local field potential example.
  20. Jun 16, 2020
  21. Jun 12, 2020
    • Sam Yates's avatar
      New recipe probe API (#1054) · 8d866593
      Sam Yates authored
      * Make recipe return probes as a vector.
      * Remove `probe_id` from `probe_info`.
      * Rename `fvm_probe_info` to `fvm_probe_data` (everything was being called info, and it was getting confusing).
      * Make `probe_association_map` specific to `mc_cell_group`/`fvm_lowered_cell`.
      * Change probe_association_map representation: unordered map for probe_id -> tag; unordered multimap for probe_id -> fvm_probe_data. This allows multiple probes to be associated with the same probe id.
      * Call sampler callback separately for each probe with the same probe_id.
      * Replace location-based probes with locset equivalents.
      * Add index for probes sharing a probe id.
      * Bundle all probe metadata (id, tag, index, probe-specific meta) into `probe_metadata` struct for passing to sampler callbacks.
      * Change simple_sampler to work on `trace_vector`, a vector of `trace_data`. The _i_th element is the data from probe with index i.
      * Consolidate hash composition and `std::hash` specialization code in new header.
      * Update python lib for new API.
      * Update tests and examples for new recipe, internal probe, and simple_sampler APIs.
      * Update docs to suit.
  22. Jun 04, 2020
  23. May 28, 2020
  24. May 26, 2020
    • Sam Yates's avatar
      Implement exact sampling for cable cells. (#1046) · d8893d9b
      Sam Yates authored
      Fixes #1037. 
      
      * Add fake unmatchable spike events to event queue for each exact sample request, so that integration boundaries align with exact sample times.
      * Update probe-demo for exact sampling.
      * Add copy assignment for `cable_cell`.
      * Extend max args for ARB_PP_FOREACH to 20.
      * Add unit test for ARB_PP_FOREACH.
      * Use ARB_PP_FOREACH to instantiate backend-specific probe unit tests. This also fixes the GPU probe tests that were using multicore backend.
      * Add unit test that exercises exact sampling requests combined with regular events in a gap junction context.
    • Harmen Stoppels's avatar
      Add codecov reports as part of CI (#1020) · 68133f73
      Harmen Stoppels authored
      This is a bit experimental. It builds arbor with `-fprofile-arcs -ftest-coverage` and creates a docker image with just the project binaries, lcov, gcov and generated `.gcno` files. This should still be reasonably small since there are no object files etc. When run on daint, `.gcna` files are produced (should be thread / process safe according to gcc's manual) inside of the container, and `lcov` is used to combine all those things into a single file with a random name in the mounted git project folder (hopefully this solves clashes with multiple nodes). After all tests are run, the combined reports are uploaded to codecov.io.
  25. May 22, 2020
    • Sam Yates's avatar
      Extend cable cell probe variety. (#1034) · b2e5d1f0
      Sam Yates authored
      Fixes #589 and #730, providing cell-wide probes and a correct total trans-membrane current.
      Fixes #822, providing spatial interpolation of membrane voltages as governed by cable resistivity and diameter.
      
      * Add partition of point mechanism target vector by cell index to `fvm_mechanism_config`.
      * Fix sign error in axial current interpolation.
      * Replace `fvm_probe_info` with class that wraps a variant type capturing one of a set of backend-cellgroup probe translation representations: `fvm_probe_scalar`, `fvm_probe_interpolated`, `fvm_probe_multi`, `fvm_probe_weighted_multi`, `fvm_probe_membrance_currents`.
      * Refactor `fvm_lowered_cell_impl::resolve_probe_address` so that it avoids the long chain of if-else tests on wrapped `any` type with an invocation of `util::any_visitor`. Each specific cable cell probe address representation is translated into one of the intermediate `fvm_probe_info` variants via an overload of `resolve_probe`.
      * Add new non-scalar cell probe address types for all-of-cell values, including point mechanism state, density mechanism state, ion currents and concentrations, membrane voltage by CV cable, and total trans-mebrane currents. The latter are ultimately calculated by computing the net axial current fluxes in each CV.
      * Add `util::any_ptr` field to the sampling function interface, pointing to constant-per-simulation-run metadata associated with a probe address. Underlying metadata type varies between probe types.
      * Extend `simple_sampler` so that it optionally captures sampler metadata.
      * Add special case to `simple_sampler` for vector-valued sample data, allowing it to translate from a pointer-pair range to a std::vector.
      * Fix minor bugs in `util::variant`.
      * Add to `mc_cell_group` the logic for translating each intermediate probe representation to a sampler callback invocation, reusing temporary scratch vectors across calls.
      * Add unit comments to `embed_pwlin_data`.
      * Add probe variety demonstration `probe-demo` to examples, covering most of the new cable cell probe classes.
      * Add `util::any_visitor` runtime-type dependent dispatcher class.
      * Add `util::overload` helper for generating overloaded functional objects from individual functions, lambdas or functionals.
      * Extend probe unit tests in `test_probe.cpp` to cover new probe address types.
      * Add unit tests for `any_visitor` and `overload`.
    • Nora Abi Akar's avatar
      Travis CI arch bug fix (#1045) · 9b772f07
      Nora Abi Akar authored
      Travis CI is failing on some simd tests for `ARB_ARCH=native`
      GCC appears to be setting incorrect flags in the Travis environment for `-march=native`. Using `-march=skylake-avx512/haswell/etc` fixes the errors. 
  26. May 20, 2020