Skip to content
Snippets Groups Projects
  1. Aug 29, 2019
  2. Aug 19, 2019
    • Benjamin Cumming's avatar
      Replace morphology code with new sample-based morphology parsing. (#834) · 111104b4
      Benjamin Cumming authored
      * Replace old `arb::morphology` class with new `arb::sample_tree` and `arb::morphology` types, where `arb::sample_tree` manages a set of morphology sample points and their topology, and `arb::morphology` presents a branch-based view over samples described by an `arb::sample_tree`. The new classes support morphologies with cable-like or spherical somata.
      * Supply a new conversion routine for forming a `arb::cable_cell` from a morphology, with support for both classes of soma.
      
      Fixes #835 
      111104b4
  3. Jun 14, 2019
  4. Mar 04, 2019
    • Benjamin Cumming's avatar
      Remove miniapp (#710) · 4284780f
      Benjamin Cumming authored and Sam Yates's avatar Sam Yates committed
      Remove the miniapp example.
      
      * Remove the miniapp source from example/miniapp.
      * Remove references to miniapp from CMake files.
      * Remove miniapp from the travis tests.
      * Fix unused variable warning in brunel miniapp.
      4284780f
  5. Feb 26, 2019
    • akuesters's avatar
      Python PR #667 (#668) · fa549238
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      First step towards the Python front end.
      
      This commit sets up the structure of the python implementation
      * directory structure
      * git submodule for pybind11
      * best practices for making bindings with pybind11
      * unit testing for the python front end
      
      It implements the following features in the Python front end
      * execution contexts
      * gpu detection
      * thread count detection
      * MPI initialization helpers.
      
      Fixes #667.
      fa549238
  6. Feb 25, 2019
  7. Feb 04, 2019
    • Sam Yates's avatar
      Add fallback implementation of glob for platforms without it. (#660) · b11d2d14
      Sam Yates authored
      Implement a basic glob routine, supporting a subset of POSIX behaviour (e.g. no character classes), as a fallback for platforms such as Android which do not include it in their libc.
      
      * Add CMake configuration option `ARB_USE_POSIX_GLOB`, defaults to `ON`, that determines if the fallback implementation is used or not.
      * Extend `sup::path` functionality to add directory iterators and a couple more path manipulation routines, again following the C++17 `std::filesystem` interface.
      * Add an NFA pattern matcher `glob_basic_match` and file system `glob_basic` function; the latter is abstracted over a file system provider object, primarily for testing/mocking purposes.
      * Add unit tests for new `sup::path` functionality and for `glob_basic`.
      
      FIxes #181.
  8. Jan 31, 2019
    • Sam Yates's avatar
      Split out 'arborenv' as an installable library from the sup library. (#679) · f4b2e034
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Make a new installed library `libarborenv.a` covering a subset of the `sup` library functionality, with corresponding installed CMake target `arbor::arborenv`.
      
      * Move NVML or CUDA 10 API decision for GPU UUID discovery to top level CMake.
      * Move affinity, concurrency, MPI init guard, and gpu detection and negotiation functionality out of `sup` and into new library `arborenv`.
      * Move `include/arbor` in project tree to `arbor/include/arbor` (for consistency across `sup`, `arbor`, and `arborenv` subdirectories.)
      * Wrangle more explicit library dependency adding CMake code into the installed `arbor-config.cmake`, to help mitigate [CMake issue #18614](https://gitlab.kitware.com/cmake/cmake/issues/18614).
      * Have `arborenv` code throw `std::runtime_exception` instead of `arb::arbor_error`. (We are still using `arb::mpi_error` though for a failure in `with_mpi`.)
      * Move `scope_exit` into the `arb::util` namespace.
      * Merge `affinity.hpp` into `concurrency.hpp`.
      * Rename `gpu.hpp` to `gpu_env.hpp` in `arborenv` includes.
      
      Fixes #647.
      f4b2e034
  9. Dec 18, 2018
  10. Nov 27, 2018
    • Sam Yates's avatar
      Workaround for CMake 3.12 bug passing -thread to nvcc (#649) · af15856d
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      CMake wants to run a device link pass with nvcc despite
      there being no CUDA seperable compilation enabled anywhere,
      and then passes on -pthread to that unnecessary nvcc
      invocation when we use the Threads dependency. The latter,
      at least, is fixed in CMake 3.13.
      
      We used the prefer -pthread option for compatibility with
      our earlier build configuration; turning it off will
      hopefully have no consequence.
      
      We also enable device linking on the arbor library. Which
      is not needed, but if they are going to insist on doing it,
      it should be on the library rather than the executable.
      
      CMake then goes and does it on the executable anyway. Great.
      
      Fixes #645.
      af15856d
  11. Nov 21, 2018
  12. Nov 13, 2018
    • Felix Huber's avatar
      squashed merge for fine matrix solver · 0b7f88ca
      Felix Huber authored and Benjamin Cumming's avatar Benjamin Cumming committed
      0b7f88ca
    • Sam Yates's avatar
      Revert "Squashed merge for fine matrix solver (#640)" · 67b70a80
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      This reverts commit be2a8a9f.
      67b70a80
    • Benjamin Cumming's avatar
      Squashed merge for fine matrix solver (#640) · be2a8a9f
      Benjamin Cumming authored and Sam Yates's avatar Sam Yates committed
      Add a new Hines matrix solver implementation for the GPU that can solve a single tree in parallel with multiple threads. It replaces the interleaved solver, which used a single thread to solve each matrix.
      Branches with the same common root in the tree can be solved independently on each of the forward and backward solution passes. 
      
      * Add a matrix storage type, `arb::gpu::matrix_state_fine` that stores the branches of multiple trees for efficient backward and forward substitution.
      * Extend the `arb::tree` data structure to support operations for choosing a new root node and determining a root node which minimises the maximum distance between the root and any of the trees leaves. 
      * Implement code for rebalancing a set of matrix trees, a.k.a. a "forest" of trees.
      * Add CUDA kernels for efficiently performing matrix assembly and matrix solution steps.
      * Add CMake option `ARB_WITH_GPU_FINE_MATRIX` for toggling the new solver (default `on`).
      be2a8a9f
  13. Oct 15, 2018
  14. Oct 12, 2018
  15. Oct 10, 2018
    • Sam Yates's avatar
      Add installable CMake config for arbor (#616) · 7ade5c26
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Fixes #612.
      
      * Fix issues with permissions on directories created at install time (at least for CMake 3.11+).
      * Add CMake export guff to various targets and install an `arbor-config.cmake` for consumption by other CMake-based projects.
      7ade5c26
  16. Oct 01, 2018
  17. Aug 22, 2018
    • noraabiakar's avatar
      Create gpu_context and manage it as part of execution_context (#566) · 2c135d75
      noraabiakar authored and Sam Yates's avatar Sam Yates committed
      * Add gpu_context as part of execution context containing information about GPU availability, managed_memory synchronization, and atomic double availability.
      * Choose between ON and OFF for ARB_GPU in CMake. If ON compile for K20, K80, and P100
      
      Note that we still need compile time information about the GPU in cuda_atomic.hpp for atomicAdd(double*, double*). This is because the function is only defined when the program is compiled  for sm_60 or more.
      2c135d75
  18. Aug 20, 2018
    • Sam Yates's avatar
      Global temperature for NMODL mechanisms. (#565) · fa0d7aef
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Global temperature for mechanisms.
      
      * Make 'celsius' magic in modcc: now an indexed variable.
      * Add a new temperature data source for indexed variables.
      * Add support to printers for indexed variables that reference a scalar.
      * Check that indexed variables aren't used in PROCEDURE blocks (this is a problem not just for 'celsius').
      * Modify built-in mod files to pass celsius as a parameter to rates() procedures.
      * Add global temperature to shared_state classes, and initialize through backend mechanism superclasses.
      * Add some infrastructure for unit-test only mechanisms.
      * Set modcc flags globally in top level CMakeLists.txt.
      * Add test mechanism/module for checking celsius setting.
      * Add unit test for multicore and gpu mechanism celsius setting.
      * Make common mechanism private field data access helper for unit tests.
      * Use helper in temperature, synapses tests.
      * Fix warning in `distribued_context.hpp` about errant semicolon.
      * Fix global scalar ref for SIMD printing.
      * Use correct ARB_CXXOPT_ARCH instead of incorrect CXXOPT_ARCH in various CMakeLists.txt files.
      * Add special case for no-non scalar indexed variables in API loop in SIMD printing.
      
      Fixes #386
      fa0d7aef
  19. Jul 24, 2018
    • noraabiakar's avatar
      task_system as part of an execution_context (#537) · 7a6c1031
      noraabiakar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      - Task system is no longer a single system private to the implementation of the threading backend and used everywhere. A separate task_system can be used (with a specified number of threads) for every simulation.
      - arb::execution_context is the interface to task_system  and the previously defined distributed_context
      - TBB and serial support has been removed. Cthreads is the only threading backend available. 
      7a6c1031
  20. Jul 06, 2018
    • Sam Yates's avatar
      Migrate source/build to c++14 ... · 3ee79191
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Migrate source/build to c++14                                                                                                                    (#522)
      
      * Update `CMakeLists.txt` for C++14 option.
      * Update to gcc 6 minimum.
      * Update travis CI from gcc-5 to gcc-6
      * Use `std::..._t` style type traits, replacing `util::` aliases.
      * Use `std::cbegin`, `std::cend`, and `std::make_unique`, replacing `util::` versions.
      * Remove `DEDUCED_RETURN_TYPE` macros.
      * Remove redundant return type specifications.
      * Use correct ADL for `begin` and `end` in (almost all) the range utilities.
      * Remove redundant `mechinfo` ctor (aggregate initialization suffices).
      * Use lambda capture initializers where appropriate.
      * Use generic `std::equal_to`.
      * Use variable templates for `math::infinity` and `math::pi`.
      * Remove `enum_hash` workaround.
      * Use `""s` string literals where we were using our own `""_s` construction.
      * Use generic lambda for recursive lambda instead of `std::function` wrapper.
      * Use generic lambda for generic arithmetic tests.
      
      Fixes #358.
      3ee79191
  21. Jul 05, 2018
    • Sam Yates's avatar
      Test for xlC and refuse to build with it. (#519) · 775fe807
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Fixes issue #517.
      
      Deprecate the IBM xlC compiler.
      xlC generates code that is an order of a magnitude slower than gcc, while generating spurious warnings, and requiring hacks and workarounds to pass all tests.
      Supporting it makes no sense.
      
      * Add test and fatal error for xlC detection in CheckCompilerXLC.cmake.
      * Move xlC 13 misdetection work around to CheckCompilerXLC.cmake.
      * Remove xlC-specific compatibility workarounds from code.
      775fe807
  22. Jun 25, 2018
    • Sam Yates's avatar
      Feature/lib install target part i (#506) · ad1c78ab
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      CMake and build refactoring
      
      *   Use CUDA as first-class language (leading to CMake 3.9 minimum version requirement).
      
      *   Use 'modern CMake' interface libraries for compiler options, include file and library dependency tracking. Interface library targets:
          * `arbor-deps`: compiler options and library requirements for the `libarbor.a` static library, as governed by configure-time options and environment.
          * `arbor-private-headers`: include path for non-installed headers, as required by unit tests and arbor itself.
          * `arbor-aux`: helper classes and utilities used across tests and examples.
          * `ext-json`, `ext-tclap`, `ext-tbb`, `ext-benchmark`, `ext-sphinx_rtd_theme`: externally maintained software that we include (directly or via submodule) in the `ext/` subdirectory.
       
      *   Single static library `libarbor.a` includes all built-in modules and CUDA objects.
      
      *   Simply configuration options:
          *  `ARB_WITH_TRACE`, `ARB_AUTORUN_MODCC_ON_CHANGES` `ARB_SYSTEM_TYPE` removed.
          * External `modcc` is provided by `ARB_MODCC` configuration option; if provided `modcc` is still buildable, but is not included in the default target.
          * `ARB_PRIVATE_TBBLIB`, defaulting to `OFF`, instructs the build to make TBB from the included submodule.
      
      *   Extend `ErrorTarget` functionality to provide a dummy target or an error target based on a condition.
      *   Generate header version defines and library version variables based on git status and project version, via new script `include/git-source-id`.
      *   All generated binaries now placed in `bin/` subdirectory at build.
      *   Install targets installs: public headers (incomplete); static library; `modcc` tool; `lmorpho` executable; `html` documentation (examples, tests and validation data are currently not installed).
      *   Executable targets have had the `.exe` suffix removed; unit tests are labelled `unit` (arbor unit tests), `unit-modcc` (modcc unit tests), `unit-local` (distributed tests with local context), `unit-mpi` (distributed tests with MPI context).
      *   More graceful handling of configure-time detection of `nrniv`, Julia and required Julia modules for validation data generation.
      *   Add `cmake/FindJulia.cmake`, `cmake/FindTBB.cmake`  package finders, and adjust `cmake/FindUnwind.cmake` to use link library-style properties.
      *  Adjust travis script to test `unit-local` and `unit-mpi` if appropriate.
      *  Simply documentation `conf.py`.
      
      Source relocation and reorganization
      
      * All external project sources and files moved to `ext/`.
      * Source code refactoring to decouple library-using code from the configure-time definitions that govern arbor behaviour: removes conditional code in public headers that depends upon `ARB_WITH_X`-type definitions at compile time. Affected code is is in the public interfaces for MPI, the threading implementation, and the profiler.
      * Remove `util/debug.hpp`; split out functionality for pretty-printing from assertion handling.
      * Make FVM cell non-physical voltage check a run-time cell-group parameter.
      * Move spike double buffer implementation to `simulation.cpp`.
      * Make timer utility wrap POSIX `clock_gettime` independent of threading configuration.
      * Make `mpi_error` derive from `system_error` and follow C++11 `system_error` semantics.
      * `EXPECTS` macro replaced by `arb_assert` macro.
      * JSON dependency removed from `libarbor.a` and header files: moved to auxiliary library.
      * Publicly visible macros garner an `ARB_` prefix as required.
      * Move SWC test file to `test/unit` directory.
      * Work-in-progress splitting of public from private includes: as a convention not entirely adhered to as yet, private headers within arbor source are included with `""`, public headers with `<>`.
      
      Modcc interface changes
      
      * Expose via `--namespace` option the functionality that sets the namespace in generated code.
      * Use `--profile` option to add profiler hooks to generated code; uses public function interface directly rather than `PE/PL` macros in order to avoid public `PE` and `PL` defines.
      ad1c78ab
  23. Jun 01, 2018
    • Benjamin Cumming's avatar
      Runtime distributed context (#485) · 5fde0b00
      Benjamin Cumming authored and Sam Yates's avatar Sam Yates committed
      Move from choosing the distributed communication model from a compile time choice (the old `arb::communication::communication_policy` type) to a run time decision.
      
      * Add `arb::distributed_context` class that provides the required interface for distributed communication implementations, using type-erasure to provide value semantics.
      * Add two implementations for the distributed context: `arb::mpi_context` and `arb::local_context`.
      * Allow distribution over a user-supplied MPI communicator by providing it as an argument to `arb::mpi_context`.
      * Add `mpi_error` exception type to wrap MPI errors.
      * Move contents of the `arb::communication` namespace to the `arb` namespace.
      * Add preprocessor for-each utility `ARB_PP_FOREACH`.
      * Rewrite all examples and tests to use the new distributed context interface.
      * Add documentation for distributed context class and semantics, and update documentation for load balancer and simulation classes accordingly.
      
      Fixes #472
      5fde0b00
  24. May 09, 2018
    • Sam Yates's avatar
      Mechanism Refactor: multicore and simd (#484) · 68135148
      Sam Yates authored
      First commit of two for mechanism refactor work (refer to PR #484 and PR #483).
      
      FVM/mechanism code:
      * Refactor mechanism data structures to decouple backend-specific implementations and mechanism metadata.
      * Add mechanism catalogue for managing mechanism metadata and concrete implementation prototypes.
      * Add fingerprint-checking to mechanism metadata and implementations to confirm they come from the same NMODL source (fingerprint is not yet computed, but tests are in place).
      * Split FVM discretization work out from FVM integrator code.
      * Use abstract base class over backend-templated FVM integrator class `fvm_lowered_cell_impl` to allow separate compilation of `mc_cell_group` and to remove the dummy backend code.
      * Add a new FVM-specific scalar type `fvm_index_type` that is an alias for `int` to replace
      `fvm_size_type` in fvm layouts and mechanisms. This was chosen as an alternative
      to making `unsigned` versions of all our SIMD implementation classes.
      * Extend `cable1d_neuron` global data to encompass: mechanism catalogue; default ion concentrations and charges; global temperature (only for Nernst); initial membrane potential.
      
      Modcc:
      * Collect printer sources in modcc under `printer/`.
      * Move common functionality across printers into `printer/printerutil.{hpp,cpp}`.
      * Add string to file I/O implemented in routines read_all and write_all in `io/bulkio.hpp`.
      * Implement indent-friendly source code generation via a `std::streambuf` filter `io::prefixbuf` defined in `io/prefixbuf.hpp`, together with manipulators and a corresponding std::ostream-derived wrapper.
      * Rewrite printers to use new infrastructure: cpu target incorporates SIMD printing options; CUDA printer at this point produces only stubs for CUDA kernel wrappers.
      * Modify SIMD printing command line options for modcc: `-s` enables explicit vectorization using the SIMD classes;  `-S <N>` allows a specific data width to be prescribed.
      * Fix problem in `test_ca.mod` with uninitialized ion current.
      * Add infrastructure support to allow future pre-computation of SIMD index conflict cases for (hopefully) faster scatters and updates.
      * Simplify `IndexedVariable` expressions in the AST, making data source explicit via a `sourceKind` enum, and leaving the indexing method and index names up to the printers.
      * Allow state variables in the AST to 'shadow' an ion concentration — these are assigned in the
      generated `write_ions` method.
      
      SIMD classes:
      * Add `simd_cast` operation between SIMD value types of the same width, and with `std::array`. (Note: this was tested and used in an early development version of the code, but not in this version. It was still a lacuna in the original SIMD wrappers, so it has been left in.)
      * Restructure SIMD gather/scatter API to use a `simd::indirect` expression,  which encapsulates a pointer and SIMD offset.
      * Add `simd::index_constraint` scoped enum to describe knowledge of contention in indirect indices, so that we can branch on this to the appropriate implementation.
      * Add SIMD concrete implementation routines `reduce_add` for horizontal reduction and `element0` for access to first lane scalar value.
      * Add SIMD value method `sum()` that exposes implementation `reduce_add`.
      * Add SIMD concrete implementation routine `compound_indexed_add` that provides the implementation for `indirect(p, simd_indices) += simd_value` construction.
      * Fix SIMD `implbase` bug where some static methods were using the `implbase` fall-back functions instead of the derived class specialized implementations.
      * Move SIMD mathematical functions into friend routines of `simd_impl` in order to resolve implicit conversions from scalars in mixed SIMD-scalar operations.
      * Use a templated `tag` class to dispatch on SIMD concrete implementation types, to avoid problems with incomplete types in method signatures.
      * Remove old SIMD intrinsics.
      
      CMake infrastructure:
      * Downcase some variables in `CMakeLists.txt` files to  distinguish them visually from CMake keywords and variables.
      * Split arbor modcc vectorization option (now `ARB_VECTORIZE`) and target-architecture optimization (now `ARB_ARCH`).
      * For `arbor` and `arbormech` targets, and in particular not the `modcc` target, use `ARB_ARCH` to generate corresponding target-appropriate binaries, including, for example, appropriate SIMD support.
      * Extend `CompilerOptions.cmake` to map as best as able between the various target architecture names (we use the gcc names) and the correct option to pass to the compiler based on the compiler and platform.
      * Add work-around for misidentification by CMake of XL C as Clang.
      * As a temporary work-around, include `arbormech` library twice on link line to resolve circular arbor–arbormech dependencies.
      
      Unit tests:
      * Extend repertoire of generic sequence equality/near equality testing support  in `common.hpp`.
      * Add warning suppression for icc for the malloc instrumentation code.
      * SIMD unit tests for indirect expressions, compound indirect add, reduction.
      * Make some exact tests into floating point 'near' tests when comparing computed areas and lengths in swc and fvm layout tests, to account for compiler (e.g. icc) performing semantically inequivalent floating point operation reordering or fusion at `-O3`.
      * Split out some of the CUDA tests into separate .cpp/.cu files for  separate-compilation purposes.
      
      Other:
      * The `padded_allocator` has been modified to propagate alignment/padding on move and copy (these semantics make their use much easier and safer in the multicore mechanism instantiation code).
      * Map/table searching utilities in `util/maputil.hpp`.
      * Fixes for correct sequence type categorization and `begin/end` ADL.
      * Fixes for type guards for range methods that take universal references.
      * Removal of some redundant code in range utilities through the use of universal references.
      * Add new range view `reverse_view` for ranges delineated by bidirectional iterators.
      * Add single argument form of `make_span` to count up from zero, and associated helper `count_along` that gives a span that indexes a supplied container.
      * Moved `prefixbuf` to `modcc` source.
      * Make sequence positive and negative tests in algorithms generic.
      * Add `private`-subverting helper code/macro to `tests/unit/common.hpp` to reduce the number of public testing-only interfaces in the library code.
      * Add virtual destructors for virtual base classes.
      * Add new arb::math:: functions: `next_pow2` for unsigned integral types, `round_up` to round a number away from zero to next largest magnitude multiple.
      * New `index_into` implementation that supports bidirectional access (moved to `util::` namespace).
      * Fix problem in `test_ca.mod` with uninitialized ion current.
      * Rework dangerous `memory::array(Iter, Iter)` constructor to be less dangerous (and do the expected thing).
      * Allow ranges to be constructed from other ranges if the iterators are compatible.
      68135148
  25. Apr 11, 2018
    • Ben Cumming's avatar
      Fix support for Keplar (K20 & K80) GPUs. (#470) · 6b659a39
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      Fixes issue #467 
      
      * Add GPU synchronization points where required for Kepler to coordinate CPU access of managed memory.
      * Use hand-rolled double precision atomic addition for Kelper targets.
      * Replace `ARB_WITH_CUDA` build option with `ARB_GPU_MODEL` option that takes one of 'none', 'K20', 'K80' or 'P100', and set up source-code defines accoringly.
      * Clean up of redundant compiler flags and defines no longer required now that the project uses separate compilation for CUDA sources.
      6b659a39
  26. Mar 27, 2018
    • Ben Cumming's avatar
      Installation Guide (#459) · 0cf65a4c
      Ben Cumming authored
      Added an installation guide to the Read The Docs
      Removed the outdated build/install information from README.md
      Link from README to Read The Docs
      Updated the splash page for Read The Docs
      0cf65a4c
    • Ben Cumming's avatar
      wrap warp intrinsics to fix depricated warnings (#456) · 7e6ea389
      Ben Cumming authored
      CUDA 9 introduced new, fine-grained, thread synchronization primitives.
      In doing so, it introduced new forms of the warp intrinsics like __shfl_up, depricating the old symbols in the process.
      
      It will be a while before we can use 9 as the default minimum, so we have to support compilers that expect the new and old behavior.
      
      There are two options: wrap the intrinsics in question, or pass nvcc a flag to not issue warnings about depricated symbols. I go for the approach of wrapping, because I would rather keep the compiler warning turned on.
      
      Fixes #379.
      7e6ea389
  27. Mar 20, 2018
  28. Mar 16, 2018
    • Sam Yates's avatar
      SIMD wrappers for Arbor generated mechanisms. (#450) · 2dff9c41
      Sam Yates authored
      This provides a bunch of SIMD intrinsic wrappers as a precursor to the SIMD printers.
      
      The aim is that the SIMD printer can be agnostic regarding the particular vector architecture.
      
      The design is based rather loosely on the proposal P0214R6 for C++ Parallelism TS 2. The transcendental function implementations are adapted from the existing SIMD architecture-specific code, which in turn are based on the Cephes library algorithms.
      
      The custom CSS for the html documentation have been tweaked.
      2dff9c41
    • Ben Cumming's avatar
      5fe81e83
    • Ben Cumming's avatar
      refactor git submodule support in cmake (#448) · 4c66432f
      Ben Cumming authored
      In some places our CMake scripts were attempting to check out git submodules when required, if they have not already been checked out. The code that does this was cut and pasted, and was getting unwieldy.
      
      To minimise the responsibilities of CMake, this PR
      
      removes calls to git
      introduces a function check_git_submodule that can be used to test if a git submodule is installed, and print a helpful message that informs the user how to check it out if needed.
      introduces a function add_error_target that makes a target that prints a message then quits with an error. This can be used to generate a proxy target when a problem is detected during CMake setup. This means that an error is only generated when building a target with a missing dependency, instead of an error during CMake setup.
      refactors the CMake setup for the docs and ubenches targets to use these new features.
      4c66432f
  29. Mar 15, 2018
    • Ben Cumming's avatar
      Improve TBB vs. CMake (#451) · 459d6562
      Ben Cumming authored
      This replaces the CMake templates provided by TBB with a much more sane alternative!
      
      The TBB CMake templates had a very strange workflow, that involved downloading the TBB source and compiling it, which made it impossible to configure the TBB build, and caused problems on systems without connection to the internet.
      
      We replace this with a fork of the TBB repository maintained by Github user @wjakob:
      https://github.com/wjakob/tbb
      This fork provides a sane CMakeLists.txt that can be configured from our CMake setup.
      It is added as a git submodule, so it can be downloaded with the rest of the repository, hence not requiring connection to the internet during CMake configuration.
      
      It could be extended to use a user-provided build of TBB to use instead of building it.
      
      fixes #332.
      459d6562
  30. Dec 20, 2017
    • Ben Cumming's avatar
      Move miniapps path to 'example/' (#423) · f94f0eab
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      * Rename `miniapps` subdirectory to `example`.
      * Have all example executables be built under `example` in the build directory.
      * Update Travis CI to run miniapp from new path.
      f94f0eab
    • Ben Cumming's avatar
      Add granule cell mechanisms (#421) · a80df6fa
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      * Add three new mechanisms: `nax.mod`, `kdrmt.mod` and `kamt.mod`.
      * Add new built-in math operators to `modcc`: `min`, `max`, `abs` and `exprelr`. `exprelr` is defined as the reciprocal of the 'exprel' function, exprel(x)=x/(exp(x)-1), exprel(1)=1. This function occurs frequently in HH-style mechanisms, and having a built-in operator avoids the ad hoc `vtrap` functions found in NMODL files in the wild.
      * Split Arbor SIMD intrinsics support into AVX2- and AVX512-specific files.
      * Add unit tests for new maths operators for C++, SIMD and CUDA implementations.
      a80df6fa
  31. Nov 30, 2017
    • Wouter Klijn's avatar
      Move miniapp sources to a miniapps directory (#408) · 3b5b0386
      Wouter Klijn authored
      Restructure the miniapp in such a way that we have to option to have multiple parallel mini-applications.
      
      Move the original miniapp directory to a miniapps directory.
      Output executable also in a nested miniapps directory.
      Update the Travis to point to the new executable location.
      3b5b0386
  32. Nov 28, 2017
    • Sam Yates's avatar
      Tidy `modcc` driver, remove optimize flag. (#404) · 998ee724
      Sam Yates authored
      * Remove optimization option (use SIMD options for vectorization).
      * Remove arbor utility library dependencies from modcc (pending separation of utility lib from arbor lib source).
      * Split target (cpu, gpu) specification from vectorization architecture (avx2, avx512).
      * Remove `Options` singleton; replace with structure local to `modcc.cpp`.
      * Tidy `modcc` option parsing and main function; allow a single invocation of `modcc` to generate code for multiple backends.
      * Rename generated sources to include backend target in filename.
      * Always run a constant simplification pass on generated procedures.
      * Remove file i/o code from `Module` and `modcc` main function; move functionality to new functions in `io` namespace. (Note: in on-going mechanism revamp, other i/o utility code will reside in the `io` namespace and subdirectory.)
      * Remove classes `ConstantFolderVisitor` and `ExpressionClassifierVisitor` that are no longer used.
      * Modify CMakeLists.txt files, `backends/*/fvm.cpp` to reflect the new filenames of generated sources.
      * Small formatting changes in `modcc` source to reflect coding guidelines (incomplete).
      998ee724
  33. Sep 28, 2017
    • Sam Yates's avatar
      Rename NestMC references, names etc. to Arbor. (#363) · d9f38b2a
      Sam Yates authored
      * Use ARB_ and arb_ as variable prefixes in place of NMC_ and nmc_.
      * Replace references to 'NestMC' and 'NEST MC' to refer instead to Arbor.
      * Use 'arbor' as the sim name in generated validation data.
      * Reflow long-line paragraphs in `tests/ubench/README.md`.
      * Change names of CUDA mechanism and CUDA kernel libraries to include arbor name.
      d9f38b2a