- Jun 25, 2018
-
-
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.
-
- Dec 19, 2017
-
-
Sam Yates authored
Reduce differences between `util::optional` and `std::optional`. * Rename `util::nothing` to `util::nullopt`. * Replace `util::get()` by`util::optional::value()`. * Add correct move semantics to `util::optional::value()`. * Add `util::optional::value_or()` method. * Remove unused monadic functionality from `util::optional` and `util::uninitialized`. * Update code formatting to closer adhere to coding guidelines. * Add convenience ""_s string constructor for unit tests. * Update unit tests accordingly. Fixes #419.
-
- Sep 28, 2017
-
-
Sam Yates authored
Change nest::mc namespaces to arb
-
- Nov 14, 2016
-
-
Ben Cumming authored
This PR is part of the gpu feature merge. The GPU implementation is not implemented here. Instead, we focus on refactoring of the original "multicore" back end so that it is ready for adding the GPU back end. This is a big and messy change, for which I am sorry. ## build System - A `WITH_CUDA` option has been added to the main CMakeLists. This finds the CUDA toolkit, and sets CUDA compiler flags, and will build unit tests for the gpu back end. - The CMakeLists that generates mechanisms with modcc has been updated to generate CUDA mechanisms. - the library is now named `libnestmc` instead of `libcellalgo` - merge the external libraries that are optionally linked againts (tbb, libunwind, etc) into a single `EXTERNAL_LIBRARIES` list for ease of linking ## modcc - the cprinter and cudaprinter have had small changes to generate mechanism files that are compatible with the refactored library. ## algorithms - the indexes into algorithm was "rangified". An algorithm `index_into_iterator` takes two ranges as inputs to make a range that lazily generates the index of sub into super set. ## backends - made a new path `src/backends/` for backend specific type and implementation code. - currently: - complete support for the `multicore` and `gpu` backends - `gpu` back end is not optimized or validated - the back end implementations are in `src/backends` - a single `backend` class, `nest::mc::{multicore,gpu}::backend`, is provides all backend specific type and implementation details fro each backend - storage containers - Hines matrix assembly for FVM method - Hines matrix solver - mechanism "factory" ## lowered fvm cells - removed `fvm_cell` because this can be modelled with an `fvm_multicell` with one cell. - refactored to use backend type and implementation from `fvm_policy` - use `std::vector` instead of containers in `nest::mc::memory::` where possible when building cells. ## memory library Refactor the "memory" library, making it much simpler and better integrated into the rest of the application. However, it is still far from perfect. The `Coordinator` approach needs to be improved, most likely by putting target-specific wisdom into pointers (which could obviate the need for a `const_array_view` type. 1. renaming and moving - move from `vector/` to `src/memory` - move into the `nest::mc` namespace, i.e. all types and functions are now in `nest::mc::memory` - change from camel case nameing scheme to NestMC style naming. 2. simplification - remove the CRTP cruft that was used to make operator overloading work for operations like copying from one range into another, and filling a range with a constant value. These have been replaced with `memory::fill()` and `memory::copy()` helper functions. This simplified the code _a lot_, and makes code clearer in user land. ``` // before vec(0, 5) = other; // now memory::copy(other, vec(0, 5)); ``` - add some wrappers in `src/memory/wrappers.hpp` that help with making views. These are particularly useful for passing `std::vector` through interfaces that expect a view. ## debug backtraces Added stack traces for debugging. - support for OSX and Linux via libunwind - backtraces can be generated manually `nest::mc::util::backtrace().print()` - creates a new file and dumps trace into file - prints message to `stderr` with file name and instructions on how to analyse - backtraces are also automatically generated when an assertion `EXPECTS` statement fails - a python script in `scripts/print_backtrace` pretty prints the output with file name, line number and demangled symbols ## util simplification and consolidation The `src/util.hpp` file was removed - much of its contents were dead code and just removed - useful components like `pprintf` and `make_unique` were moved into the `src/utils` path in standalone files There was a lot of overlap between functionality provided in `src/memory/util.hpp` and existing functions/types in the `nest::mc::util` namespace. The `memory` implementations were removed, and their `nest::mc::util` counterparts used. There is still some work remaining, namely moving the rest of the `src/memory/util.hpp` into `src/util/...`
-
- Oct 27, 2016
-
-
Sam Yates authored
* New `filter` view: lazily selects based on predicate. * Generic `front` and `back` for sequences. * New rangeutil STL wrappers `stable_sort_by`, `all_of`, `any_of`. * Consolidate common utility unit testing structures into `tests/unit/common.hpp`
-
- Oct 11, 2016
-
-
Sam Yates authored
Validation of simulation results by comparing L-infinity distance and maximum peak displacement in voltage traces taken at mid-points and end-points of sections. Note that these tests will broadly _fail_ at this point. Reference data generation and visualization: * Use voltage traces as validation data from NEURON; refactor generation scripts. * Generate validation data as a dependency of `validation.exe`. * Store validation data in a `tsplot`-compatible format. * Extend `tsplot` to handle multiple time series per file, a non-time 'time' axis (see `-A` option), filtering of time series by meta data queries (see `-s` option). * Remove pre-generated spike-time validation data files. Core extensions: * Add a single-cell `singleton_recipe` recipe wrapper. * Allow cell descriptions to be cloned (explicitly) for use with this wrapper. * Add `simple_sampler` which maintains a trace of scalar observables as a vector of (time, value) pairs. * Allow cell groups to be exposed from `model` (used for post-synaptic event injection in synapse validation test.) Utility extensions: * Add `math::signum` function. * Fix `value_type` determination in `util::transform_iterator` where the underlying iterator dereferences to a reference type. * Add `util::max_element_by` and `util::max_value` sequence utilities to `rangeutil.hpp`. * Small bug fixes for `util::optional` (one const correctness case, and proper behaviour for implicit conversion of `nothing_t` to `optional<void>`.) * Generic `util::first` and `util::second` accessor functional objects for reference access to `std::pair` fields in the absence of generic lambda functions. * Add `util::path` for path manipulation, corresponding to a subset of C++17 `std::filesystem::path` functionality. Only POSIX path semantics supported at this point. Validation tests: * Rework all validation tests as comparisons of voltage trace data against a (presumably converged) reference trace generated by NEURON. * Add options to `validation.exe` driver for verbose output of test results (`-v`), limiting the compartment number in convergence tests (`-m`) and saving the generated traces to a `tsplot`-compatilble JSONfile (`-o`). * Gather trace comparison metrics and analysis into `trace_analysis.hpp` and `trace_analysis.cpp`. * Add super simple command line argument parsing utility `tinyopt.hpp`. * Make a consistent naming of `ball_and_3stick` model across sources. * New `ball_and_taper` model.
-
- Aug 11, 2016
-
-
Sam Yates authored
* Address issue #74: missing json configuration options. * Allow parameters from input file to be overriden on command line. * Missing parameters in json input will defer to defaults. * Add option for saving current options to json file (allowing for json parameter file format discovery.) * Fix annoying command line argument reordering from TCLAP. * Fix bug in assignment of `nothing` to a util::optional<T> variable.
-
- Aug 03, 2016
-
-
Sam Yates authored
Plus: coding guidelines compliance.
-
- Jul 07, 2016
-
-
Wouter Klijn authored
Gtest is currently copy twice!
-
- Jul 06, 2016
-
-
Sam Yates authored
-
Sam Yates authored
* Correct implementation of operator=(). * Unit test for optional reference assignment.
-
Benjamin Cumming authored
The Intel compiler was unable to compile the `util::optional` code, and also created some warnings in the unit tests for optional * rephrase `enable_if` template argument to use `::value` explicitly to work around Intel compiler bug. * move helper types out of anonymous namespaces in the optional unit tests * fix warnings about unused member functions * remove some white space in optional code
-
- Jun 28, 2016
-
-
Sam Yates authored
Sidesteps NDEBUG versus assert() issue; EXPECTS macros are now enabled via a CMake configuration option -DWITH_ASSERTIONS=ON, corresponding to the preprocessor define -DWITH_ASSERTIONS in the code itself. (Note, with assertions enabled, one of the existing tests in test_algorithms.cpp aborts.)
-
- Jun 27, 2016
-
-
Sam Yates authored
* First implementation of simple current/voltage probe interface * Sample a specific collection of voltage or current values at independent dt (current implementation chooses to provide at most one sample per simulation dt per request.) * Miniapp uses samplers to write soma and dendrite membrane potentials from first three cells. * Also: fix noncompliant use of nullptr -> bool conversion in test_optional.cpp
-
- Jun 11, 2016
-
-
Sam Yates authored
-
Sam Yates authored
* Add file cmake/CompilerOptions.cmake for setting up compiler specific options * Disable 'missing-braces' warning on Clang * Avoid defect in g++ 4.9.2 standard library that omits move constructor for `stdd::ifstream` * Remove signed/unsigned warning in test_optional.cpp
-
- Jun 10, 2016
-
-
Sam Yates authored
Clang (by default) objects to the omission of parentheses in expressios such as a && b || c, and also to brace elision in aggregate initialisation. The latter complicates initialisation of e.g. std::array. GCC has not turned this warning on for that reason, and there is an open issue for this for clang: https://llvm.org/bugs/show_bug.cgi?id=21629 * Add parentheses to resolve logical parentheses warning * Suppress missing-braces diagnostic in test_optional.cpp
-
Sam Yates authored
* Move optionalm headers into src/util * Change namespace for optional classes to nest::mc::util * Include unit tests for optional and uninitialized classes * Simplify (dedoxygenate) comments in uninitialized.hpp
-