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

Fix for Neuron9.0 #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
4 changes: 4 additions & 0 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@

</div>

<p>
<b>Changelog:</b><br>
2022-05: Updated MOD files to contain valid C++ and be compatible with the upcoming versions 8.2 and 9.0 of NEURON.
</p>
</body>

</html>
9 changes: 7 additions & 2 deletions mechanisms/ProbAMPANMDA_EMS.mod
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ VERBATIM
#include<stdio.h>
#include<math.h>

#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

Expand Down Expand Up @@ -308,7 +313,7 @@ VERBATIM
: each instance. However, the corresponding hoc Random
: distribution MUST be set to Random.negexp(1)
*/
value = nrn_random_pick(_p_rng);
value = nrn_random_pick(RANDCAST _p_rng);
//printf("random stream for this simulation = %lf\n",value);
return value;
}else{
Expand All @@ -317,7 +322,7 @@ ENDVERBATIM
: independent of nhost or which host this instance is on
: is desired, since each instance on this cpu draws from
: the same stream
value = scop_random(1)
value = scop_random()
VERBATIM
}
ENDVERBATIM
Expand Down
9 changes: 7 additions & 2 deletions mechanisms/ProbGABAAB_EMS.mod
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,13 @@ VERBATIM
#include<stdio.h>
#include<math.h>

#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

Expand Down Expand Up @@ -307,7 +312,7 @@ VERBATIM
: each instance. However, the corresponding hoc Random
: distribution MUST be set to Random.uniform(1)
*/
value = nrn_random_pick(_p_rng);
value = nrn_random_pick(RANDCAST _p_rng);
//printf("random stream for this simulation = %lf\n",value);
return value;
}else{
Expand All @@ -316,7 +321,7 @@ ENDVERBATIM
: independent of nhost or which host this instance is on
: is desired, since each instance on this cpu draws from
: the same stream
urand = scop_random(1)
urand = scop_random()
VERBATIM
}
ENDVERBATIM
Expand Down