Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Merged
merged 2 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 @@ -82,8 +82,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 @@ -94,7 +99,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
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ We did not find any significant deviation from the published results.
Questions on the NEURON simulation and MATLAB files should be addressed to
(replace -at- with the usual @ symbol):
danielabianchi12-at-gmail.com
pasquale.demichele-at-unina.it
pasquale.demichele-at-unina.it

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 @@ -90,8 +90,13 @@ FUNCTION invl(mean (ms)) (ms) {
: printf(" tspike %f\t invl %f\t t %f \n",tspike, invl,t)
}
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 @@ -102,7 +107,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