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

Set the initial values of ions properly in direct and file mode transfer #780

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

iomaganaris
Copy link
Contributor

Description

Fixes issue with ion variables initial values not being in set in file mode transfer of data between NEURON and CoreNEURON.
Even if this seems like an issue it doesn't seem to influence the behavior of some of the simulations I've tried.

Fixes #779

How to test this?
It's pretty difficult to test this so bare with me.
Add the following change to this branch:

diff --git a/coreneuron/mechanism/eion.cpp b/coreneuron/mechanism/eion.cpp
index 25422326..11b2e150 100644
--- a/coreneuron/mechanism/eion.cpp
+++ b/coreneuron/mechanism/eion.cpp
@@ -316,6 +316,7 @@ void nrn_init_ion(NrnThread* nt, Memb_list* ml, int type) {
     int _cntml_padded = ml->_nodecount_padded;
     pd = ml->data;
     ppd = ml->pdata;
+        printf("nrn_init_ion %d %s conci %lf conco %lf charge %lf celsius %lf\n", type, nrn_get_mechname(type), conci0, conco0, charge, celsius);
     // There was no async(...) clause in the initial OpenACC implementation, so
     // no `nowait` clause has been added to the OpenMP implementation. TODO:
     // verify if this can be made asynchronous or if there is a strong reason it
# build NEURON with CoreNEURON using master and this branch and compare the output of the following
git clone -b magkanar/debug_ions [email protected]:neuronsimulator/ringtest.git
<install_dir>/bin/nrnivmodl -coreneuron mod
mpirun -n 2 ./x86_64/special -mpi -python ringtest.py -dumpmodel
mpirun -n 2 ./x86_64/special-core --mpi -d coredat

You can also print the same string in NEURON and compare the results.

Test System

  • OS: Ubuntu 20.04
  • Compiler: GCC 9.3.0
  • Version: master branch
  • Backend:CPU

@iomaganaris iomaganaris changed the title Magkanar/fix global ions Set the initial values of ions properly in direct and file mode transfer Feb 25, 2022
@BlueBrain BlueBrain deleted a comment from bbpbuildbot Feb 25, 2022
@BlueBrain BlueBrain deleted a comment from bbpbuildbot Feb 25, 2022
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.

Ion related initial values set in the NEURON parser not passed to CoreNEURON
2 participants