can't load mknrndll issue

Suggestions for improvements to the NEURON Forum.
Post Reply
Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

can't load mknrndll issue

Post by Sun Xiaoqing » Mon Sep 09, 2019 8:27 pm

Good day,
I'm new at NEURON and I was wondering if someone could help me with this.

I'm trying to follow the instructions by ModelDB:
https://senselab.med.yale.edu/ModelDB/S ... e.m#tabs-1

My system is Win10 and when I double click mknrndll, these massages shows:

Can't load NEURON resources from D:\nrn;C:\nrn/lib/nrn.def[aults]
NEURON -- VERSION 7.7.2 7.7 (2b7985ba) 2019-06-20
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

0
0
0
0
C:\nrn\bin\nrniv.exe: Couldn't find: stdlib.hoc
in C:/nrn/lib/hoc/mknrndll.hoc near line 7
{load_file("stdlib.hoc", "String")}
^
1
C:\nrn\bin\nrniv.exe: String is not a template
in C:/nrn/lib/hoc/mknrndll.hoc near line 75
tobj = new String(tstr)
^
I've downloaded NEURON twice, the first time I downloaded it on D drive, and the second time on C drive.

Any ideas on how to fix this?

Thanks.

Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

Re: can't load mknrndll issue

Post by Sun Xiaoqing » Mon Sep 09, 2019 11:24 pm

I also tried auto-launch and the error message is as followed:

/cygdrive/C/nrn
/cygdrive/C/nrn/bin:/cygdrive/C/nrn/mingw/usr/bin:/cygdrive/C/nrn/mingw/mingw64/bin:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files/MATLAB/R2017b/bin:/cygdrive/d/MATLAB/R2018a/runtime/win64:/cygdrive/d/MATLAB/R2018a/bin:/cygdrive/c/Program Files/MATLAB/R2017a/runtime/win64:/cygdrive/c/Program Files/MATLAB/R2017a/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Users/sunxi/AppData/Local/Microsoft/WindowsApps:/cygdrive/d/nrn/bin:/cygdrive/d/nrn/mingw/usr/bin:/cygdrive/c/nrn/bin:/usr/bin
Changing the current directory to /cygdrive/C/Users/sunxi/AppData/Local/Temp/214
Archive: nrnzip.zip
creating: eaps/
creating: eaps/output/
creating: eaps/hoc/
creating: eaps/hoc/params/
inflating: eaps/hoc/params/line_params.hoc
inflating: eaps/hoc/params/line_params_d.hoc
inflating: eaps/hoc/params/line_params_c.hoc
inflating: eaps/hoc/params/line_params_b.hoc
inflating: eaps/hoc/params/ca1pyr_standard_params.hoc
inflating: eaps/hoc/params/d151_params_d.hoc
inflating: eaps/hoc/params/d151_params_c.hoc
inflating: eaps/hoc/params/d151_params.hoc
inflating: eaps/hoc/params/d151_params_a.hoc
inflating: eaps/hoc/params/d151_params_b.hoc
inflating: eaps/hoc/params/line_standard_params.hoc
creating: eaps/hoc/src/
inflating: eaps/hoc/src/refs.hoc
inflating: eaps/hoc/src/cell_util.hoc
inflating: eaps/hoc/src/file_util.hoc
inflating: eaps/hoc/src/current_util.hoc
inflating: eaps/hoc/src/main.hoc
inflating: eaps/hoc/src/mechdesc.hoc
inflating: eaps/hoc/src/membrane_init.hoc
creating: eaps/mat/
creating: eaps/mat/plot_cell/
inflating: eaps/mat/plot_cell/cylinder_num_pts.m
inflating: eaps/mat/plot_cell/plot_cell.m
inflating: eaps/mat/plot_cell/plot_neuron_3d.m
inflating: eaps/mat/plot_cell/plot_cell_labels.m
creating: eaps/mat/neuron_util/
inflating: eaps/mat/neuron_util/check_current_balance.m
inflating: eaps/mat/neuron_util/get_neuron_geom.m
inflating: eaps/mat/neuron_util/diff_neuron_params.m
inflating: eaps/mat/neuron_util/get_neuron_param_value.m
inflating: eaps/mat/neuron_util/get_neuron_current.m
creating: eaps/mat/plot_intra/
inflating: eaps/mat/plot_intra/plot_intra_detail.m
inflating: eaps/mat/plot_intra/compare_intra_trials.m
creating: eaps/mat/plot_extra/
inflating: eaps/mat/plot_extra/plot_eap_grid.m
inflating: eaps/mat/plot_extra/plot_eap_voltage_gradients.m
inflating: eaps/mat/plot_extra/compare_extra_trials.m
creating: eaps/mat/cell_settings/
inflating: eaps/mat/cell_settings/get_detail_secs.m
inflating: eaps/mat/cell_settings/get_detail_xs.m
creating: eaps/mat/lsa/
inflating: eaps/mat/lsa/pack_memory.m
inflating: eaps/mat/lsa/zplane_eap_calc.m
inflating: eaps/mat/lsa/get_phi.m
inflating: eaps/mat/lsa/get_h.m
creating: eaps/mat/lsa/temp/
creating: eaps/mat/meas_eap/
inflating: eaps/mat/meas_eap/measure_eap_peaks.m
inflating: eaps/mat/meas_eap/measure_cap_rise_derivs.m
inflating: eaps/mat/meas_eap/measure_repol_derivs.m
inflating: eaps/mat/meas_eap/measure_eap.m
inflating: eaps/mat/meas_eap/measure_k_phase_decay.m
inflating: eaps/mat/meas_eap/measure_waveform_width.m
inflating: eaps/mat/meas_eap/plot_eap_measure.m
inflating: eaps/mat/meas_eap/plot_meas_compare.m
inflating: eaps/mat/meas_eap/define_measure_columns.m
inflating: eaps/mat/addpaths.m
creating: eaps/mat/file_util/
inflating: eaps/mat/file_util/undo_trial.m
inflating: eaps/mat/file_util/get_last_trial_num.m
inflating: eaps/mat/file_util/get_root_path.m
inflating: eaps/mat/file_util/make_file_name.m
creating: eaps/mat/plot_util/
inflating: eaps/mat/plot_util/load_voltage_data_2d.m
inflating: eaps/mat/plot_util/search_smse.m
inflating: eaps/mat/plot_util/voltage_plot_scale.m
inflating: eaps/mat/plot_util/get_next_fig.m
inflating: eaps/mat/plot_util/make_2D_pt_coords.m
inflating: eaps/mat/plot_util/pick_start_end.m
inflating: eaps/mat/plot_util/check_start_end.m
inflating: eaps/mat/plot_util/find_detail_column.m
inflating: eaps/mat/plot_util/get_voltage_trace.m
inflating: eaps/mat/plot_util/pick_axis.m
inflating: eaps/README.txt
creating: eaps/cells/
inflating: eaps/cells/d151.hoc
inflating: eaps/cells/line.hoc
creating: eaps/mod/
inflating: eaps/mod/inact_ca_currs.inc
inflating: eaps/mod/kadist.mod
inflating: eaps/mod/nax.mod
inflating: eaps/mod/inact_na_currs.inc
inflating: eaps/mod/hdend.mod
inflating: eaps/mod/naf.mod
inflating: eaps/mod/README.txt
inflating: eaps/mod/kk.mod
inflating: eaps/mod/kaprox.mod
inflating: eaps/mod/kc.mod
inflating: eaps/mod/kd.mod
inflating: eaps/mod/cat.mod
inflating: eaps/mod/noinact_gate_states.inc
inflating: eaps/mod/noinact_ca_currs.inc
inflating: eaps/mod/noinact_nak_currs.inc
inflating: eaps/mod/var_funcs.inc
inflating: eaps/mod/inact_gate_states.inc
inflating: eaps/mod/inact_k_currs.inc
inflating: eaps/mod/km.mod
inflating: eaps/mod/cal.mod
inflating: eaps/mod/kahp.mod
inflating: eaps/mod/can.mod
inflating: eaps/mod/cadif.mod
inflating: eaps/mod/hsoma.mod
inflating: eaps/mod/car.mod
inflating: eaps/mod/noinact_k_currs.inc
creating: eaps/docs/
inflating: eaps/docs/index.html
Missing the mosinit.hoc or mosinit.py file
Clean up by removing directory /cygdrive/C/Users/sunxi/AppData/Local/Temp/214 ? (n/y):y

ted
Site Admin
Posts: 5591
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: can't load mknrndll issue

Post by ted » Tue Sep 10, 2019 12:18 pm

when I double click mknrndll, these massages shows:

Can't load NEURON resources from D:\nrn;C:\nrn/lib/nrn.def[aults]
. . .
I've downloaded NEURON twice, the first time I downloaded it on D drive, and the second time on C drive.
No, you INSTALLED NEURON twice, and now you have at least one broken installation of NEURON. First thing you need to do is get rid of ALL installations of NEURON on your PC, and any traces of NEURON that may remain in MSWin's PATH. Go to C:\nrn and execute the uninstall.exe that you find in that directory. Then go to D:\nrn and execute the uninstall.exe in that directory. When you are done, there should be no C:\nrn and no D:\nrn.

Then reboot Windows, and install NEURON on the C: drive. After that, go to the NEURON program group and execute the program neurondemo. In the "NEURON Demonstrations" panel click on the radio button labeled "Release". Then in the RunControl panel click on the button labeled "Init & Run". You should see a bunch of windows, including three graphs that show plots of membrane potential, calcium currents, and calcium concentrations plotted as functions of time.

ted
Site Admin
Posts: 5591
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: can't load mknrndll issue

Post by ted » Tue Sep 10, 2019 12:29 pm

I also tried auto-launch
which didn't work because this model isn't packaged in a way that allows auto-launch to work. How do I know, without even trying it? Two ways. First, auto-launch requires the presence of a mosinit.hoc file. ModelDB entry 84589 doesn't come with a mosinit.hoc file. Second, this model DOES have a set of detailed instructions in the file eaps/docs/index.html, and those instructions don't say anything about auto-launch.

Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

Re: can't load mknrndll issue

Post by Sun Xiaoqing » Tue Sep 10, 2019 11:24 pm

Dear Ted,

Thank you for your advice, I tried to follow your instruction but unfortunately, the first time I uninstalled D:\nrn I put it in the recycle bin then deleted it without using the uninstall.exe, so I couldn't erase the traces of D:\nrn, so I uninstall C:\nrn instead. Then when I double-clicked mknrndll, this time it worked. And the EAPS files downloaded form the ModelDB were installed in C:\.

I came across a problem when I was following the instructions.
The instructions given in the ModelDB are given as:

2.Run the Command Prompt application (under Accessories, on the start menu)
3.Change the directory to eaps. If you put the EAPS package in c:\ (the root directory) then you would use the command:

cd c:\eaps

4. Enter the following command and parameters (copy & paste):

c:\nrn59\bin\neuron.exe -dll mod\nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc

Since I put nrn in D:\, I changed Step 4 into :
d:\nrn\bin\neuron.exe -dll mod\nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc


and the result was:
Microsoft Windows [版本 10.0.17763.678]
(c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\sunxi>cd c:\eaps

c:\eaps>d:\nrn\bin\neuron.exe -dll mod\nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc

c:\eaps>NEURON -- VERSION 7.7.2 7.7 (2b7985ba) 2019-06-20
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

loading membrane mechanisms from mod/nrnmech.dll
Additional mechanisms from files
cadif.mod cal.mod can.mod car.mod cat.mod hdend.mod hsoma.mod kadist.mod kahp.mod kaprox.mod kc.mod kd.mod kk.mod km.mod naf.mod nax.mod
LOADING GEOMETRY FOR d151

-> Setting file roots...
SETTING WINDOWS FILE PATHS!

-> Updating trial number...
.\cells\d151_trial_num.txt
trial number 4

-> Making output directory...
COMMAND = mkdir output/d151_0004
The syntax of the command is incorrect.
RESULT = 1
COMMAND = mkdir output/d151_0004/nrn
The syntax of the command is incorrect.
RESULT = 1

-> Opening param & geometry files...

-> Loading param files...
LOADING CELL SPECIFIC MEMBRANE CONDUCTANCE DENSITIES...
param_dir = hoc/params
params file = hoc/params//d151_params.hoc
LOADING Cell Sepcific Params D151(A)!
D:\nrn\bin\nrniv.exe: output\d151_0004\nrn\d151_0004_param_names.txt :file is not open
in d151_params.hoc near line 34
gkk = 0.02
^
File[1].printf("%s
", "gkk")
write_param("gkk", "0.02")
define_param("gkk", "0.02")
xopen("d151_params.hoc")
and others
LOADING STANDARD MEMBRANE PARAMS FOR CELL TYPE:ca1pyr
LOADING STANDARD PARAMS for CA1 pyramidal cells...
D:\nrn\bin\nrniv.exe: output\d151_0004\nrn\d151_0004_param_names.txt :file is not open
in ca1pyr_standard_params.hoc near line 51
tstop = 25
^
File[1].printf("%s
", "tstop")
write_param("tstop", "25")
define_param("tstop", "25")
xopen("ca1pyr_sta...")
and others

-> Loading code files...
open cell util: hoc/src/cell_util.hoc
open current util: hoc/src/current_util.hoc
open template for mechanism description: hoc/src/mechdesc.hoc
D:\nrn\bin\nrniv.exe: String : a template cannot be redefined
in mechdesc.hoc near line 47
begintemplate String
^
xopen("mechdesc.hoc")
execute1("{xopen("me...")
load_file("hoc/src/me...")
load_code_files()
open membrane init file: hoc/src/membrane_init.hoc
D:\nrn\bin\nrniv.exe: MechDesc is not a template
in membrane_init.hoc near line 1182
tmp_ref = new MechDesc("naf", "na", "gbar")
^
xopen("membrane_i...")
execute1("{xopen("me...")
load_file("hoc/src/me...")
load_code_files()

-> Making section lists...
Making make_apical_lists...
D:\nrn\bin\nrniv.exe: undefined variable trunk_min_diam
in membrane_init.hoc near line 148
make_lists()
^
make_apical_lists()
make_lists()
oc>

Is there any way that I could fix these problems? Thank you for your advice!

ted
Site Admin
Posts: 5591
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: can't load mknrndll issue

Post by ted » Wed Sep 11, 2019 12:10 pm

Sure. Forget about Windows. Use Linux instead. The code runs without complaint under Linux. Making it work under Windows is going to be a major pain.

Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

Re: can't load mknrndll issue

Post by Sun Xiaoqing » Sat Sep 14, 2019 9:31 am

Thank you for your suggestions, but the situation is that I can't change my system into Linux and I also tried some other ways to fix this problem which unfortunately failed. So I put the nrn files in D:\ which could make mknrndll work normally and I also have complied the mod file using mknrndll.

My question is:
1. Are there some other ways that I can run this model without using cmd (Command Prompt application )?
2. after removing the statement { neuron_name = "d151" , I double-clicked the eaps\cells\d151.hoc file and successfully got the shape plot.
cell_type = "ca1pyr" }
Then I tried to load other hoc files from Neuron Main Menu\File\Load hoc to load: eaps\hoc\src\file_until.hoc but and other hoc files needed for this
model, but I didn't seem to work.
3. I don't understand that with these files in the eaps folders, what should I do to apply all the hoc files to the existing neuron that I created. Is it a
must that I have to use cmd?

Thanks again for your kind response. I really appreciate your help.

Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

Re: can't load mknrndll issue

Post by Sun Xiaoqing » Sat Sep 14, 2019 9:35 am

When I double-clicked eaps\hoc\params\ca1pyr_standard_params.hoc. The error massage is as shown:

NEURON -- VERSION 7.7.2 7.7 (2b7985ba) 2019-06-20
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

LOADING STANDARD PARAMS for CA1 pyramidal cells...
D:\nrn\bin\nrniv.exe: define_param undefined function
in C:/eaps/hoc/params/ca1pyr_standard_params.hoc near line 51
define_param("tstop","25")
^
define_param("tstop", "25")
oc>
What does it mean and how can I fix it?

ted
Site Admin
Posts: 5591
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: can't load mknrndll issue

Post by ted » Sat Sep 14, 2019 11:31 am

Are there some other ways that I can run this model without using cmd
Nope.
after removing the statement { neuron_name = "d151" , I double-clicked the eaps\cells\d151.hoc file and successfully got the shape plot.
cell_type = "ca1pyr" }
Then I tried to load other hoc files from Neuron Main Menu\File\Load hoc to load: eaps\hoc\src\file_until.hoc but and other hoc files needed for this model, but I didn't seem to work.
I'm not surprised. The author of this model wrote code that was supposed to protect you from such tedious details. But Windows changed and NEURON changed in ways that the author did not anticipate, so the code doesn't work any more.
I don't understand that with these files in the eaps folders, what should I do to apply all the hoc files to the existing neuron that I created. Is it a must that I have to use cmd?
The original implementation required one to use cmd. Even if someone fixed it so that it worked with the current versons of Windows and NEURON, you'd still have to use cmd.

Sun Xiaoqing
Posts: 24
Joined: Wed Aug 28, 2019 1:18 am

Re: can't load mknrndll issue

Post by Sun Xiaoqing » Sun Sep 15, 2019 11:09 am

Thank you for the response. Now I've changed to another computer which is also Win10 and downloaded nrn file in the C:\ , and the path issue was solved. When I typed these code in cmd, these error message occurred:

Code: Select all

Microsoft Windows [版本 10.0.17763.737]
(c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\qin>cd c:\eaps

c:\eaps>c:\nrn\bin\neuron.exe -dll mod\nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc

c:\eaps>NEURON -- VERSION 7.7.2 7.7 (2b7985ba) 2019-06-20
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

loading membrane mechanisms from mod/nrnmech.dll
Additional mechanisms from files
 cadif.mod cal.mod can.mod car.mod cat.mod hdend.mod hsoma.mod kadist.mod kahp.mod kaprox.mod kc.mod kd.mod kk.mod km.mod naf.mod nax.mod
Could not open C:/Users/qin/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Anaconda3 (64-bit)/Anaconda Prompt.lnk
Could not open C:/Users/qin/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Anaconda3 (64-bit)/Anaconda Prompt.lnk
Cannot find executable python3 or python
LOADING GEOMETRY FOR d151

-> Setting file roots...
SETTING WINDOWS FILE PATHS!

-> Updating trial number...
.\cells\d151_trial_num.txt
trial number 9

-> Making output directory...
COMMAND = mkdir output/d151_0009
The syntax of the command is incorrect.
RESULT = 1
COMMAND = mkdir output/d151_0009/nrn
The syntax of the command is incorrect.
RESULT = 1

-> Opening param & geometry files...

-> Loading param files...
LOADING CELL SPECIFIC MEMBRANE CONDUCTANCE DENSITIES...
param_dir = hoc/params
params file = hoc/params//d151_params.hoc
LOADING Cell Sepcific Params D151(A)!
C:\nrn\bin\nrniv.exe: output\d151_0009\nrn\d151_0009_param_names.txt :file is not open
 in d151_params.hoc near line 34
 gkk = 0.02
           ^
        File[1].printf("%s
", "gkk")
      write_param("gkk", "0.02")
    define_param("gkk", "0.02")
  xopen("d151_params.hoc")
and others
LOADING STANDARD MEMBRANE PARAMS FOR CELL TYPE:ca1pyr
LOADING STANDARD PARAMS for CA1 pyramidal cells...
C:\nrn\bin\nrniv.exe: output\d151_0009\nrn\d151_0009_param_names.txt :file is not open
 in ca1pyr_standard_params.hoc near line 51
 tstop = 25
           ^
        File[1].printf("%s
", "tstop")
      write_param("tstop", "25")
    define_param("tstop", "25")
  xopen("ca1pyr_sta...")
and others

-> Loading code files...
open cell util: hoc/src/cell_util.hoc
open current util: hoc/src/current_util.hoc
open template for mechanism description: hoc/src/mechdesc.hoc
C:\nrn\bin\nrniv.exe: String : a template cannot be redefined
 in mechdesc.hoc near line 47
 begintemplate String
                    ^
        xopen("mechdesc.hoc")
      execute1("{xopen("me...")
    load_file("hoc/src/me...")
  load_code_files()
open membrane init file: hoc/src/membrane_init.hoc
C:\nrn\bin\nrniv.exe: MechDesc is not a template
 in membrane_init.hoc near line 1182
     tmp_ref = new MechDesc("naf", "na", "gbar")
                                               ^
        xopen("membrane_i...")
      execute1("{xopen("me...")
    load_file("hoc/src/me...")
  load_code_files()

-> Making section lists...
Making make_apical_lists...
C:\nrn\bin\nrniv.exe: undefined variable trunk_min_diam
 in membrane_init.hoc near line 148
 make_lists()
             ^
        make_apical_lists()
      make_lists()
My question is:
1.

Code: Select all

Could not open C:/Users/qin/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Anaconda3 (64-bit)/Anaconda Prompt.lnk
Could not open C:/Users/qin/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Anaconda3 (64-bit)/Anaconda Prompt.lnk
Cannot find executable python3 or python
When I downloaded Anaconda, I didn't toggle the first box which asked me to add Anaconda to my Path Environment Variable, and I wonder if it was the reason why these error message s occurred.

2. As you said before, since NEURON and WIndow changed, so if I want to make this code work, I have to revise the hoc code according to the error messages generated, right? Is there going to be a huge change in the code?

Thank you so much for always answering my question, that really helps a lot.

Post Reply