File tree Expand file tree Collapse file tree 4 files changed +29
-14
lines changed Expand file tree Collapse file tree 4 files changed +29
-14
lines changed Original file line number Diff line number Diff line change 9191For any questions or further assistance please contact:
9292salvadordura at gmail.com
9393
94+
95+ ------------------------------------------------------------------------------------------------------
96+ Changelog
97+ -------------------------------------------------------------------------------------------------------
98+
99+ 2022-05:
100+ * Updated MOD files to compile with upcoming 9.0 neuron release
101+ with migration to C++.
102+ * izhi2007.mod is updated in order to compile with current neuron
103+ releases where STATE variables without ODEs or SOLVE block gives an error.
104+ See discussion in https://github.com/ModelDBRepository/194897/pull/2
105+
94106</ pre > </ html >
95107
Original file line number Diff line number Diff line change @@ -78,13 +78,12 @@ ASSIGNED {
7878 :t0 : Previous time
7979 factor : Voltage factor used for calculating the current
8080 eventflag : For diagnostic information
81- }
8281
82+ : State variables without ODEs / SOLVE block and hence converted
83+ : to ASSIGN. See https://github.com/ModelDBRepository/194897/pull/2
8384
84- : State variables
85- STATE {
86- V (mV) : Membrane voltage
87- u (mV) : Slow current/recovery variable
85+ V : Membrane voltage
86+ u : Slow current/recovery variable
8887 gAMPA : AMPA conductance
8988 gNMDA : NMDA conductance
9089 gGABAA : GABAA conductance
@@ -125,7 +124,6 @@ PROCEDURE useverbose() { : Create user-accessible function
125124}
126125
127126
128-
129127: Define neuron dynamics
130128BREAKPOINT {
131129 delta = t-t0 : Find time difference
Original file line number Diff line number Diff line change @@ -79,8 +79,13 @@ FUNCTION invl(mean (ms)) (ms) {
7979 }
8080}
8181VERBATIM
82+ #ifndef NRN_VERSION_GTEQ_8_2_0
8283double nrn_random_pick(void* r);
8384void* nrn_random_arg(int argpos);
85+ #define RANDCAST
86+ #else
87+ #define RANDCAST (Rand*)
88+ #endif
8489ENDVERBATIM
8590
8691FUNCTION erand() {
@@ -91,7 +96,7 @@ VERBATIM
9196 : each instance. However, the corresponding hoc Random
9297 : distribution MUST be set to Random.negexp(1)
9398 */
94- _lerand = nrn_random_pick(_p_donotuse);
99+ _lerand = nrn_random_pick(RANDCAST _p_donotuse);
95100 }else{
96101 /* only can be used in main thread */
97102 if (_nt != nrn_threads) {
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ NET_RECEIVE (w) {
3232
3333DESTRUCTOR {
3434VERBATIM
35- void * vv = (void *)(_p_ptr);
36- if (vv) {
35+ IvocVect * vv = (IvocVect *)(_p_ptr);
36+ if (vv) {
3737 hoc_obj_unref(*vector_pobj(vv));
3838 }
3939ENDVERBATIM
@@ -46,8 +46,8 @@ VERBATIM
4646 if (i >= 0) {
4747 vv = (void*)(_p_ptr);
4848 if (vv) {
49- size = vector_capacity(vv);
50- px = vector_vec(vv);
49+ size = vector_capacity((IvocVect*) vv);
50+ px = vector_vec((IvocVect*) vv);
5151 if (i < size) {
5252 etime = px[i];
5353 index += 1.;
@@ -65,15 +65,15 @@ ENDVERBATIM
6565PROCEDURE play() {
6666VERBATIM
6767 void** pv;
68- void * ptmp = NULL;
68+ IvocVect * ptmp = NULL;
6969 if (ifarg(1)) {
7070 ptmp = vector_arg(1);
7171 hoc_obj_ref(*vector_pobj(ptmp));
7272 }
7373 pv = (void**)(&_p_ptr);
7474 if (*pv) {
75- hoc_obj_unref(*vector_pobj(*pv));
75+ hoc_obj_unref(*vector_pobj((IvocVect*) *pv));
7676 }
7777 *pv = ptmp;
7878ENDVERBATIM
79- }
79+ }
You can’t perform that action at this time.
0 commit comments