I am new to Neuron. Currently I am following Chapter11 to build a small network. First, I wrote the mod file named invlfire:
Code: Select all
NEURON {
ARTIFICIAL_CELL IntervalFire
RANGE tau, m, invl
}
PARAMETER {
tau = 5 (ms) <1e-9,1e9>
invl = 10 (ms) <1e-9,1e9>
}
ASSIGNED {
m minf
t0(ms)
}
INITIAL {
minf = 1/(1 - exp(-invl/tau)) : so natural spike interval is invl
m = 0
t0 = t
net_send(firetime(), 1)
}
NET_RECEIVE (w) {
m = M()
t0 = t
if (flag == 0) {
m = m + w
if (m > 1) {
m = 0
net_event(t)
}
net_move(t+firetime())
} else {
net_event(t)
m = 0
net_send(firetime(), 1)
}
}
FUNCTION firetime()(ms) { : m < 1 and minf > 1
firetime = tau*log((minf-m)/(minf - 1))
}
FUNCTION M() {
M = minf + (m - minf)*exp(-(t - t0)/tau)
}
After that, I launch nrngui but I did not see "Additional mechanisms from files invlfire.mod" appeared at the end of Nueron's startup message. Does this mean the mod file was not compiled successfully?gcc -DDLL_EXPORT -DPIC -I/cygdrive/c/nrn71/src/scopmath -I/cygdrive/c/nrn71/src/nrnoc -I/cygdrive/c/nrn71/src/oc -I/cygdrive/c/nrn71/lib -I/cygdrive/c/nrn71/gccinc -I/cygdrive/c/nrn71/gcc3inc -L/cygdrive/c/nrn71/gcclib -c mod_func.c
nocmodl IntervalFire
Translating IntervalFire.mod into IntervalFire.c
Thread Safe
gcc -DDLL_EXPORT -DPIC -I/cygdrive/c/nrn71/src/scopmath -I/cygdrive/c/nrn71/src/nrnoc -I/cygdrive/c/nrn71/src/oc -I/cygdrive/c/nrn71/lib -I/cygdrive/c/nrn71/gccinc -I/cygdrive/c/nrn71/gcc3inc -L/cygdrive/c/nrn71/gcclib -c IntervalFire.c
rm IntervalFire.c
gcc -I/cygdrive/c/nrn71/lib -I/cygdrive/c/nrn71/gccinc -I/cygdrive/c/nrn71/gcc3inc -L/cygdrive/c/nrn71/gcclib -shared -o nrnmech.dll mod_func.o IntervalFire.o \
-L/cygdrive/c/nrn71/bin -lnrniv
Info: resolving _nrn_point_prop_ by linking to __imp__nrn_point_prop_ (auto-import)
ld: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.Info: resolving _pnt_receive by linking to __imp__pnt_receive (auto-import)
Info: resolving _pnt_receive_size by linking to __imp__pnt_receive_size (auto-import)
rebase -b 0x64000000 -v nrnmech.dll
nrnmech.dll: new base = 64000000, new size = 10000
nrnmech.dll was built successfully.
Press Return key to exit
Then I uninstall Neuron 7.1 and install Neuron 7.2 alpha version. When compiling the same mod file, it said:
Then I launch nrngui but still I did not see "Additional mechanisms from files invlfire.mod" appeared at the end of Nueron's startup message.gcc -DDLL_EXPORT -DPIC -I/cygdrive/C/nrn72/src/scopmath -I/cygdrive/C/nrn72/src/nrnoc -I/cygdrive/C/nrn72/src/oc -I/cygdrive/C/nrn72/lib -I/cygdrive/C/nrn72/gccinc -I/cygdrive/C/nrn72/gcc3inc -L/cygdrive/C/nrn72/gcclib -c mod_func.c
nocmodl IntervalFire
Translating IntervalFire.mod into IntervalFire.c
Thread Safe
gcc -DDLL_EXPORT -DPIC -I/cygdrive/C/nrn72/src/scopmath -I/cygdrive/C/nrn72/src/nrnoc -I/cygdrive/C/nrn72/src/oc -I/cygdrive/C/nrn72/lib -I/cygdrive/C/nrn72/gccinc -I/cygdrive/C/nrn72/gcc3inc -L/cygdrive/C/nrn72/gcclib -c IntervalFire.c
gcc -I/cygdrive/C/nrn72/lib -I/cygdrive/C/nrn72/gccinc -I/cygdrive/C/nrn72/gcc3inc -L/cygdrive/C/nrn72/gcclib -shared -o nrnmech.dll mod_func.o IntervalFire.o \
-L/cygdrive/C/nrn72/bin -lnrniv
rebase -b 0x64000000 -v nrnmech.dll
nrnmech.dll: new base = 64000000, new size = 10000
nrnmech.dll was built successfully.
Press Return key to exit
I noticed that in the compile instruction website, it said "If all goes well (and it will, for this particular set of mod files), eventually the last message will appear, and the console window will go away on its own. " So I am guessing that something wrong with my mod file compile. I tried this on clean WinXP system running on VMWare, and it is the same result. So could you please give me some advice, thank you very much!
Best,
Pele