Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Conversation

@nrnhines
Copy link
Collaborator

@nrnhines nrnhines commented Apr 17, 2021

ParallelContext.psolve(tstop) behavior for CoreNEURON direct mode is same as NEURON only.
This means CoreNEURON direct mode does not do its own version of finitialize().
On entry to CoreNEURON, all state needed to continue a simulation is copied from NEURON (including Event Queue).
On exit from CoreNEURON all state needed to continue the simulation in NEURON is copied from CoreNEURON (including EventQueue)

This pull request is associated with neuronsimulator/nrn#1192

Fixes #416

How to test this?

#clone nrn and checkout psolve-direct
cmake .. -DCMAKE_INSTALL_PREFIX=install  -DPYTHON_EXECUTABLE=`which python3` -DNRN_ENABLE_TESTS=ON -DNRN_ENABLE_CORENEURON=ON
make -j 6 install
make test

Use certain branches for the SimulationStack CI

CI_BRANCHES:NEURON_BRANCH=psolve-direct,

Todos:

  • Make sure to update mod2c submodule

Framework allows sequence of psolve without intervening finitialize.
Trajectory recording appends to Vectors.
  But at least not causing crash if not using net_move.
  This fixed tests 30, 57, 60.
  Tests 71, 74, 79 still failing (watch and vecplay).
@nrnhines nrnhines self-assigned this Apr 17, 2021
@nrnhines nrnhines marked this pull request as draft April 17, 2021 19:06
@alkino
Copy link
Member

alkino commented May 6, 2021

Please retest

@pramodk pramodk closed this Aug 19, 2021
@pramodk pramodk reopened this Aug 19, 2021
@pramodk pramodk closed this Aug 19, 2021
@pramodk pramodk reopened this Aug 19, 2021
@pramodk
Copy link
Collaborator

pramodk commented Aug 19, 2021

99% tests passed, 1 tests failed out of 99
328Total Test time (real) = 337.28 sec
329The following tests FAILED:
330	 15 - coreneuron_modtests::test_netmove_py (Failed)

In last CI, above test failed on GPU with MOD2C as well as NMODL!

Add references to #611 in
comments.
@olupton olupton closed this Aug 20, 2021
@olupton olupton reopened this Aug 20, 2021
@olupton
Copy link
Contributor

olupton commented Aug 20, 2021

The last pipeline on GitLab https://bbpgitlab.epfl.ch/hpc/coreneuron/-/pipelines/14401 was all green in substance, but a glitch stopped the logs being uploaded and the correct status being reported here.

Copy link
Contributor

@olupton olupton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I quickly looked through the whole diff.

As far as I know, the CI pipelines are all "really" passing, but we're having some GitLab issues...

Update comment in allocate_data_in_mechanism_nrn_init()
Change DEBUGQUEUE to CORENRN_DEBU_GQUEUE
Update mod2c to latest master
@olupton olupton closed this Aug 20, 2021
@olupton olupton reopened this Aug 20, 2021
@pramodk pramodk merged commit c432c13 into master Aug 20, 2021
@pramodk pramodk deleted the psolve-direct branch August 20, 2021 13:34
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Aug 20, 2021
…same as NEURON only (#1192)

* See the corresponding change in CoreNEURON:
   BlueBrain/CoreNeuron@c432c13
* This change implements following improvements for CoreNEURON usage:
  - CoreNEURON direct mode does not do its own version of finitialize().
  - On entry to CoreNEURON, all state needed to continue a simulation
    is copied from NEURON (including Event Queue).
  - On exit from CoreNEURON all state needed to continue the simulation
    in NEURON is copied from CoreNEURON (including EventQueue)
* Implementation for copying event queue back to NEURON.
* Updated testcorenrn with more test: neuronsimulator/testcorenrn#5
* Updated coreneuron submodule: BlueBrain/CoreNeuron#528
* Update rst documentation for the new change
* Increase error verbosity for CI debugging.
* h.nrnmpi_init() must be called early to avoid mpi error on exit.
* Add more tests for net_move, net_send and watch statements
* Add tests for neuron<->coreneuron alternate execution
* Test of multiple activated WATCH statements.
  - Note: only one can be triggered at a time.
* psolve transfer corenrn ->  nrn calls bbcore_read in nrn.
  - This is needed at least to update nrnran123 sequence state
    in order to be able to continue psolve on either side.
    Updated coreneuron and testcorenrn.
* Global methods to set and get HOC Random123 sequence.
      int nrn_random123_setseq(Rand* r, uint32_t seq, char which);
      int nrn_random123_getseq(Rand* r, uint32_t* seq, char* which);
    Update external/coreneuron
    Extend a couple tests for psolve.
* Spike transfer from CoreNEURON should append to spike vectors.
    Begin extending tests involving psolve with CoreNERUON to verify
    that psolve is restartable.
* Framework for copying event queue back to NEURON.
* Event Queue NEURON->CoreNEURON NetCon, Presyn, SelfEvent


Co-authored-by: Alexandru S�<83>vulescu <[email protected]>
Co-authored-by: Michael Hines <[email protected]>
Co-authored-by: Olli Lupton <[email protected]>
Co-authored-by: Pramod Kumbhar <[email protected]>

Closes #1066
Closes #826
@olupton olupton mentioned this pull request Oct 21, 2021
5 tasks
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
…same as NEURON only (BlueBrain/CoreNeuron#528)

* This means:
  - CoreNEURON direct mode does not do its own version of finitialize().
  - On entry to CoreNEURON, all state needed to continue a simulation
    is copied from NEURON (including Event Queue).
  - On exit from CoreNEURON all state needed to continue the simulation
    in NEURON is copied from CoreNEURON (including EventQueue)
* Implementation for copying event queue back to NEURON.
* This pull request is associated with neuronsimulator/nrnBlueBrain/CoreNeuron#1192
* Improve GPU TrajectoryRequests support: any variable (voltage, imembrane
  or any mechanism data) can be recorded now.
* Add extra #pragma acc wait while recording values from GPU
    - drop update_{fast_imem,voltage}_from_gpu() methods, those values are now
      copied by the generic trajectory handling.
    - add comment explaining why this version may be quite slow, and how it
      can be improved.
* Updated nmodl to latest master to fix the various issues (CPU & GPU)
* Check the overflow of NetSendBuffer_t from GPU execution
   - See rationale for this change in BlueBrain/mod2c/pull/68
   - Update the mod2c submodule for CI to pick change of BlueBrain/mod2c/pull/68
* Fixed NEURON_BRANCH setting issue in the CI
* Update PatternStim for direct mode. No special treatment except share Info

Fixes BlueBrain/CoreNeuron#416

Co-authored-by: Alexandru S�<83>vulescu <[email protected]>
Co-authored-by: Michael Hines <[email protected]>
Co-authored-by: Olli Lupton <[email protected]>
Co-authored-by: Pramod Kumbhar <[email protected]>
Co-authored-by: Ioannis Magkanaris <[email protected]>
Co-authored-by: Nicolas Cornu <[email protected]>

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@c432c13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incremental simulation in direct memory mode

8 participants