Skip to content
Snippets Groups Projects
  1. Dec 12, 2022
    • boeschf's avatar
      Sde Tutorial (#2044) · abbf6bbd
      boeschf authored
      Implementation of stochastic calcium plasticity curves, originally
      authored by Sebastian Schmitt @schmitts, and adapted here for Arbor
      inclusion.
      - python example plasticity_stdp.py
      - stochastic mechanism calcium_based_synapse.mod
      - tutorial
      
      Closes #1987
      abbf6bbd
  2. 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
      9797403e
  3. 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
      b63cca1c
  4. 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
      eaddc738
  5. 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.
      1b268ecf
  6. Oct 13, 2022
  7. Oct 05, 2022
  8. Sep 27, 2022
  9. 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
      04762cf2
  10. Sep 06, 2022
  11. Aug 09, 2022
  12. Jun 23, 2022
  13. Jun 21, 2022
    • 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 
      4a305b4f
  14. Jun 14, 2022
  15. 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 
      de06afa2
  16. 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
      675fdbc9
    • Thorsten Hater's avatar
      Add documentation on faster NMODL. (#1840) · 03f5d30a
      Thorsten Hater authored
      Half-half dev and user docs on NMODL optimisation. Actually apply that advice in hh.mod
      03f5d30a
  17. Jan 24, 2022
    • Thorsten Hater's avatar
      More robust build-catalogue (#1784) · d0dc6bd7
      Thorsten Hater authored
      - build-catalogue
        - now installed by pip
        - enable GPU-backends
        - isolate from being installed in a non-default dir
        - rename to arbor-build-catalogue
        - allow hand-written C++ mechanisms to be linked in the same catalogue.
      - CMake
        - enable PIC on arbor always to allow linking to shared objects
        - use relative paths when configuring a-b-c, to make relocation less of a problem
      - Python
          - ensure a-b-c is installed by pip, along with headers and libarbor.a
          - throw errors if tools (cmake scripts, arbor package, modcc) missing
          - transition setup.py setuptools -> skbuild.
      - Wheels
          - Add NML2 support to wheels
          - scripts/build-wheels.sh builds wheels, in principle valid for submission to PyPI, on your own hardware. This should be kept in sync with .github/workflows/ciwheel.yml
          - scripts/patchwheel.py corrects the rpath in the libraries in the wheels, working around a bad interplay between auditwheel and skbuild, see pypa/auditwh...
      d0dc6bd7
  18. Oct 22, 2021
    • Nora Abi Akar's avatar
      Gap Junction mechanisms (#1682) · dc371e5d
      Nora Abi Akar authored
      Adds support for user-defined gap junction mechanisms. Fixes #1600.
      
      - API Change: Wrap `mechanism_desc` in one of `density`, `synapse`, `junction` to be able to differentiate the kind of placed mechanism between point and junction mechanisms. 
      - API Change: The `ggap` parameter of a `gap_junction_connection` renamed to `weight` and is not a unit-less parameter. 
      - Mechanism ABI change: New `peer_index` vector which stores the indices of the peer sites of a gap-junction-connection. New mechanism kind. 
      - Internal API change: `shared_state` no longer controls the gap junction current contribution, that is now handled in the mechanism callbacks.
      - Modcc change: Add `JUNCTION_PROCESS` and `v_peer` keywords to nmodl, the first to identify a gap-junction mechanism, the second to access the peer voltage of a gap-junction connection. Modify modcc to be able to compile nmodl and generate correct code.
      - Behavior change: gap-junctions now contribute to both the current and co...
      dc371e5d
  19. Jul 29, 2021
    • thorstenhater's avatar
      Implement mechanism ABI · ff12bb82
      thorstenhater authored
      Implements #1376.
      
      * Provide a common C linkage ABI for externally compiled mechanisms, for both CPU and GPU.
      * Remove mechanism type hierarchy (`concrete_mechanism` etc.), and move corresponding functionality to the back-end shared state objects. Mechanism catalogue is no longer indexed by type id.
      * Distinguish between SIMD optimal alignment and SIMD width with new `min_align` attribute. Mechanisms provide both pieces of information via ABI.
      ff12bb82
  20. Jul 02, 2021
    • Nora Abi Akar's avatar
      Compile all arbor source files with `-fvisibility=hidden` (#1599) · 5c5fd641
      Nora Abi Akar authored
      The visibility of symbols in the python shared library is set to 'hidden'. However, examining the dynamic symbol table of the generated `.so` file revealed that all the symbols of the static arbor libraries are still visible. This causes some issues on the Mac M1. To resolve, all source files are now compiled with `-fvisibility=hidden`.
      5c5fd641
  21. Jun 23, 2021
    • Benjamin Cumming's avatar
      Add optional target-specific configuration for CMake (#1586) · bcd2ca1e
      Benjamin Cumming authored
      - Add an optional CMake option `ARB_CXX_FLAGS_TARGET` for setting target-specific flags to use when compiling for the target architecture (not applied to compilation of modcc).
      - If `ARB_ARCH=="none"` CMake will not add architecture-specific `mtune/march/mcpu` flags
      - Remove `ARB_CXXOPT_ARCH` from the installed `arbor-config.cmake`, and replace with more general `ARB_CXX_FLAGS_TARGET`.
      - Update spack `package.py` to use this feature to pass custom flags.
      
      Fixes #1519
      Fixes #1522 
      
      Replaces PR #1518 
      bcd2ca1e
  22. Apr 22, 2021
  23. Feb 25, 2021
  24. Feb 19, 2021
  25. Feb 15, 2021
    • thorstenhater's avatar
      Make `pas/e` GLOBAL instead of RANGE (#1372) · 95b38462
      thorstenhater authored
      - Make reversal potential `e` a global parameter of `pas` to avoid inconsistency 
        (reversal potential is represented by a RANGE parameter, despite it not being a conductance multiplier see #1052)
      - Adjust default value of `e` to -70mV (as in Neuron)
      - Streamline docs,  which use `passive`, `el`, and `gl` instead of `passive`, `e`, and `g`.
      
      Closes #1052
      95b38462
  26. Feb 11, 2021
  27. Feb 03, 2021
    • thorstenhater's avatar
      Allow dynamically creating and loading of mechanism catalogue (#1287) · aa1b6f04
      thorstenhater authored
      First phase of dynamically loaded mechanism catalogues.
      
      - Add functionality to load and use catalogues from DSOs in Python and C++.
      - Add documentation and support scripts to build catalogues DSOs.
      - Re-factor CMakeLists.txt for mechanisms
      - Limitations
        - Needs (compatible, preferably identical) arbor sources when building catalogues
        - Can only work on MacOS and Linux (uses dlfnc)
      aa1b6f04
  28. Nov 06, 2020
  29. Oct 14, 2020
  30. Oct 09, 2020
  31. Aug 05, 2020
    • Brent Huisman's avatar
      Py3fixes (#1103) · 1be81105
      Brent Huisman authored
      The tiniest of fixes: mechanisms/generate_catalogue had a bang line incompatible with newer Linux platforms without python.
      1be81105
  32. Jul 13, 2020
    • 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.
      6151e173
  33. 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. 
      7fe3141d
  34. Jun 24, 2020
  35. May 15, 2020
  36. Apr 15, 2020
    • Nora Abi Akar's avatar
      Compile arbor for AMD and Nvidia GPUs using clang (#1007) · 90a1e6d7
      Nora Abi Akar authored
      - Add option to compile Arbor for HIP/CUDA backend using Clang. 
      - Add new CMake option `ARB_GPU_COMPILE_TYPE` to distinguish between three possible gpu platforms/builds: `cuda-nvcc`; `cuda-clang`; `hip-clang`
      - Add gpu wrapper functions in `arbor/backends/gpu/gpu_api.hpp` and `arborenv/gpu_api.hpp` which call HIP/CUDA functions depending on the platform
      - Rename functions and files: cuda -> gpu
      - Add downgraded warp primitives for HIP
      - Implement `uuid` workaround for HIP
      - Set correct alignment and warp size for AMD gpus
      - Update installation guide and docs.
      - Update pip/setuptools to support new gpu targets
      
      Fixes #833
      90a1e6d7
  37. Apr 02, 2020
    • thorstenhater's avatar
      Move q10 calculation to initialisation. (#999) · f5567d2a
      thorstenhater authored
      Pull out a constant computation from the update function to the initialisation step in the HH mechanism. In the busyring benchmark with hh/pas swapped this results in an overall speed-up
      of roughly 20%.
      f5567d2a