Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MOD-C-2-CPP: Compatibility fixed for NEURON 9.0, 8.2 and 8.1 #1

Merged
merged 3 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion burststim2.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ FUNCTION invl(mean (ms)) (ms) {
}
}
VERBATIM
#ifndef NRN_VERSION_GTEQ_8_2_0
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
#define RANDCAST
#else
#define RANDCAST (Rand*)
#endif
ENDVERBATIM

FUNCTION erand() {
Expand All @@ -82,7 +87,7 @@ VERBATIM
: each instance. However, the corresponding hoc Random
: distribution MUST be set to Random.negexp(1)
*/
_lerand = nrn_random_pick(_p_donotuse);
_lerand = nrn_random_pick(RANDCAST _p_donotuse);
}else{
ENDVERBATIM
: the old standby. Cannot use if reproducible parallel sim
Expand Down
2 changes: 1 addition & 1 deletion ichan2.mod
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ INITIAL {
ns = nsinf

VERBATIM
return 0;
return;
ENDVERBATIM
}

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@ There are small quantitative differences from the published results,
but the model still works as described.
To reproduce the published results, comment out the "rates(v)" line in the
DERIVATIVE block of IA.mod.
**********************************
**********************************

Changelog
---------
2022-05: Updated MOD files to contain valid C++ and be compatible with
the upcoming versions 8.2 and 9.0 of NEURON.
7 changes: 6 additions & 1 deletion regn_stim.mod
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ FUNCTION invl(mean (ms)) (ms) {
tspike = tspike + mean
}
VERBATIM
#ifndef NRN_VERSION_GTEQ_8_2_0
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
#define RANDCAST
#else
#define RANDCAST (Rand*)
#endif
ENDVERBATIM

FUNCTION erand() {
Expand All @@ -94,7 +99,7 @@ VERBATIM
: each instance. However, the corresponding hoc Random
: distribution MUST be set to Random.normal(0, 1) (BPG)
*/
_lerand = nrn_random_pick(_p_donotuse);
_lerand = nrn_random_pick(RANDCAST _p_donotuse);
}else{
ENDVERBATIM
: the old standby. Cannot use if reproducible parallel sim
Expand Down