Skip to content
Snippets Groups Projects
  1. Dec 21, 2022
    • Thorsten Hater's avatar
      Better handling of powers in modcc. (#2061) · fbd41184
      Thorsten Hater authored
      - $x^{-1} \Rightarrow 1/x\quad \forall x$
      - $x^n \Rightarrow x\cdot \dots \cdot x \quad x\in N; |x| < 5$
      - $x^n \Rightarrow 1/(x\cdot \dots \cdot x) \quad x\in N; |x| < 5; x <
      0$
      - $b^e \Rightarrow \exp(\log(b) e)\quad \forall  b, e$
      
      The last point introduces potential errors when `pow(b, e)` is allowed,
      but `log(b)` is
      undefined. These occur exactly when all of the following is true
      - $b < 0$
      - $e\in N$
      - $e$, $b$ not known at compile time (since we cover these cases before)
  2. Nov 28, 2022
  3. Nov 22, 2022
    • boeschf's avatar
      simplify make catalogue (#2042) · 9797403e
      boeschf authored
      - unit tests and some examples build their own mechanism catalogue
      - repeated logic for detecting GPUs, passing compile time flags
      - leverage the cmake variables and targets which are already there since these catalogues are internal to arbor
      - build a static library with mechanisms, which links to arbor-private-deps
  4. Nov 21, 2022
    • Thorsten Hater's avatar
      :zap: Voltage Processes (#2033) · b63cca1c
      Thorsten Hater authored
      Add the VOLTAGE_PROCESS mechanism kind to modcc, allowing for direct writing to the membrane voltage
      Obviously these are extremely sharp tools and can break the cable model, so we add some constraints to their
      use (see docs). Still, user discretion is required.
      
      As a sneak peek for what this might be useful for
      
      * implementing voltage clamps
      * limiting membrane voltage (irritatingly also a kind of clamping)
      * faking ABSTRACT_CELL like behaviour (although that might require a bit more work)
      
      Closes #1343
  5. Nov 18, 2022
  6. Nov 17, 2022
    • boeschf's avatar
      Additional builtin functions to Arbor's NMODL dialect (#2035) · eaddc738
      boeschf authored
      Added common math functions which I came across in the wild quite frequently. Implementations may be more optimized than hand-rolled versions.
      
      - sqrt: usual square root
      - step_right: right-continuous heaviside step function
      - step_left: left-continuous heaviside step function
      - step: heaviside step function with half step at 0
      - signum: sign bit function
      - extended iexpr with the step_left, step_right variants
  7. Nov 15, 2022
    • boeschf's avatar
      SDE examples (#2030) · 1b268ecf
      boeschf authored
      Addresses #1987
      
      * reproducibility test for random number generator
      * C++ example demonstrating Ornstein-Uhlenbeck process
      * Python example featuring stochastic mechanism
      * stochastic mechanism catalogue
      
      The Python example is contributed by Jannik Luboeinski's (@jlubo): https://github.com/jlubo/arbor_ou_lif_example
      and adapted to fit into Arbor.
  8. Nov 10, 2022
  9. Nov 03, 2022
    • Thorsten Hater's avatar
      Make LIF cells LIF cells again. (#2026) · 2bea825a
      Thorsten Hater authored
      - Add (again) a reset voltage E_R that for V_m = E_R in the refractory period.
      - Make V_m decay towards resting potential E_L instead of 0.
      - Adjust docs and tests accordingly.
      - Double check this against literature.
      - Explain weight, add C++ API.
  10. Nov 01, 2022
    • Thorsten Hater's avatar
      Make LIF cells probeable. (#2021) · 3106ff78
      Thorsten Hater authored
      * Functionality
        * Add probes to LIF cells.
      * Docs
        * Remove errorneous statement(s) about LIF cells (there never was an E_reset...)
        * Move probing chapter one level up (concepts/cable_cells -> concepts)
      * Tests
        * Add tests for LIF probes
  11. Oct 25, 2022
  12. Oct 20, 2022
  13. Oct 19, 2022
  14. Oct 11, 2022
  15. Oct 05, 2022
    • Thorsten Hater's avatar
      Clean up plasticity (#1985) · fc85765e
      Thorsten Hater authored
      1. Fix Python bindings for `recipe::update`
         - *drop* the GIL before handing off to C++
         - tighten exception safety
      2. Run plasticity examples with threads; both C++ and Python.
         - C++: Guard against I/O interleaving.
         - Py: Drop spikes from source, prettify reporting.
         - C++: use decor chaining.
      3. Modernise PYBIND11_OVERLOAD -> *RIDE (advised since 2.6).
      4. No longer do we initialise connectivity twice.
         - Simplify communicator construction.
         - Fix unit tests that needed to two-phase init communicator.
    • Thorsten Hater's avatar
      :squid: Never call a procedure again. (#1972) · a60fdc3a
      Thorsten Hater authored
      Inline NMODL `PROCEDURE`s into their callers.
    • boeschf's avatar
      SDE (#1884) · c976c666
      boeschf authored
      Main changes
      - uncorrelated and independently distributed white noise generation for point and density mechanisms
      - enabled by extending nmodl dialect and adjusting modcc (WHITE_NOISE block, stochastic solver method)
      - SDEs are solved by Euler-Maruyama method (synapse collapsing disabled in this case)
      - CPU and GPU backends responsible for creating random numbers using random123
      - simulation takes a seed value
      - bumped ABI due to addition of random numbers in ppack
      Incidental changes
      - builder pattern for simulation
      - pimpl idiom supported by util classes
  16. Oct 04, 2022
    • Thorsten Hater's avatar
      Optimize CPU-side solvers (#1992) · c8b2e785
      Thorsten Hater authored
      * remove storage of RHS and face-conductance in solvers
      * elide copy RHS->U and RHS->Xd respectively
        -> solve will now directly mangly U and Xd
      * fix tests accordingly
      * Introduce wrapper macro for __restrict__ to Isolate against compiler specifics.
  17. Sep 20, 2022
    • Thorsten Hater's avatar
      generate-catalogue is gone (#1975) · 04762cf2
      Thorsten Hater authored
      This is prep for meson in addition to simplifying (ie reducing) the amount of scripting
      we have. In the long run, I'd like to remove `BuildModules.cmake` too, but this might
      be superseded by meson and this PR is self-contained.
      
      # Changes
      - `modcc` accepts now a list of NMODL files
      - likewise, `modcc` is now able to spit out a catalogue.cpp file
      - remove the `generate-catalogue` script, simplify a-b-c
      - remove some options from `modcc` we never use
      - No longer allow external modcc
  18. Sep 07, 2022
  19. Sep 05, 2022
    • Thorsten Hater's avatar
      Guard against errors in linearity test. (#1964) · 8494607e
      Thorsten Hater authored
      - Print better modcc errors
      - Catch errors in symbolic diff in linearity test
      - Abort upon such errors and advise for a different solver
    • Thorsten Hater's avatar
      Remove explicit generator (#1962) · 55aac4a9
      Thorsten Hater authored
      - Remove the old, multi-target `event_generator` class in favour of `schedule_generator(tgt, weight, explicit_schedule)`
      - Much simplification ensues, `event_generator` is no longer a type-erasing container, but just what 
         `schedule_generator` was before
      - Make the label resolution in generators a bit more eager, no longer at simulation time, 
         but now during setup (bit give a wee bit of perf as well)
      
      Closes #1488 
    • Thorsten Hater's avatar
      Mutable connection table (#1919) · 07e0bb62
      Thorsten Hater authored
      Add functionality, docs, and examples on editing the connection table.  This is a first, small PR
      on the topic, further functionality will come as requested.
      
      Teaser example
      ```cxx
          // This recipe -- omitted -- implements a mutable connection table 
          // and returns it via the `connections_on` callback. New entries are
          // added using `add_connection` which makes one link from a central 
          // `spike_source_cell` to the given `gid`
          auto rec = recipe();
          rec.add_connection(1);
      
          auto sim = arb::simulation(rec, ctx);
      
          // Record spikes
          std::vector<arb::spike> spikes;
          sim.set_local_spike_callback([&spikes](const auto& s) { spikes.insert(spikes.end(), s.begin(), s.end()); });
      
          // Run and print all spikes per gid
          sim.run(0.25, 0.025);
          show_spikes(spikes);
      
          // Add a new connection
          rec.add_connection(2);
          sim.update_connections(rec);
      
          // Run and print all spikes per gid
          sim.run(0.5, 0.025);
          show_spikes(spikes);
      ```
      
      # Update July '22
      
      - added re-wiring of Event Generators
      - implemented a split between a recipe and a recipe-update (cheekily dubbed `topping` until further notice)
      - `recipes` are `toppings` via inheritance
  20. Aug 09, 2022
  21. Aug 05, 2022
  22. Aug 04, 2022
  23. Jun 30, 2022
    • Simon Frasch's avatar
      Inhomogeneous parameters (#1887) · 257e625d
      Simon Frasch authored
      Adds the ability to scale parameters of (density) mechanisms based on inhomogeneous properties along a cell.
      Two new types are added:
      - iexpr: An expression describing the scaling factor computation.
      - scaled_mechanism: A wrapper struct around a mechanisms with iexpr attached to selected parameters.
      
      Closes #1650
  24. Jun 21, 2022
    • Brent Huisman's avatar
    • Thorsten Hater's avatar
      Add some convenience to simulation creation. (#1904) · d15afd39
      Thorsten Hater authored
      Encapsulates 80% of cases:
      ```cxx
       rec = recipe()
       ctx = make_context()
       dec = partition_load_balance(rec, ctx)
       sim = simulation(rec, dec, ctx)
      ```
      is now written as
      ```cxx
       rec = recipe()
       sim = simulation(rec)
      ```
      In python we use keyword args to allow
      both to be specified separatly.
      
      Partially fixes #1862 
    • Thorsten Hater's avatar
      Ionic Diffusion along the Morphology · 4a305b4f
      Thorsten Hater authored
      # Introduction
      
      Plasticity processes are mediated by signalling ions, eg Ca++, which are generated by 
      synapses upon reception of a spike. This adds a quantity `Xd` for any ion `X`
      - initialised as `Xi`
      - read from and written to by NMODL density and point mechanisms.
      - propagates according to a diffusion law `∂_t Xd = ∂_z c X ∂_z Xd + iX/qi`.
      - in contrast to `Xi` and `Xo` there's no buffering and the update in mechanisms
        occurs atomically (and at a different time)
      
      More details can be found in the documentation.
      
      For the future there are some low hanging optimisations
      - per-ion conductivity for the matrix solver could be disabled if no diffusion is computed
      - cable and diffusion solvers store duplicates of the solver state, could be merged
      
      Closes #1651 
  25. Jun 10, 2022
    • Thorsten Hater's avatar
      Isolate external catalogues from libarbor.a. (#1837) · de06afa2
      Thorsten Hater authored
      # Changes
      - Bump ABI to v0.1.1
      - Add `arb_mechanism` to bundle `type` and `interface`s
      - Adjust `generate_catalogue` and `build_catalogue`
      - Return `nullptr` for GPU interfaces if not enabled
      
      # Open Questions
      - How to tell CMake not to link against `libarbor.a` and only use headers?
      - ~~How to get around `#ifdef ARB_GPU_ENABLED`~~ Update: just embrace it.
      
      # Linked Issues
      Fixes #1834 
  26. May 24, 2022
  27. May 05, 2022
  28. May 04, 2022
  29. Feb 24, 2022
    • boeschf's avatar
      export API (#1824) · 675fdbc9
      boeschf authored
      Exports all symbols so arbor can be compiled as set of shared libraries. 
      
      In order to export all symbols correctly, one macro per library and one global macro are added. The content of the macros is determined at configure time depending on build variant (static/shared), compiler, and platforms (linux, mac os) and goes into the library's include directory as `export.hpp` when installed (at build time it resides at cmake's temporary build directory). The per-library macro is named `ARB_LIBNAME_API` and goes in front of to-be-exported symbols. The global macro is `ARB_SYMBOL_VISIBLE`. 
      
      This PR adds the annotation in all of the places where it is required. Most of them are in the public headers (and corresponding sources) but some are also added in internal headers, which were required for the unit tests to link properly.
      
      Fixes #1752
  30. Feb 10, 2022