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

Fixes for NEURON 9.0.0, 8.2.0, 8.1.0 #1

Merged
merged 5 commits into from
May 30, 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
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ However the MPI multisend implementation can be used on any MPI installed
system. In particular the two-phase exchange method may be useful.
The exchange methods are implemented mostly in src/nrniv/bgpdma.cpp .

Changelog
---------
2022-05: Updated MOD files to contain valid C++ and be compatible with the
upcoming versions 8.2 and 9.0 of NEURON.
14 changes: 11 additions & 3 deletions invlfire.mod
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ NEURON {
RANGE noutput, ninput : count number of spikes generated and coming in
}

VERBATIM
#ifndef NRN_VERSION_GTEQ_8_2_0
extern void* nrn_random_arg(int);
extern double nrn_random_pick(void*);
#define RANDCAST
#else
#define RANDCAST (Rand*)
#endif
ENDVERBATIM

PARAMETER {
tau = 5 (ms) <1e-9,1e9>
invl = 10 (ms) <1e-9,1e9> : varies if r is non-nil
Expand Down Expand Up @@ -77,11 +87,10 @@ FUNCTION firetime()(ms) { : m < 1 and minf > 1

PROCEDURE specify_invl() {
VERBATIM {
extern double nrn_random_pick(void*);
if (!_p_r) {
return 0.;
}
invl = nrn_random_pick((void*)_p_r);
invl = nrn_random_pick(RANDCAST _p_r);
if (t >= burst_start && t <= burst_stop) {
invl *= burst_factor;
}
Expand All @@ -93,7 +102,6 @@ ENDVERBATIM

PROCEDURE set_rand() {
VERBATIM {
extern void* nrn_random_arg(int);
void** ppr;
ppr = (void**)(&(_p_r));
*ppr = nrn_random_arg(1);
Expand Down