diff --git a/README.html b/README.html index 6fcef5b..6d64fe6 100644 --- a/README.html +++ b/README.html @@ -91,5 +91,17 @@ For any questions or further assistance please contact: salvadordura at gmail.com + +------------------------------------------------------------------------------------------------------ +Changelog +------------------------------------------------------------------------------------------------------- + +2022-05: + * Updated MOD files to compile with upcoming 9.0 neuron release + with migration to C++. + * izhi2007.mod is updated in order to compile with current neuron + releases where STATE variables without ODEs or SOLVE block gives an error. + See discussion in https://github.com/ModelDBRepository/194897/pull/2 + diff --git a/izhi2007.mod b/izhi2007.mod index e1a5433..980f9c3 100644 --- a/izhi2007.mod +++ b/izhi2007.mod @@ -78,13 +78,12 @@ ASSIGNED { :t0 : Previous time factor : Voltage factor used for calculating the current eventflag : For diagnostic information -} + : State variables without ODEs / SOLVE block and hence converted + : to ASSIGN. See https://github.com/ModelDBRepository/194897/pull/2 -: State variables -STATE { - V (mV) : Membrane voltage - u (mV) : Slow current/recovery variable + V : Membrane voltage + u : Slow current/recovery variable gAMPA : AMPA conductance gNMDA : NMDA conductance gGABAA : GABAA conductance @@ -125,7 +124,6 @@ PROCEDURE useverbose() { : Create user-accessible function } - : Define neuron dynamics BREAKPOINT { delta = t-t0 : Find time difference diff --git a/nsloc.mod b/nsloc.mod index e7c8570..f5e0022 100644 --- a/nsloc.mod +++ b/nsloc.mod @@ -79,8 +79,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() { @@ -91,7 +96,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{ /* only can be used in main thread */ if (_nt != nrn_threads) { diff --git a/vecevent.mod b/vecevent.mod index 17305ef..98cc303 100644 --- a/vecevent.mod +++ b/vecevent.mod @@ -32,8 +32,8 @@ NET_RECEIVE (w) { DESTRUCTOR { VERBATIM - void* vv = (void*)(_p_ptr); - if (vv) { + IvocVect* vv = (IvocVect*)(_p_ptr); + if (vv) { hoc_obj_unref(*vector_pobj(vv)); } ENDVERBATIM @@ -46,8 +46,8 @@ VERBATIM if (i >= 0) { vv = (void*)(_p_ptr); if (vv) { - size = vector_capacity(vv); - px = vector_vec(vv); + size = vector_capacity((IvocVect*)vv); + px = vector_vec((IvocVect*)vv); if (i < size) { etime = px[i]; index += 1.; @@ -65,15 +65,15 @@ ENDVERBATIM PROCEDURE play() { VERBATIM void** pv; - void* ptmp = NULL; + IvocVect* ptmp = NULL; if (ifarg(1)) { ptmp = vector_arg(1); hoc_obj_ref(*vector_pobj(ptmp)); } pv = (void**)(&_p_ptr); if (*pv) { - hoc_obj_unref(*vector_pobj(*pv)); + hoc_obj_unref(*vector_pobj((IvocVect*)*pv)); } *pv = ptmp; ENDVERBATIM -} \ No newline at end of file +}