From 66a2849e3174e3acc26e4a29a4889474c0f51843 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Fri, 27 May 2022 17:43:13 +0200 Subject: [PATCH] Fix for Neuron9.0 (#1) * Fix for Neuron9.0 * Cleanup for merge. Co-authored-by: Olli Lupton --- ProbGABAAB_EMS_GEPH_g.mod | 9 +++++++-- readme.txt | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ProbGABAAB_EMS_GEPH_g.mod b/ProbGABAAB_EMS_GEPH_g.mod index 7650188..0ce9376 100644 --- a/ProbGABAAB_EMS_GEPH_g.mod +++ b/ProbGABAAB_EMS_GEPH_g.mod @@ -97,8 +97,13 @@ VERBATIM #include #include +#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 @@ -304,7 +309,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{ @@ -313,7 +318,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 diff --git a/readme.txt b/readme.txt index 3a9981e..180f998 100644 --- a/readme.txt +++ b/readme.txt @@ -42,4 +42,9 @@ All the experimental data and other resources can be found in a Live Paper at th Questions on the NEURON simulation should be addressed to (replace -at- with the usual @ symbol): carmen.lupascu-at-pa.ibf.cnr.it -michele.migliore-at-cnr.it \ No newline at end of file +michele.migliore-at-cnr.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.