Skip to content
Snippets Groups Projects
  1. Nov 28, 2022
  2. Nov 23, 2022
  3. Oct 27, 2022
    • Thorsten Hater's avatar
      Add a plethora of config options to a-b-c. (#1958) · 81096351
      Thorsten Hater authored
      Closes #1861 
      Closes #1783 
      
      - arbor-build-catalogue (a-b-c) does no longer need to be in a fixed location
      - nor do we statically fix the configuration for a-b-c
      - instead, we rely on `arbor.config` to read the relevant default values
      - each value can be overriden, if desired
      - added many more values to the configuration
        - gpu type and arch
        - paths and prefix 
        - CXX
      - report default settings for better diagnosis
      - implement a fallback for prefix if that does not exist; in particular for the amazing skbuild.
      
      In essence you can now use a-b-c as a standalone tool, as long as you have a properly 
      configured py-arbor.
      
      Example output after removing `_skbuild`
      ```
      Warning: prefix '/Users/hater/src/arbor/_skbuild/macosx-11.0-x86_64-3.10/cmake-install' does not exist, falling back to '/Users/hater/src/arbor/.direnv/python-3.10.6'.
      usage: arbor-build-catalogue catalogue_name mod_source_dir
      
      Generate dynamic catalogue and build it into a shared object.
      
      positional arguments:
        name              Catalogue name.
        modpfx            Directory name where *.mod files live.
      
      options:
        --raw raw [raw ...]
                          Advanced: Raw mechanisms as C++ files. Per <name> the files <name>.hpp, <name>_cpu.cpp (if CPU
                          is enabled) must be present in the target directory and with GPU support also <name>_gpu.cpp and
                          <name>_gpu.cu.
        -v, --verbose     Verbose.
        -q, --quiet       Less output.
        --cpu CPU         Enable CPU support.
        --debug [path]    Don't clean up the generated temp cpp code. Can be a target path for the generated code.
        --gpu gpu         Enable GPU support
        --gpu-arch gpu_arch
                          Enable GPU support; default=-
        --cxx cxx         Use this C++ compiler; default=/usr/local/opt/llvm/bin/clang++.
        --prefix prefix   Arbor's install prefix; default=/Users/hater/src/arbor/.direnv/python-3.10.6.
        --bin bin         Look here for Arbor utils like modcc; relative to prefix, default=bin.
        --lib lib         Look here for Arbor's CMake config; relative to prefix, default=lib.
        --data data       Look here for Arbor supplementals like generate_catalogue; relative to prefix, default=lib
        -h, --help        Display this help and exit.
      ```
  4. Oct 25, 2022
  5. Oct 19, 2022
  6. Oct 05, 2022
    • 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
  7. Sep 20, 2022
    • Thorsten Hater's avatar
      Ensure proper Pybind11 is found. (#1961) · 8b388e6b
      Thorsten Hater authored
      * Add pybind11 version to config.
      * Add version check for PB11.
      * Bump CMake a tiny bit.
    • 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
  8. Aug 10, 2022
    • Thorsten Hater's avatar
      Add portable stacktraces · de83a0fa
      Thorsten Hater authored
      - Add stacktraces to
         1. arbor_exception (and all derived) as `where`
         2. arbor_internal_error as `where`
         3. arb_assert
      - Propagate stacktraces to Python exceptions derived from the above.
      - Expand dev/doc on debugging
  9. Jul 04, 2022
    • Brent Huisman's avatar
      Move Python build to `pyproject.toml`, bump Python minver to 3.7, fix macos... · 8af6bd27
      Brent Huisman authored
      Move Python build to `pyproject.toml`, bump Python minver to 3.7, fix macos wheel generation (#1916)
      
      * Failing Macos Python wheel builds fixed.
      * Macos Python wheels now come with dual-arch (x86-64 and arm64)
      * Moved (nearly) all Python build instructions to `pyproject.toml`
        * Enables 'build isolation', and need to specify build-deps only once, no need for users or CI scripts to pre-install them.
        * Enables editable `pip` installs (`pip install -e ./arbor`)
        * Compatible with 'build frontends' `pip` and `build`.
        * Passing CMake options actually got shorter
      * Drop Python 3.6 support.
  10. Jun 16, 2022
  11. Jun 13, 2022
  12. 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 
  13. Mar 22, 2022
  14. Mar 16, 2022
  15. 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
  16. 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/auditwheel#363
          - Python Wheels are tested as part of the Github Action 
          - Add nml and bundled status to config().
    • Nora Abi Akar's avatar
      Profile externally loaded mechanisms (#1691) · 44b67f38
      Nora Abi Akar authored
      - Add support for profiling externally loaded mechanisms.
      - Move the profiler calls out of the generated C++ code into the `arb::mechanism` methods. 
      - Remove the `--profile` flag from the modcc flags. 
      - Replace `_` delimiter with `:` in profiler. 
      - Replace `const char*` with `const std::string&` for profiler region representation.
      - Profiler may now contain empty regions that were registered but not profiled, so add some code to filer those out when generating final profile.
  17. Jan 21, 2022
    • Thorsten Hater's avatar
      CMake CUDA clean-up. (#1804) · b2cb6ced
      Thorsten Hater authored
      - Bump CMake to 3.18 for better CUDA support.
      - Clean-up our use of said support.
      - Remove old cruft and workarounds.
      - Maintenance in CI: enable MacOS 11; bump CMake versions to 3.18 / 3.22; bump bors CMake to 3.18
      
      Fixes #1790 
  18. Dec 03, 2021
    • Sebastian Schmitt's avatar
      lmorpho (#1746) · 397a66b5
      Sebastian Schmitt authored
      Add the lmorpho utility back to Arbor
      
      The original utility was removed because it was a maintenance burden with no users.
      Now users are requesting the feature, this PR adds the old code, and updates it
      to work with the new morphology description API.
  19. Nov 26, 2021
  20. Oct 12, 2021
  21. 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.
  22. 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`.
  23. 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 
  24. Apr 29, 2021
  25. Mar 05, 2021
  26. Mar 03, 2021
  27. Feb 19, 2021
  28. Feb 05, 2021
  29. 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)
  30. Jan 06, 2021
  31. Jan 05, 2021
    • Benjamin Cumming's avatar
      Remove dependence of docs on the Python module (#1293) · d326f2ea
      Benjamin Cumming authored
      Revert a change introduced in #1282 that required the python module for arbor to build the documentation.
      
      This breaks the readthedocs build, where arbor is not available.
      
      * Remove arbor dependence from `doc/conf.py`, reverting to the original "out of core" approach
      * Fix other recently introduced issues that lead to CMake errors when configuring the documentation
        when the Python target is not configured.
        * The CMake variable `PYTHON_EXECUTABLE` wasn't set, but was required to make calls to the
           Python interpreter.
        * Instead of relying on pybind11 to find Python, explicitly detect it using `find_package(Python3 ...)`
        * Make Python3 a hard requirement when building the Python wrapper
        * And a soft requirement otherwise, that will fail only when the docs are built.
  32. Jan 04, 2021
  33. Dec 17, 2020
    • Brent Huisman's avatar
      Improved selection of default Python install path. (#1277) · 54b5c3ac
      Brent Huisman authored
      * Docs: emphasised the option of having pip install a local copy of the Arbor source.
      * CMake: default Python library install path to `${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_path('platlib'))"`. Fixes #1100.
      * CMake: remove ARB_PYTHON_PREFIX option, added ARB_PYTHON_LIB_PATH option. We cannot know in general where in the prefix the packages are expected by Python.
  34. Nov 09, 2020
  35. Nov 01, 2020
  36. Sep 25, 2020
    • Sam Yates's avatar
      Add NeuroML2 morphology support in new library. (#1148) · 3c453b64
      Sam Yates authored
      * Add CMake infrastructure for new `arbornml` library comprising Arbor's NeuroML2 (C++) support.
      * Implement NeuroML2 parsing and interpretation, using libxml2 for XML parsing.
      * Add associated documentation, unit tests.
      * Replace `arb::util::optional` with `std::optional` in stitch morphology interface.
      * Add optional prefix to `arb::label_dict` import.
      * Update CI to test arbornml, with associated workarounds for OS X targets.
      * Remove glob functionality from `sup`, as it is no longer needed (it was used for lmorpho) and it triggers yet another OS X issue.
      
      Fixes #1088.
  37. Sep 22, 2020
    • Benjamin Cumming's avatar
      Move region/locset S-expr evaluation from python lib to Arbor lib. (#1157) · 3ba5f437
      Benjamin Cumming authored
      * Move label and s-expr parsing code and unit tests from Python to arbor C++ library.
      * Update `locset` and `region` constructors that take string arguments to parse strings as s-expressions or "quoted" labels.
      * Modify the input stream modifier used to parse asc files to use a lookup table for substitutions, renamed it transmogrifier.                                                             
      * Replace `hopefully` type implemented in python headers with an `arb::util::expected`.
      * Add `ARBDEV_COLOR` CMake option that forces gcc and clang to always output color output.
      * Allow arbitrary strings in labels in region and locset expressions.
      * Add `parse_region_expression` and `parse_locset_expression` functions alongside the existing `parse_label_expression` function for use when a region or locset is expected. These calls will promote a quoted string `"label"` to `(region "label")` or 
       `(locset "label")` respectively.
      * Add user-defined string literals for labels so that the C++ interface can use `"soma"_lab` instead of awkward escaping `"\"soma\""`.
      * Simplify Python wrapper code.
  38. Sep 14, 2020
    • Benjamin Cumming's avatar
      Update to C++17 (#1141) · 74411404
      Benjamin Cumming authored
      * Update CMake CXX version.
      * Make CUDA 10 a minimum requirement and remove CUDA 9 support code.
      * Set up g++ Travis tests to use g++ 8.
      * Explicitly set C++14 version for nvcc.
      * Properly split cuda compilation, including in unit tests.
      * Remove unnecessary modcc `SOLVE` warning.
      * Update pybind11 module to tag v2.5.0
      * Replace `util::size` and `util::data` with `std::` equivalents.