Skip to content
Snippets Groups Projects
  1. Mar 07, 2017
    • Sam Yates's avatar
      Bugfixes for `lmorpho` (#170) · 216ae6ed
      Sam Yates authored
      * Ignore dendrite branches with negative radii arising from correlated child diameter distribution.
      * Fix fencepost errors in morphology discretization.
      * Rename `tip.p` to `tip.point`.
      216ae6ed
  2. Mar 06, 2017
    • Sam Yates's avatar
      Morphology generation with L-systems (#162) · 7f9288fb
      Sam Yates authored
      Adds a stand-alone program for the generation of random morphologies form a L-system description. The algorithm is that of Burke (1992), with some of the extensions provided by Ascoli et al. (2001).
      
      Two sets of L-system parameters have been included, corresponding to alpha motoneurons and Purkinje cells, but there is certainly something wrong with the data for the latter, and more correct numbers will probably need to be synthesized from existing Purkinje cell morphological information.
      
      Documentation for `lmorpho` is incomplete, but the command line help (`--help`) goes some way to explain the usage. In order to get output, one must specify `--swc` or `--pvec` (or both) to emit SWC files or the structural parent vectors. Coarser discretization can be obtained with the `--segment` option.
      
      Some minor modifications have been included in other parts of the source repo:
      * Added copy constructor for `TextBuffer` in `modcc/textbuffer.hpp`, required to keep cl...
      7f9288fb
    • w-klijn's avatar
      Merge pull request #165 from bcumming/bug/modcc · ab7db0d5
      w-klijn authored
      fix #164
      ab7db0d5
    • Benjamin Cumming's avatar
      Fix issue #164 · 7197a976
      Benjamin Cumming authored
      Disambiguate e symbol in statements like the following
        for (auto& e: e->terms())
      This caused GCC 5 to give an error.
      7197a976
    • Benjamin Cumming's avatar
      Merge github.com:eth-cscs/nestmc-proto · 0d1e0c00
      Benjamin Cumming authored
      0d1e0c00
  3. Mar 05, 2017
    • Alexander Peyser's avatar
      dependencies in docs/model/makefile to building images (#149) · 15041be0
      Alexander Peyser authored
      Build images.dir when building report.pdf
      Add outputs to .gitignore
      15041be0
    • Sam Yates's avatar
      Add linear kinetic schemes to modcc. (#145) · 5846f90b
      Sam Yates authored
      Incorporate symbolic GE code from prototype (with some simplifications) in msparse.hpp, symge.hpp and symge.cpp, together with unit tests.
      
      Add two kinetic scheme test cases for validation: test_kin1 (simple exponential scheme) and test_kinlva (combination of exponential gate and a three-species kinetic scheme, modelling a low voltage-activated Calcium channel from Wang, X. J. et al., J. Neurophys. 1991).
      
      Adapt numeric HH validation data generation to LVA Ca channel, with explicit stopping at stimulus discontinuities.
      
      Add two new validation tests based on above: kinetic.kin1_numeric_ref and kinetic.kinlva_numeric_ref (multicore backend only).
      
      Introduce a BlockRewriterBase visitor base class, as an aid for visitors that transform/rewrite procedure bodies; refactor KineticRewriter over this class.
      
      Introduce common error_stack mixin class for common functionality across Module and the various procedure rewriters.
      
      Implement visitors and public-facin...
      5846f90b
  4. Feb 21, 2017
  5. Feb 20, 2017
    • Ben Cumming's avatar
      Fix pointer to view conversion for optimized intel kernels (#153) · 000ee422
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      Bug: `modcc` was generating invalid code when generating optimized kernels.
      
      The optimized kernels use raw pointers instead of views, and the generated code was using view semantics.
      
      * Use appropriate `memory::copy` invocation for the optimized kernel case.
      000ee422
    • Ben Cumming's avatar
      Add dry run feature (#151) · 61d6b21d
      Ben Cumming authored
      Add a dry run mode, inspired by the dry run mode implemented in NEST. A dry run
      of a model simulates running a large distributed model by running only the work
      of one of the ranks, with artificial spike input from the other "dummy" ranks.
      
      This is implemented as a new global communication back end, dryrun_global_policy,
      the implementation of which is straightforward:
      
      a new implementation of gather_spikes that takes the local spikes and
      replicates them n times where n is the total number of simulated
      ranks.
      the global_policy::size() method returns the number of ranks in the
      simulated run
      the new back end has to store some state that records the number
      of simulated ranks and cells per rank, which are set using the new
      global_policy::set_sizes() method
      Some CMake modificatins were required:
      
      make the selection of the global communication backend have the same
      interface as that for selecting the threading back end.
      small improvements to the selection of the threa...
      61d6b21d
  6. Feb 08, 2017
  7. Feb 07, 2017
  8. Feb 01, 2017
    • Alexander Peyser's avatar
      Threading pool (#144) · 6c98c1fc
      Alexander Peyser authored and Sam Yates's avatar Sam Yates committed
      Add threading pool built on `std::thread`
      
      * Provide new threading model 'cthread' for nestmc based on a pool of `std::thread` objects.
      * Unify duplicated timer class provided by `serial`, `omp` and now `cthread` threading models.
      6c98c1fc
  9. Jan 21, 2017
  10. Jan 12, 2017
    • John Biddiscombe's avatar
      CMake fixes (#137) · 71aa4b18
      John Biddiscombe authored
      * Fix CMakeLists to handle build as a subproject
      
      When several CMake generated projects are build together, it is common
      practice to have a 'superproject' CMakeLists that uses
        add_subdir(proj1)
        add_subdir(proj2)
        ...
      where each subproject is a self contained CMake based project
      (Example proj1=HPX, proj2=nestmc, proj3=another, ...)
      
      CMAKE_SOURCE_DIR always points to the top level directory which
      is the superproject dir in this case, whereas PROJECT_SOURCE_DIR
      always points to the root of the current project() in the CMakeLists
      so one shouod use PROJECT_SOURCE_DIR as this gets the relative paths
      correct.
      
      * Add option to turn off auto generation from *.mod files
      
      * Fix #134 : Change CMake WITH_OPTION to NMC_WITH_OPTION, compiler #define to NMC_HAVE_OPTION
      
      1) The user may select an option by saying NMC_WITH_XXX
      
      2) This may trigger CMake to use find_package(...) or setup some
      other variables. CMake can then set variable NMC_HAVE_XXX and add a
      what has actually...
      71aa4b18
    • Vasileios Karakasis's avatar
      Fix Clang 3.9 compilation (#138) · d2c05fb0
      Vasileios Karakasis authored
      d2c05fb0
  11. Dec 22, 2016
  12. Dec 21, 2016
  13. Dec 20, 2016
    • Ben Cumming's avatar
      generalised stimulus (#126) · 8b30c273
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      feature: #67 (GPU Support)
      
      Implement stimulii as part of the mechanism framework, as described here: #87 (comment)
      
      * A hand-written stimulus point process derived from `mechanisms::mechanism` was written for each back end. 
      * The lowered `fvm_multicell` type explicitly constructs a stimulus mechanism if there are any stimuli attached to the its cells.
      * This mechanism is added to the other mechanisms in the lowered cell, so that the update of current is performed in the current update loop (i.e. via the `nrn_current()`) method.
      
      This isn't an ideal solution: we still have a hard coded stimulus type in the lowered cell, however the stimulus is now "in the right spot", and we can refine this better when we work on a better design for generalised mechanisms (i.e. when we have figured out what we going to do).
      
      fixes #104.
      8b30c273
    • Vasileios Karakasis's avatar
      Feature/mechanisms unit tests (#96) · fc7e2785
      Vasileios Karakasis authored and Sam Yates's avatar Sam Yates committed
      These tests are intended to test the sanity of the `modcc` generated code for the individual mechanisms. The don't have any physical background. Potentially optimized CPU-targeted mechanisms generated in the build are compared with unoptimized mechanisms generated from the reference modules.
      
      * Add generic unit tests for individual mechanisms.
      * Make unit tests exercise potential problems with aliased indexes (point processes).
      * Ensure unit tests correspond to multiple low level vector operations.
      * Ensure unit tests run with voltage, current and indices initialized with varying values.
      * Refactor CMake code for module compilation to reduce cut-and-paste code and build complexity.
      fc7e2785
  14. Dec 19, 2016
  15. Dec 13, 2016
    • Sam Yates's avatar
      Re-instate ball-and-taper validation tests. (#124) · 1963634e
      Sam Yates authored
      Fixes #85
      1963634e
    • Sam Yates's avatar
      Fix modcc precedence parsing bug (#127) · dfb32094
      Sam Yates authored
      * Modify `parse_expression` to take a controlling (parent) precedence.
      * `parse_expression` folds left over sequences of sub-expressions with decreasing operator precedence (accumulates in `lhs`).
      * Use recursion rather than accumulator for left fold in `parse_binop` to simplify code logic.
      * Extend parser unit test to cover more complicated, multi-level expression.
      * Remove (now) redundant parenthesis from derivative check block in kinetic rewriter test.
      
      Fixes #94
      dfb32094
    • Ben Cumming's avatar
      Bug/issue#20 (#123) · fbe3f45a
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      This PR addresses two issues that were closely related:
      * correctly accounting for the current contribution of density mechanisms to CVs at branch points, where the density mechnanism is not present on all branches. This was discussed in issue #20.
      * adding support for weighting of current densities calculated from density mechanism. This is required to weight the current contribution to CVs in issue #20.
      
      ## small updates
      
      * update CMake rules for finding libunwind, because it broke for some reason.
      * add `binary_find` and unit tests to the algorithms library
          * returns an iterator, as opposed to `std::binary_search`, which returns a boolean.
          * works with ranges.
      * added `subrange_view` specialization that takes a subrange specified by a pair of indexes
      * added `assign_from` to range utils
          * a helper function that returns a proxy type that can be copied into a container
          * evaluate a range and store contents in a container, with minimal verbosity in user cod...
      fbe3f45a
    • Vasileios Karakasis's avatar
      Cyclic iterators and cyclic range views (#119) · 06be3ec6
      Vasileios Karakasis authored and Sam Yates's avatar Sam Yates committed
      Add cyclic iterators and cyclic range view.
      
      Cyclic iterators wrap around when the reach the end of the underlying range over which they are defined.
      06be3ec6
  16. Dec 09, 2016
    • Alexander Peyser's avatar
      Add initializer_list version for is_in in modccutil.hpp (#122) · 368d3284
      Alexander Peyser authored and Sam Yates's avatar Sam Yates committed
      Fix `is_in` compilation error with initializer lists and clang 3.7.1.
      
      Addresses part of issue #121: `template <typename T, int N> bool is_in(T thing, const T (&list)[N])` fails to match against an initializer list second argument with clang-3.7.1 in `modcc/cprinter.cpp`.
      
      * Add overload `template <typename T> bool is_in(T thing, const std::initializer_list<T> list) ` for `is_in` in `modccutil.hpp`. Fixes clang issue and verified to work with a version of gcc as well.
      368d3284
  17. Nov 30, 2016
    • Sam Yates's avatar
      Work around xlC 13.1.4 compiler bugs. (#115) · d73f2240
      Sam Yates authored
      Addresses in part issue #113.
      
      * Make compatibility wrappers/functions that dance around xlC
        bugs. Wrappers are provied in `util/compat.hpp` and live in
        the `compat` namespace.
            - `compat::end` reimplements `std::end` but in a way that
      	apparently does not trigger the xlC bug.
            - `compat::compiler_barrier_if_xlc_leq()` inserts a compiler
      	reordering barrier if the compiler is xlC and the version
      	less than or equal to that specified. Name is deliberately
      	verbose.
            - `compat::isinf()` is an inline wrapper around `std::isinf()`,
      	which apparently is sufficient to defuse an evaluation
      	order bug with `std::isinf()` in switch statements.
      * Use `compat::compiler_barrier_if_xlc_leq()` in `util::unitialized`
        reference access methods to avoid improper reordering with -O2.
      * Use `compat::isinf()` in `test_math.cpp` to defuse improper
        reordering within `EXPECT_EQ` gtest macro of `std::isinf()`.
      * Use `compat::end()` in `util::back()` and `util::cend()` to avoid
        incorrect `std::end()` behaviour with -O2.
      * Use `util::cend()` in `algorithms::sum()`, again to avoid
        incorrect `std::end()` behaviour with -O2.
      d73f2240
  18. Nov 29, 2016
  19. Nov 25, 2016
    • Sam Yates's avatar
      Add KINETIC block rewriter (issue #63) (#95) · 4e229b01
      Sam Yates authored
      Adds a new KineticRewriter visitor that transforms (after semantic analysis) a parsed KINETIC procedure into an equivalent DERIVATIVE procedure. The visitor takes a ProcedureExpression and composes the equivalent procedure, available via the as_procedure() method on the visitor object.
      
      Move common functinality for 'local' variable insertion during transformation phase to new files astmanip.?pp.
      Add Expression method for directly setting scope.
      Use scope_ptr type alias widely.
      Implement correct clone() behaviour for DerivativeExpression
      Implement KineticRewriter transforming visitor class.
      Add equivalence test for KineticRewriter: the test incorporates a simple ad-hoc algebraic expression simplifier.
      Add unit test to Parser.parse_binop to exercise bug #94
      4e229b01
    • Ben Cumming's avatar
      Bug/issue#97 (#102) · db5a7362
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      This addresses all of the compiler warnings and errors for xlc when compiled at -O0. There are still compiler bugs when compiling with higher optimization levels, however they are more challenging.
      
      * Ignore the incorrect `-Wno-missing-braces` warnings (similarly to Clang).
      * Remove `-qhalt=e flag` inserted by CMake.
      * Remove redundant comparison of char to EOF in lexer.
      * The XLC compiler was crashing inexplicably on one call of the following method:
         ```void run(..., const std::vector<float>& excl={}) {...}```
        This was fixed by not having a default value for the last argument.
      * Add some curly braces to silence warning for dangling else.
      
      fixes #97
      db5a7362
    • Sam Yates's avatar
      Correct pointer casting operations in `uninitialized` (#101) · 62b57271
      Sam Yates authored
      Correct pointer casting operations in `uninitialized`: issue #100
      62b57271
  20. Nov 21, 2016
    • Ben Cumming's avatar
      fix modcc bug printing else branches (#93) · bc6bb3ba
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      fixes #90
      
      The c and cuda printer were not printing else branches in if else statements.
      * added logic for printing else branches
      * added if-else expressions to data/test.mod
      
      No unit tests were added because we don't currently have a unit testing framework for the output mechanisms.
      bc6bb3ba
  21. Nov 16, 2016
    • Ben Cumming's avatar
      Feature/gpu validation issue #68 (#84) · 0aafd72d
      Ben Cumming authored and Sam Yates's avatar Sam Yates committed
      Fixes #68
      Corresponding feature: #67
      
      * Reproduce the hh-soma validation test on GPU.
      * Reproduce the ball and stick model on GPU.
      * Reproduce miniapp spike chains.
      * Add `cell_group` unit test to the cuda unit tests: builds simple ball and stick model and integrates for 50ms and records how many spikes occur; it is a simple early warning that something is broken, but is no substitute for the validation tests.
      * Update the `validate_soma`, `validate_ball_and_stick` and `validate_synapses` validation tests for the GPU backend:
          * refactor individual tests into test runner functions that are templated on lowered cell type;
          * for each of the original validation tests add a cuda (.cu) implementation, and write an additional "backend" field to the validation trace metadata.
      * Use a `CPrinter` to generate the same `net_receive` block that is used for the multicore backend.
        Note: this is not efficient, because each read/write requires a cuda memcpy betwe...
      0aafd72d
    • Sam Yates's avatar
      Bugfix/issue 82 (#83) · a8aa3f03
      Sam Yates authored
      Fixes #80
        * Avoid ctor ambiguity by using parentheses for copy ctor invocation with `nlohmann::json` class.
      
      Fixes #82
      a8aa3f03
  22. Nov 15, 2016
    • Sam Yates's avatar
      Bugfix: issue #80 (#81) · b00374ed
      Sam Yates authored
      Bugfix: issue #80 
      
      * Avoid ctor ambiguity by using parentheses for copy ctor invocation with `nlohmann::json` class.
      b00374ed