Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2ebce10
First integration of CLI11 in Coreneuron
st4rl3ss Mar 22, 2019
366bbc0
CLI11 integration completed.
st4rl3ss Mar 25, 2019
f74ee0f
Fixed integration tests for new CLI
st4rl3ss Mar 25, 2019
d441ad5
Small fixes and changes
st4rl3ss Mar 25, 2019
250d3ab
cn_parameters structure includes constructor and parse function
st4rl3ss Mar 26, 2019
614099e
Removed paths from cmdline_interface tests.
st4rl3ss Mar 26, 2019
224de5e
Fix function mismatch
st4rl3ss May 31, 2019
958480e
Missing newline at EOF
st4rl3ss Jun 12, 2019
03c1a27
Integrating Ioannis suggestions
st4rl3ss Jun 13, 2019
242a3a9
Finished integrating Ioannis suggestions
st4rl3ss Jun 13, 2019
4424165
Changed cn_par to corenrn_param to make it clearer
st4rl3ss Jun 13, 2019
eb2e44b
Printing parameters works correctly also on MPI. Program now correctl…
st4rl3ss Jun 14, 2019
7610463
Now program doesn't print empty string parameters
st4rl3ss Jun 14, 2019
88c1035
Small modification to exception handling in main. Updates to README.m…
st4rl3ss Jun 17, 2019
9c796cc
More details on new CLI on README.md
st4rl3ss Jun 17, 2019
87900f9
README.md layout updated
st4rl3ss Jun 17, 2019
f03ca46
Clarification on the README.md
st4rl3ss Jun 18, 2019
900bac0
Fixed integration tests for CLI and GPU
st4rl3ss Jun 18, 2019
a8ee6c4
Further fixes for integration tests for CLI and GPU
st4rl3ss Jun 18, 2019
f8e8227
Even further fixes for integration tests for CLI and GPU
st4rl3ss Jun 18, 2019
bfc46b4
Added `--show` option to facilitate debugging.
st4rl3ss Jun 19, 2019
91ea90d
Debugging jenkins issues
st4rl3ss Jun 24, 2019
6486250
Fixed default values.
st4rl3ss Jun 24, 2019
7bb48c0
Reverted to old jenkins script.
st4rl3ss Jun 25, 2019
24986cb
Some clarification on the README
st4rl3ss Jul 1, 2019
5982693
Integrated @ohm314 suggestions
st4rl3ss Jul 4, 2019
0730188
Included special error handling for single dash arguments
st4rl3ss Jul 9, 2019
b98dde0
Clean code, mainly scoping variables
Jan 17, 2020
463ce89
More cleaning
Jan 27, 2020
8b5352c
More fixes
Jan 27, 2020
bedd712
Fix usage of _STRIDE
Jan 28, 2020
a54041a
use std::vector for nt.tml
Jan 28, 2020
a1a3f62
Fix use of _PRAGMA_FOR_INIT_ACC_LOOP_
Jan 28, 2020
c156477
Fix a free usage when variable is created with new
Jan 28, 2020
c8b8c6d
Merge remote-tracking branch 'origin/master' into CLI11
Jan 30, 2020
6cf24bb
Some fixes
Jan 31, 2020
026afec
More about the old option --write-config
Jan 31, 2020
7b6d630
Update CLI11 to v1.9.0
Jan 31, 2020
5e98336
Reduce impact of corenrn_parameters
Jan 31, 2020
0618122
Remove copy of command line help in README
Jan 31, 2020
18e4788
Merge remote-tracking branch 'origin/master' into more_clean
Jan 31, 2020
6138388
Revert "use std::vector for nt.tml"
Jan 31, 2020
0c06b98
Use more boolean for flags
Jan 31, 2020
6ea5ed3
Fix more warnings
Jan 31, 2020
bc82e58
Fix some warnings
Jan 31, 2020
967067e
Fix compilation of tests for now
Feb 3, 2020
e41c1c2
Remove /Users/kumbhar/.spack config
pramodk Feb 3, 2020
f377ab8
continue
Feb 4, 2020
69ab57d
Revert the openacc part
Feb 4, 2020
92a5e81
Fix revert
Feb 4, 2020
dbd71f7
Fix rewrite and use of last tml
Feb 4, 2020
d48c24e
blind fix
Feb 4, 2020
d3229e7
Cannot use redirection in acc range
Feb 4, 2020
4310f61
Merge remote-tracking branch 'origin/more_clean' into CLI11
Feb 5, 2020
cbadf9e
Fix to reduce modifications
Feb 5, 2020
2848d06
CMake download submodule if it doesn't exists
Feb 5, 2020
4cba8e3
Some compilers refuse to convert "" ton const std::string&
Feb 5, 2020
eeb0109
Fix API CLI
Feb 6, 2020
233a5aa
nrniv_decl can have only basic c type
Feb 7, 2020
e9863d8
Don't modify generated files and warn next developers
Feb 7, 2020
fb2e972
Merge remote-tracking branch 'origin/more_clean' into CLI11
Feb 7, 2020
bccfd38
Add a parameter --version
Feb 7, 2020
7047e12
Fix CLI11 inclusion
Feb 10, 2020
0f2daf0
Merge remote-tracking branch 'origin/master' into CLI11
Feb 10, 2020
2b0d2f9
CMake I hate you so much
Feb 10, 2020
e4ce54e
Fix errors of merge
Feb 10, 2020
d5851e1
Try to fix the equivalence with neurodamus
Feb 10, 2020
92855a5
Make version return without errors
Feb 10, 2020
4a7335a
Revert "Make version return without errors"
Feb 10, 2020
4070811
Remove --version option
Feb 10, 2020
e59f22a
Get rid of sdprintf
Feb 12, 2020
1860dfd
Stop creating test files in source dir
Feb 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "external/mod2c"]
path = external/mod2c
url = https://github.com/BlueBrain/mod2c
[submodule "external/CLI11"]
path = external/CLI11
url = https://github.com/CLIUtils/CLI11.git
[submodule "external/nmodl"]
path = external/nmodl
url = https://github.com/BlueBrain/nmodl
23 changes: 23 additions & 0 deletions CMake/AddCLI11Submodule.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# =============================================================================
# Copyright (C) 2020 Blue Brain Project
#
# See top-level LICENSE file for details.
# =============================================================================


include(FindPackageHandleStandardArgs)
find_package(FindPkgConfig QUIET)
find_path(CLI11_PROJ NAMES CMakeLists.txt PATHS "${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11")
find_package_handle_standard_args(CLI11 REQUIRED_VARS CLI11_PROJ)

if(NOT CLI11_FOUND)
find_package(Git 1.8.3 QUIET)
if(NOT ${GIT_FOUND})
message(FATAL_ERROR "git not found, clone repository with --recursive")
endif()
message(STATUS "Sub-module CLI11 missing: running git submodule update --init --recursive")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --
${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11
WORKING_DIRECTORY ${CORENEURON_PROJECT_SOURCE_DIR})
endif()

9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
# =============================================================================

cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
project(coreneuron)
project(coreneuron VERSION 0.16.0)

# =============================================================================
# CMake common project settings
# =============================================================================
set(VERSION_MAJOR "0")
set(VERSION_MINOR "16")
set(VERSION_PATCH "0")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
add_definitions(-DCORENRN_VERSION="${PROJECT_VERSION}")
set(CMAKE_BUILD_TYPE
RelWithDebInfo
CACHE STRING "Empty or one of Debug, Release, RelWithDebInfo")
Expand Down Expand Up @@ -46,6 +43,8 @@ include(ReleaseDebugAutoFlags)
include(CrayPortability)
include(SetRpath)
include(CTest)
include(AddCLI11Submodule)
add_subdirectory(${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11)

# =============================================================================
# Build options
Expand Down
63 changes: 12 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Note that the CUDA Toolkit version should be compatible with PGI compiler instal
You have to run GPU executable with the `--gpu` or `-gpu`. Make sure to enable cell re-ordering mechanism to improve GPU performance using `--cell_permute` option (permutation types : 2 or 1):

```bash
mpirun -n 1 ./bin/nrniv-core -d ../tests/integration/ring -mpi -e 100 --gpu --cell_permute 2
mpirun -n 1 ./bin/nrniv-core --mpi --gpu --tstop 100 --datpath ../tests/integration/ring --cell-permute 2
```

Note that if your model is using Random123 random number generator, you can't use same executable for CPU and GPU runs. We suggest to build separate executable for CPU and GPU simulations. This will be fixed in future releases.
Expand Down Expand Up @@ -132,65 +132,26 @@ cmake .. -DCMAKE_CXX_FLAGS="-O3 -g" \

## RUNNING SIMULATION:

Note that the CoreNEURON simulator dependends on NEURON to build the network model: see [NEURON](https://www.neuron.yale.edu/neuron/) documentation for more information. Once you build the model using NEURON, you can launch CoreNEURON on the same or different machine by:
Note that the CoreNEURON simulator depends on NEURON to build the network model: see [NEURON](https://www.neuron.yale.edu/neuron/) documentation for more information. Once you build the model using NEURON, you can launch CoreNEURON on the same or different machine by:

```bash
export OMP_NUM_THREADS=2 #set appropriate value
mpiexec -np 2 build/bin/nrniv-core -e 10 -d /path/to/model/built/by/neuron -mpi
mpiexec -np 2 build/bin/nrniv-core --tstop 10 --datpath /path/to/model/built/by/neuron --mpi
```

[This tutorial](https://github.com/nrnhines/ringtest) provide more information for parallel runs and performance comparison.

In order to see the command line options, you can use:
### Command Line Interface

```bash
/path/to/isntall/directory/nrniv-core --help
-b, --spikebuf ARG Spike buffer size. (100000)
-c, --threading Parallel threads. The default is serial threads.
-d, --datpath ARG Path containing CoreNeuron data files. (.)
-dt, --dt ARG Fixed time step. The default value is set by
defaults.dat or is 0.025.
-e, --tstop ARG Stop time (ms). (100)
-f, --filesdat ARG Name for the distribution file. (files.dat)
-g, --prcellgid ARG Output prcellstate information for the gid NUMBER.
-gpu, --gpu Enable use of GPUs. The default implies cpu only
run.
-h, --help Print a usage message briefly summarizing these
command-line options, then exit.
-k, --forwardskip ARG Forwardskip to TIME
-l, --celsius ARG Temperature in degC. The default value is set in
defaults.dat or else is 34.0.
-mpi Enable MPI. In order to initialize MPI environment
this argument must be specified.
-o, --outpath ARG Path to place output data files. (.)
-p, --pattern ARG Apply patternstim using the specified spike file.
-R, --cell-permute ARG Cell permutation, 0 No; 1 optimise node adjacency; 2
optimize parent adjacency. (1)
-s, --seed ARG Initialization seed for random number generator
(int).
-v, --voltage ARG Initial voltage used for nrn_finitialize(1, v_init).
If 1000, then nrn_finitialize(0,...). (-65.)
-W, --nwarp ARG Number of warps to balance. (0)
-x, --extracon ARG Number of extra random connections in each thread to
other duplicate models (int).
--binqueue Use bin queue.
--checkpoint ARG Enable checkpoint and specify directory to store
related files.
--mindelay ARG Maximum integration interval (likely reduced by
minimum NetCon delay). (10)
--ms-phases ARG Number of multisend phases, 1 or 2. (2)
--ms-subintervals ARG Number of multisend subintervals, 1 or 2. (2)
--multisend Use Multisend spike exchange instead of Allgather.
--read-config ARG Read configuration file filename.
--restore ARG Restore simulation from provided checkpoint
directory.
--show Print args.
--skip-mpi-finalize Do not call mpi finalize.
--spkcompress ARG Spike compression. Up to ARG are exchanged during
MPI_Allgather. (0)
--write-config ARG Write configuration file filename.
```
:warning: :warning: :warning: **In a recent update the command line interface was updated, so please update your scripts accordingly!**

Some details on the new interface:

The new command line interface is based on CLI11. You can find more details by running `coreneuron_exec --help`.

Multiple characters options with single dash (`-gpu`, `-mpi`, `-dt`) are **not** supported anymore. All those options now require a double dash (`--gpu`, `--mpi`, `--dt`), but single characters options still support a single dash (e.g. `-g`).

The format of the configuration options file has changed, regenerate them if there is any problem.

## Results

Expand Down
2 changes: 2 additions & 0 deletions coreneuron/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ file(GLOB_RECURSE CORENEURON_HEADER_FILES "*.h*")
file(GLOB_RECURSE CORENEURON_TEMPLATE_FILES "*.ipp")
file(GLOB CORENEURON_CODE_FILES
"apps/main1.cpp"
"apps/corenrn_parameters.cpp"
"gpu/*.cpp"
"io/*.cpp"
"mechanism/*.cpp"
Expand Down Expand Up @@ -173,6 +174,7 @@ target_link_libraries(coreneuron
${CALIPER_LIB}
${CALIPER_MPI_LIB}
${likwid_LIBRARIES})
target_include_directories(coreneuron SYSTEM PRIVATE ${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11/include)

target_link_libraries(corenrnmech scopmath coreneuron)

Expand Down
Loading