Skip to content
Snippets Groups Projects
  1. May 06, 2020
  2. May 01, 2020
    • Benjamin Cumming's avatar
      clean up of region/locset implementation (#1023) · 96aae9e1
      Benjamin Cumming authored
      Add `maxset` function that returns the most distal set of locations in a location list, similar to existing `minset` function.
      
      Use `minset` and `maxset` consistently in `most_proximal` and `most_distal` locset expressions respectively.
      96aae9e1
  3. Apr 21, 2020
  4. Apr 20, 2020
  5. Apr 15, 2020
    • Sam Yates's avatar
      Voltage interpolation from CV discretization. (#1016) · 70fe8b50
      Sam Yates authored
      * Add functions for determining CVs and weights for membrane voltage interpolation and axial current determination.
      * Add unit tests for voltage interpolation and axial current interpolation.
      * Accommodate mextent changes.
      70fe8b50
    • 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
    • Benjamin Cumming's avatar
      Fix ODR in GPU unit tests and memory bugs. (#1015) · ff06934f
      Benjamin Cumming authored
      * Remove interleaved matrix solver on GPU.
      * Fix out of bound memory bug when initialising matrix for all back ends
      * fix singed-vs-unsigned comparison warning 
      
      Fixes #1014 
      Fixes #1013
      ff06934f
  6. Apr 14, 2020
    • Benjamin Cumming's avatar
      fix names of gpu probe tests (#1012) · e71d6026
      Benjamin Cumming authored
      Fix build errors for the GPU tests introduced in #1011.
      e71d6026
    • Harmen Stoppels's avatar
      CI on Daint via Sarus (#1006) · d60e2937
      Harmen Stoppels authored
      * Add Dockerfiles for MPI + CUDA test builds on Daint
      * Add bors.toml for CI on Daint
      * Add the separate ci repo as submodule for convenience
      * Add a CI badge for master to the top of the readme
      d60e2937
    • Sam Yates's avatar
      Extend repertoire of cable cell probes. (#1011) · 13e00470
      Sam Yates authored
      * Extend repertoire of cable cell probes.
      * Add the following scalar (i.e. corresponding to just one raw value)
      probe address types for cable cells:
         - `cell_probe_membrane_voltage`, replacing `cell_probe_address::membrane_voltage`;
         - `cell_probe_total_ionic_current_density`, replaing `cell_probe_address::membrane_current`;
         - `cell_probe_density_state`;
         - `cell_probe_point_state`;
         - `cell_probe_ion_current_density`;
         - `cell_prone_ion_int_concentration`;
         - `cell_prone_ion_ext_concentration`.
      * Extend backend class interface with `mechanism_field_data` method, that returns a raw (device) pointer to the per-instance values of a mechanism state variable.
      * Make unit test for probes backend-generic.
      * Add unit tests for new probes.
      * Modify `fixed_ica_current.mod` unit test NMODL module to be more generic in naming, so it can be better used in probe unit tests.
      * Update examples for new cable cell probes.
      * Update Python interface for new probe types
      13e00470
  7. Apr 09, 2020
    • Benjamin Cumming's avatar
      Fix setuptools to work with older Pip (#1010) · 1338599a
      Benjamin Cumming authored
      Work around issue caused by some versions of pip skipping the `install` stage when no additional command line args are passed via `--install-option`.
      
      Keep settings that can be modified via install option in a singleton that initializes them to their default.
      1338599a
    • Sam Yates's avatar
      Fix bad param values in partial CV coverage. (#1009) · 4394aade
      Sam Yates authored
      * Replace code that determines density mechanism parameter values across a CV with code that (hopefully) does it correctly. New code has the advantage also of being a bit simpler.
      * Add unit test `fvm_layout.density_norm_area_partial` that catches the bug, and which validates the fix.
      * Change old 'segment' terminology in `fvm_layout` test comments to 'branch'.
      
      Fixes #1008.
      4394aade
    • Benjamin Cumming's avatar
      Extents don't include the cover of fork points by default. (#998) · 21c400b2
      Benjamin Cumming authored
      This PR removes the requirement that all cover points are included in a region.
      The motivation is to allow more flexible definion of regions, particularly the proximal and distal sets thereof.
      The other motivation is that the author finds it much simpler to reason about, however others find the existing approach easier to reason about.
      
      The changes:
       * `mextent` does not always include points on the cover at fork points.
         * it still enforces that its constituent cables have no intersections and are ordered.
       * a `super` region expression adds the cover points to a region.
       * update `most_proximal` to return the `minset` of the proximal points in a region's cables.
       * fix some cut and paste errors in comments and printing of locset expressions.
      21c400b2
  8. Apr 07, 2020
  9. Apr 06, 2020
    • Benjamin Cumming's avatar
      Finalize support for PyPi package (#1002) · 04705503
      Benjamin Cumming authored
      * add MANIFEST file that describes all paths required in source distribution so that pip can compile Arbor.
      * fixes to `setup.py` to help it work across supported Python versions.
      
      Tested with:
      * setup tools and pip
      * python 3.7 and 3.8
      * pip 19 and pip 20
      * Linux and OS X
      04705503
  10. Apr 03, 2020
    • Benjamin Cumming's avatar
      prepare for PyPi upload (#1001) · 86de86b5
      Benjamin Cumming authored
      Some small changes to facilitate smooth PyPi integration:
      * update the Python installation guide
      * update the license file
      * add a `setup.cfg`
      * add a stub for the Python readme
      86de86b5
  11. 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
    • Sam Yates's avatar
      New cable representation for CVs. (#994) · f5c977ad
      Sam Yates authored
      * Replace CV cable representation with one which makes it clear to which CV a fork point 'belongs': every fork point belongs to exactly one CV; if a CV representation has cables on two different branches at a fork point, it must have cables on all branches at that fork point, and the fork point is associated with that CV.
      * Rework (and simplify) `cv_geometry_from_ends` to suit new representation.
      * Add CV child information to `cv_geometry`.
      * Add computed pw-constant axial resistivity over cell branches to `fvm_cv_discretization`, so it is available for voltage/current interpolation.
      * Extend `location_cv` method: add a new parameter of enum `cv_prefer::type` which instructs `location_cv` on how to resolve locations on CV boundaries.
      * Provide pw-constant over cable integration methods for `embed_pwlin`.
      * Split out `unique_in_place` to its own header, with unit tests.
      * Unit tests to suit.
      f5c977ad
    • 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.
      4286a713
  12. Apr 01, 2020
  13. Mar 31, 2020
  14. 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
      515cebf1
  15. 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). 
      5228512f
    • 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             |
      --------------------------------------------------------------------
      ```
      27ff4163
    • Nora Abi Akar's avatar
      bug fix: fine matrix solve · 6008f78b
      Nora Abi Akar authored
      6008f78b
  16. Mar 25, 2020
  17. 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
      9e0aff1b
    • 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.
      d04f39fc
    • 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 
      321a5a24
  18. Mar 16, 2020
  19. 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`.
      ae7e95d2
    • 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
      01548527
  20. 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 .
      45885c22
  21. Feb 26, 2020
  22. 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.
      fb5d4ea7
    • 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 `
      ec60bcc1
    • 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.
      b43cd07e