Skip to content
Snippets Groups Projects
  1. Oct 23, 2019
  2. Oct 22, 2019
  3. Oct 04, 2019
  4. Oct 02, 2019
    • akuesters's avatar
      Python wrapper: thread safe recipe (#882) · f30c4204
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Ensure that errors in Python callbacks that are called from multithreaded C++ code propogate the correct Python error back to the parent Python callback site, and that no callbacks are called from other threads if an error has already ocurred.
      - protects each recipe callback with a mutex, stores python exception, catches and throws python exception if occured
      - methods calling recipe (in simulation and partition_load_balance) are protected as well by try catch, resets and rethrows python exception (if occured) or else throws C++ exception
      
      fixes #792
      f30c4204
    • Nora Abi Akar's avatar
      Expose CV diam to mechanisms (#880) · 37d03975
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Sets the diameter of a CV as the diameter at the middle of a CV
      Exposes the diameter in `shared_state` and `mechanism`
      Adds support in modcc to treat `diam` as a special parameter 
      Implements unit tests
      
      Fixes #850 
      37d03975
    • Sam Yates's avatar
      CV policies with unit tests. (#878) · 755f8b6f
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      * Add new `cv_policy` class that wraps classes derived from `cv_policy_base`, which in turn provide a facility for producing CV boundaries on morphology trees from a `cable_cell`.
      * Implement fixed-CVs-per-branch and maximum-CV-length policies, with flags that allow for single-CV oots and for CVs that terminate at fork points or which are centred on fork points.
      * Expose locset `join` expressions.
      * Add `empty()` test method on `morphology`.
      * Expose branch length on `em_morphology` via member function.
      * Account for the length of a spherical root branch in `em_morphology`.
      * Test for validity but do not canonicalize locations when thingifying.
      * Rename `root_sample_has_same_tag_as_child` to `root_sample_tag_differs_from_children` to better reflect sense of test.
      * Add unit tests for CV policies, branch_length method.
      755f8b6f
  5. Oct 01, 2019
  6. Sep 30, 2019
  7. Sep 25, 2019
    • akuesters's avatar
      Python feature probes and samples (#872) · 8e985d40
      akuesters authored
      Adds
      
      * to `recipe.cpp`: 
      `num_probes` and `get_probe` with helper function `cable_probe(kind, id, location)`
      * `sample.cpp`: 
      `sample` type with attributes `time` and `value`; a `sampler` with `samples()` and `clear()` and helper functions `attach_sampler(sim, dt)` for adding all probes as well as `attach_sampler(sim, dt, probe_id)` for adding one probe
      * `morphology.cpp`: 
      `location` as `arb::mlocation` with `branch` and `position` 
      * corresponding docs and example
      * update to new cable cell semantics in c++ validation test
      
      fixes #762
      8e985d40
  8. Sep 23, 2019
    • Benjamin Cumming's avatar
      Cable cell (#865) · aaa42b77
      Benjamin Cumming authored
      WIP on implementation of new cable cell API.
      
      * Hide implementation and state using PIMPL
      * Add consistent `place` methods for adding synapse, stimuls, gap junction site and spike detectors to `cable_cell`.
      * Add default constructor for `region` and `locset` that create empty `nil` instances.
      aaa42b77
  9. Sep 16, 2019
    • Sam Yates's avatar
      Address Clang 8 warnings. (#867) · 12150544
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      * Remove or implement move ctor/assign operations for ostream-derived classes.
      * Add explicit test for a zero row in modcc's sparse and linear solver finalize routines.
      * Forward declare `morphology_impl` as a struct.
      * Remove redundant capture in a lambda expression in fvm_layout.cpp.
      * Add extra parens in an assign-and-test condition in mechcat.cpp.
      12150544
  10. Sep 10, 2019
  11. Sep 09, 2019
    • Benjamin Cumming's avatar
      Morphology part 2. (#860) · 80763b22
      Benjamin Cumming authored
      * Add new "embedded morphology" `em_morphology`, constructed from a `morphology`, that: caches derived information such as terminal points, locations of sample points, branch lengths; provides services for canonicalizing locations and interpolation; and is used for the realisation of regions and locsets (see below).
      * Add simple DSL for describing locsets and regions, which are abstract descriptions of sets of locations and regions on morphologies, together with a set of operations.
      * Add a new class `label_dict` that associates names with regions and locsets.
      * Extend `cable_cell` to hold a `label_dict` argument, which is used by a new method `paint` for associating mechanisms with regions.
      
      Fixes #845.
      80763b22
  12. Sep 02, 2019
    • Nora Abi Akar's avatar
      Modcc compartment (#846) · efe17c53
      Nora Abi Akar authored
      * Adds modcc support for COMPARTMENT statements of the form: `COMPARTMENT v {state_0, state_1, ..., state_n}`.
      * Use `COMPARTMENT` values `v` to multiply the derivative of state variables `state_0, state_1, ..., state_n` in associated kinetic scheme blocks.
      
      Fixes #838.
      efe17c53
  13. Aug 29, 2019
  14. Aug 26, 2019
  15. Aug 21, 2019
    • Nora Abi Akar's avatar
      modcc: parse and process `LINEAR` blocks (#840) · 336c0574
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add support for parsing and processing `LINEAR` blocks: 
      
      Changes: 
      * `SOLVE` expressions can be called from inside an `INITIAL` block, but only if they are solving a linear system
      * Tilde expressions can now be either linear expressions or reaction expressions
      * Linear expressions need to be rewritten before being sent to the solver, this is done using `LinearRewriter`
      * The linear system is setup in `LinearSolverVisitor` fills the lhs and rhs of the symbolic matrix   
      * The matrix is recued using `gj_reduce`, which now works on non-diagonal matrices. 
      
      Fixes #839 
      336c0574
  16. Aug 19, 2019
  17. Aug 16, 2019
    • akuesters's avatar
      Python wrapper: add hint_map to domain decomposition (#827) · 953d5007
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      - wraps `partition_hint` struct for python
      - `partition_hint`struct in `load_balance.hpp` is adjusted in a way that in case of zero unsigned int `cpu_group_size`/`gpu_group_size` it is set to the default value (via setter/getter)
      - adds documentation for `partition_hint`  
      - adds testing for `domain_decomposition` including `partition_hint` (in unit and unit_distributed)
      - adds `partition_hint` in example `ring.py`
      - corrects `config.cpp` (and doc) to test for `ARB_GPU_ENABLED` instead of `ARB_WITH_GPU`
      
      Fixes #776 
      Addresses #799, #769
      953d5007
  18. Aug 15, 2019
    • Nora Abi Akar's avatar
      modcc: process `CONSERVE` statements in `KINETIC` block (#829) · fdd9e7ee
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add modcc support for processing `CONSERVE` statements in `KINETIC` blocks.
      
      The `KineticRewriter` remains unchanged. The `SparseSolverVisitor` is modified. 
      If one or more `CONSERVE` statements are present, corresponding rows in the symbolic matrix, which would otherwise represent differential equations, are replaced by the content of the conserve statements. 
      
      Addresses #828 and #830 
      fdd9e7ee
  19. Aug 12, 2019
  20. Aug 09, 2019
    • kanduri's avatar
      Removed the use of CUDA Managed Memory from GPU-Stack (#821) · 51f83b42
      kanduri authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Remove managed memory from the GPU stack data type that is used for spike collection on the GPU back end. Now the stack has explicit synchronization points, that are called from the host, for:
      * copying stack state from GPU to host memory where it can be interrogated.
      * resetting the stack state on the GPU to empty.
      
      Fixes  #810.
      51f83b42
  21. Aug 08, 2019
  22. Jul 29, 2019
    • Nora Abi Akar's avatar
      Add CONSTANT block support for modcc (#825) · 74616108
      Nora Abi Akar authored
      Addresses #824.
      
      * Add modcc support for `CONSTANT` blocks in NMODL, subject to the following constraints:
          - Any identifier declared in the `CONSTANT` block may only be used after that declaration (including within the `CONSTANT` block itself).
          - Units in the `CONSTANT` block are parsed but not processed.
          - Values assigned to identifiers inside the `CONSTANT` block may only be signed numeric literals, or an already declared constant, possibly preceded by unary minus.
      74616108
    • Sam Yates's avatar
      New revpot and per-cell/segment parameters. (#823) · fd4f4def
      Sam Yates authored
      * Collect cable cell parameter setting structures into `include/cable_cell_param.hpp`.
      * Restructure electrical specifications (axial resistance, membrane capacitance) and ionic concentrations and reversal potentials on cable cells, so that these can be specified with a global default, per-cell defaults, and per-segment values.
      * Allow reversal potentials to be set by a mechanism of a new kind 'revpot', which are prohibited from maintaining state or writing to any shared state other than ionic reversal potentials.
      * Specify reversal potential mechanisms as global defaults or per-cell. Reversal potential mechanisms may not be specified at the level of a segment in order to avoid non-linearities arising from the discretization.
      * Supply default cable cell parameter data that matches NEURON values (this is _not_ used by default).
      * Replace the d_lambda calculation with one that approximates more faithfully the effect of tapered segments, and which will use the electrical values inherited by cell or global defaults.
      * Supply a bundled mechanism 'nernst' that replaces the previous hard-coded Nernst potential calculation, for use (together with ion rebinding) in the new ion description scheme.
      * All ions used in a cable_cell model must be present in the top level global parameter table, together with their charge.
      * Extend semantics of external variables in modcc, to permit direct assignment (as opposed to just += or -=.)
      * Extend `util::binary_search_index` to allow for a projection functional analagous to other range utilites.
      * Add documentation on the cable cell API, sketching over many of the details, but describing in particular the interface changes for default parameters and reversal potential behaviour.
      * Adjust pyarb for new API
      * Hard code global cable cell properties in the python recipe shim to useneuron default parameters.
      fd4f4def
  23. Jul 15, 2019
    • Nora Abi Akar's avatar
      Make the soma a separate CV (#816) · 7a6c15f5
      Nora Abi Akar authored
      Addresses issues #814 and #815.
      * Change the discretization so that a spherical soma comprises its own CV.
      * Modify the `div_compartment_integrator` to accommodate the single CV soma, adjusting the discretization of the most proximal branches, adding a half-size CV attached to the soma, so as to leave the remainder of the discretization the same.
      * Rename the confusing `ncomp` to `ncv` inside the discretization code.
      7a6c15f5
  24. Jul 10, 2019
    • Sam Yates's avatar
      Implement implicit derivation of mechanisms. (#817) · 54b6b68c
      Sam Yates authored
      Implement implicit derivation of mechanisms.
      
      * When a mechanism of the form "foo/param=value,..." or "foo/newion" is
      requested from a mechanism catalogue, attempt to perform a derive the
      information or override set from the mechanism "foo" using the given
      global parameter settings and/or ion remappings given in the name.
      * Split mechanism catalogue implementation into a private catalogue
      state with non-throwing behaviour and without any implicit mutation,
      with mechanism_catalogue methods responsible for throwing any generated
      errors, with the aim of avoiding throw/catch in expected program flow.
      
      Implements #807.
      54b6b68c
  25. Jul 05, 2019
  26. Jul 03, 2019
    • akuesters's avatar
      Python wrapper: profiler (#796) · 92620aa3
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Wraps the `meter_manager` with
      - the constructor
      - `start(ctx)`
      - `checkpoint(name, ctx)`
      - `checkpoint_names`
      - `times`
      
      and the `meter_report` with
      - `make_meter_report(meter_manager, ctx)`
      
      Fixes #765
      92620aa3
  27. Jul 02, 2019
    • akuesters's avatar
      Python wrapper: documentation (#799) · 1f4eacd2
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add docs for Python wrapper to ReadTheDocs:
      
      - Overview, Common Types, Hardware Management, Recipes, Domain Decomposition, Simulations, Metering
      - Installing Arbor: Optional Requirements (Python), Buidling and Installing (Python Frontend), and Installation (Python Module)
      
      Missing (, since not implemented yet): 
      
      - probes
      - arbor-sup 
      - hint maps in domain_decomposition
      - reset, events, empty schedule in event_generator
      Also does not cover unit testing (since doc is user-centric).
      
      Makes also defaults and units in wrapper consistent.
      
      Fixes  #766
      1f4eacd2
    • Nora Abi Akar's avatar
      pass correct index to simd procedure calls (#805) · 74df9f5a
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add missing check of whether to use direct or indirect indexing for simd procedure calls.
      
      fixes #804
      74df9f5a