nrnrandom.h: declare nrn*random* to mechanisms.#1755
Conversation
In this commit the declared prototypes take void*, which does not correspond to the definitions.
Note that this change is **optional**, this PR does not require that this (frequently copy/pasted) block is removed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1755 +/- ##
=======================================
Coverage 45.38% 45.38%
=======================================
Files 551 551
Lines 113144 113144
=======================================
Hits 51355 51355
Misses 61789 61789 ☔ View full report in Codecov by Sentry. |
|
https://github.com/neuronsimulator/nrn-modeldb-ci/actions/runs/2070364088 showed that an earlier version of this PR (0369a15) only stopped one model from ModelDB from compiling. The issue in that model is sgate.mod, which contains both and VERBATIM
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
ENDVERBATIMso in the translated code we get something like #define r _p[9]
double nrn_random_pick(void* r);which declares Removing the |
|
https://github.com/neuronsimulator/nrn-modeldb-ci/actions/runs/2071195877 is running against the latest (72105f5) version of this PR. https://bbpgitlab.epfl.ch/hpc/coreneuron/-/pipelines/45215 is testing the same revision in the CoreNEURON pipeline, which includes BBP models. |
|
The latest tests showed no further issues, and ModelDBRepository/187604#1 fixes the compilation failure noted above in |
* compatibility for master using neuronsimulator/nrn#1755 * Update README. * update readme mentioned tagged release Co-authored-by: Pramod S Kumbhar <pramod.s.kumbhar@gmail.com> Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch>
* neuronsimulator/nrn#1755 lets us drop declarations. * other changes preparing for neuronsimulator/nrn#1597. Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch>
* channel-benchmark!9 * HumanBrainProject/olfactory-bulb-3d#19, actually this PR merged into 2to3 branch. * neuronsimulator/nrntest#26 * neuronsimulator/reduced_dentate#5 * neuronsimulator/testcorenrn#10 * neuronsimulator/tqperf#11 * BlueBrain/CoreNeuron#792 * BlueBrain/CoreNeuron#793 The new versions should still support being translated to C code by NEURON versions with #1755, but should additionally support being translated to C++ code: see #1597. Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch> Co-authored-by: Ioannis Magkanaris <iomagkanaris@gmail.com> Co-authored-by: Jorge Blanco Alonso <jorge.blancoalonso@epfl.ch>
In this commit the declared prototypes take
void*, which does not correspond to the definitions inivocrand.cpp.Additionally,
nrn_set_random_sequenceis declared to take anintsecond argument, despite its definition expecting along.The logic behind this change is that the declarations which are added to
nrnrandom.hcorrespond to those that commonly occur in MOD files, even though they are not quite correct. In principle this means that adding these declarations to the headers that are implicitly included in translated MOD files will not introduce compilation failures in these models, because they are the same as the declarations included in the MOD files themselves.The declarations added in this PR correspond to the
[[deprecated]]overloads of these methods that are included in #1597. The motivation for this change is that it makes it easier to update external models to be forward-compatible with #1597 ("NEURON 9") -- by removing declarations and adding casts -- while remaining compatible withmasterbefore that PR is merged (but after this PR is merged, "NEURON 8.2").