BlueBrain / EModelRunner

Runs cells from stand-alone packages.
Other
15 stars 6 forks source link

NRNUNIT_USE_LEGACY: consider using old NEURON constant values #81

Open anilbey opened 1 year ago

anilbey commented 1 year ago

Problem

NEURON 8.0 introduces a breaking change in the constant values [1, 2].

The NEURON our supercomputer (the one used in generating the packages) does not take this change into consideration (therefore uses the old constants).

The NEURON on Pypi does take this change into consideration (uses the new constants).

Here are the changes in those values over years. R is some gas constant. FARADAY is the Faraday constant.

Year     R           FARADAY   
2014    8.3144598   96485.33289
2010    8.3144621   96485.3365
2002    8.314472    96485.3383
1998    8.314472    96485.3415
1986    8.314510    96485.309
1973    8.31441     96486.95

Solution

We probably need to set the NRNUNIT_USE_LEGACY flag in EmodelRunner so that users will use the old constants as we used them in our supercomputer.

We can set the parameter either with export NRNUNIT_USE_LEGACY=1 or with h.nrnunit_use_legacy(True) [3].

References

  1. https://nrn.readthedocs.io/en/8.2.2/changelog.html#id23
  2. https://www.neuron.yale.edu/phpBB/viewtopic.php?t=3783
  3. https://nrn.readthedocs.io/en/8.2.2/python/envvariables.html#nrnunit-use-legacy
AurelienJaquier commented 1 year ago

I propose we change this in the packages, not in EModelRunner. Each package could have an export NRNUNIT_USE_LEGACY=1 in their run_py.sh. If we do it this way, we would also have the packages in the EModelRunner example folder to change. Finally, since the synplas packages are already out, we could implement the nrnunit_use_legacy in EModelRunner for this particular case.

anilbey commented 1 year ago

I see, that sounds good to me.