You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+37-14Lines changed: 37 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ In addition to this, you will need other [NEURON dependencies](https://github.co
23
23
24
24
## Installation
25
25
26
-
CoreNEURON is now integrated into the development version of the NEURON simulator. If you are a NEURON user, the preferred way to install CoreNEURON is to enable extra build options during NEURON installation as follows:
26
+
**CoreNEURON** is now **integrated into** the **development version** of the **NEURON** simulator. If you are a NEURON user, **the preferred way** to **install CoreNEURON** is to **enable extra build options** during **NEURON installation** as follows:
27
27
28
28
1. Clone the latest version of NEURON:
29
29
@@ -56,7 +56,7 @@ Note that if you are building on Cray system with the GNU toolchain, you have to
56
56
export CRAYPE_LINK_TYPE=dynamic
57
57
```
58
58
59
-
3. Run CMake with the appropriate [options](https://github.com/neuronsimulator/nrn#build-using-cmake) and additionally enable CoreNEURON with `-DNRN_ENABLE_CORENEURON=ON` option:
59
+
3. Run CMake with the appropriate [options](https://github.com/neuronsimulator/nrn/blob/master/docs/install/install_instructions.md#install-neuron-using-cmake) and additionally enable CoreNEURON with `-DNRN_ENABLE_CORENEURON=ON` option:
60
60
61
61
```
62
62
cmake .. \
@@ -86,8 +86,9 @@ NOTE : If the CMake command fails, please make sure to delete temporary CMake ca
86
86
4. Build and Install : once the configure step is done, you can build and install the project as:
87
87
88
88
```bash
89
-
make -j install
89
+
cmake --build . --parallel 8 --target install
90
90
```
91
+
Feel free to define the number of parallel jobs building by setting a number for the `--parallel` option.
91
92
92
93
## Building Model
93
94
@@ -127,7 +128,7 @@ With CoreNEURON, existing NEURON models can be run with minimal changes. For a g
127
128
3. If GPU support is enabled during build, enable GPU execution using :
128
129
```
129
130
coreneuron.gpu = True
130
-
```
131
+
```
131
132
132
133
4. Use `psolve` to run simulation after initialization :
133
134
@@ -234,6 +235,32 @@ For other errors, please [open an issue](https://github.com/BlueBrain/CoreNeuron
234
235
235
236
## Developer Build
236
237
238
+
#### Running Unit and Integration Tests
239
+
240
+
As **CoreNEURON** is mostly used as a compute library of **NEURON** it needs to be incorporated with **NEURON** to test most of its functionality. Consequently its tests are included in the NEURON repository. To enable and run all the tests of **CoreNEURON** you need to add the `-DNRN_ENABLE_TESTS=ON` CMake flag in **NEURON**.
241
+
Those tests include:
242
+
* Unit tests of NEURON
243
+
* Unit tests of CoreNEURON
244
+
* Integration tests comparing NEURON, CoreNEURON and reference files
245
+
*[ringtest](https://github.com/neuronsimulator/ringtest) tests with NEURON and CoreNEURON
246
+
*[testcorenrn](https://github.com/neuronsimulator/testcorenrn) tests with NEURON and CoreNEURON
247
+
Some of those tests are going to be also run with various backends in case that those are enabled (for example with GPUs).
248
+
To build NEURON with CoreNEURON and run the tests you need to:
249
+
250
+
```bash
251
+
cd nrn/build
252
+
cmake .. \
253
+
-DNRN_ENABLE_CORENEURON=ON \
254
+
-DNRN_ENABLE_INTERVIEWS=OFF \
255
+
-DNRN_ENABLE_RX3D=OFF \
256
+
-DCMAKE_INSTALL_PREFIX=$HOME/install
257
+
-DCMAKE_C_COMPILER=icc \
258
+
-DCMAKE_CXX_COMPILER=icpc \
259
+
-DNRN_ENABLE_TESTS=ON
260
+
cmake --build . --parallel 8
261
+
ctest # use --parallel for speed, -R to run specific tests
262
+
```
263
+
237
264
#### Building standalone CoreNEURON without NEURON
238
265
239
266
If you want to build the standalone CoreNEURON version, first download the repository as:
@@ -248,14 +275,10 @@ Once the appropriate modules for compiler, MPI, CMake are loaded, you can build
248
275
```bash
249
276
mkdir CoreNeuron/build &&cd CoreNeuron/build
250
277
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install
251
-
make -j && make install
278
+
cmake --build . --parallel 8 --target install
252
279
```
253
280
254
-
If you don't have MPI, you can disable the MPI dependency using the CMake option `-DCORENRN_ENABLE_MPI=OFF`. Once build is successful, you can run tests using:
255
-
256
-
```
257
-
make test
258
-
```
281
+
If you don't have MPI, you can disable the MPI dependency using the CMake option `-DCORENRN_ENABLE_MPI=OFF`.
259
282
260
283
#### Compiling MOD files
261
284
@@ -275,7 +298,7 @@ CoreNEURON has support for GPUs using the OpenACC programming model when enabled
275
298
module purge all
276
299
module load nvidia-hpc-sdk/20.11 cuda/11 cmake openmpi # change pgi, cuda and mpi modules
You have to run GPU executable with the `--gpu` flag. Make sure to enable cell re-ordering mechanism to improve GPU performance using `--cell_permute` option (permutation types : 2 or 1):
@@ -314,14 +337,14 @@ In order to format code with `cmake-format` and `clang-format` tools, before cre
0 commit comments