Finding mechanisms after mknrndll

Anything that doesn't fit elsewhere.
Post Reply
yvp

Finding mechanisms after mknrndll

Post by yvp »

Hi Ted,

I had Neuron v7.0 on my computer and was able to run models on it. Then I upgraded to v7.1 and am unable to compile any of the models, including those that are on ModelDB and running fine on other computers I tried. I thought it was a version problem, and have tried uninstalling v7.1 and tried v7.0 and v6.2 with no luck. I get two types of error messages. Either the mod compilation is not successful, or after it successfully compiles and I run the hoc file, I get an error message saying there is a syntax error on the line where the mod files have been inserted like

nrniv: syntax error
near line 94
insert hh2


or this error while running the Golomb FS model:

nrniv: Couldn't find: model_and_interface.ses
in load_file("model_and_interface.ses")
^

nrniv: Couldn't find: gifgraph.hoc
in
load_file("gifgraph.hoc") // a class for plotting a graph that has a gif backgroung ^
nrniv: Gparams is not a template
tobj = new Gparams("fig2c_x_200.gif") // gif that is to be displayed in the p lot
^
oc>[/code][/code]


Could you please advise on what I should do?

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

Re: Finding mechanisms after mknrndll

Post by ted »

Delete the i686 subdirectory and all its contents (if you're using MSWin or OS X, delete any nrnmech.dll file and any .o and .c files) that are present. Then run nrnivmodl again (mknrkdll if you'e using MSWin or OS X). Does that help?
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

I deleted the .o and .c files and recompiling them. The compilation itself is successful, with some warnings about thread safety for some models. But the hoc doesnt run and its not able to find the mechanisms.

The one time it worked was when all Neuron versions were uninstalled completely, reinstalled v7.1. Then the first time I used it alone, a modelDB program ran perfectly. After that, neither that code nor others are working.
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Finding mechanisms after mknrndll

Post by ted »

Are you using MSWin or OS X?

First, please make sure that only one version of NEURON is installed. When you run nrngui, what is the first line that NEURON prints?

Next, exit NEURON, then double click on the neurondemo icon (or drag and drop the neurondemo icon on the nrngui icon if you're using OS X), click on the "Release" radio button, then click on the Init & Run button. Did a simulation run?
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

I am using MSwin and have only version 7.1 installed. And yes, the demo simulation runs and works just fine.

The first line I see when i run nrngui is is Neuron Release 7.1 (359:7f113b76a94b) 2009-10-26
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Finding mechanisms after mknrndll

Post by ted »

Which version of MSWin, and service pack, please?

I just now installed NEURON 7.1 on a PC running MSWin 7, downloaded the Golomb FS model, successfully compiled the mod files, and double clicked on the mosinit.hoc file. Result: simulation worked without error messages.
yvp wrote:I deleted the .o and .c files
Did you also delete the nrnmech.dll file?
The compilation itself is successful
Once more, please delete all the .o and .c files, and also the nrnmech.dll file, then compile the mod files with mknrndll. Then create a hoc file in that same directory called hello.hoc that contains the following statement:

Code: Select all

print "hello"
Finally, double click on hello.hoc. In addition to "hello", NEURON should also print something like
"Additional mechanisms from files kd.mod kdr.mod nas.mod"
What do you see?
The one time it worked was when all Neuron versions were uninstalled completely, reinstalled v7.1. Then the first time I used it alone, a modelDB program ran perfectly. After that, neither that code nor others are working.
Did you install NEURON as yourself or as Administrator? If as yourself, are you in any way a "privileged user", or did you have to type an administrator's password to authorize installation?
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

ted wrote:Which version of MSWin, and service pack, please?
MSWin version 6 build 6000 (vista home premium), no service packs have been installed.
ted wrote: Did you install NEURON as yourself or as Administrator? If as yourself, are you in any way a "privileged user", or did you have to type an administrator's password to authorize installation?
I installed it myself, I didnt have to use any admin passwords nor am I a previledged user. (Well I am the only user, its my personal laptop).

I made the new hoc file. Neuron prints hello directly after the version and copyright lines, it doesnt say anything about the mechanisms.

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

Re: Finding mechanisms after mknrndll

Post by ted »

Thanks for all that other information.
yvp wrote:I made the new hoc file. Neuron prints hello directly after the version and copyright lines, it doesnt say anything about the mechanisms.
And your're sure that hello.hoc was in the same directory as the mod files and the nrnmech.dll file? The reason I ask is that NEURON should have automatically read the nrnmech.dll file and printed a message that listed the names of the mod files that had been compiled to create the nrnmech.dll file.
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

Yeah its in the same folder as the other mod files and nrnmech.dll file of that model and I tried it with a couple of different models. Running the main hoc program of the models also has the same result, and there is no information on the mechanisms.
hines
Site Admin
Posts: 1711
Joined: Wed May 18, 2005 3:32 pm

Re: Finding mechanisms after mknrndll

Post by hines »

If you are dragging a hoc file onto the nrngui icon, it may not be the case that nrngui is changing directories
to the one containing the hoc file. Check by typing the interpreter command
getcwd()
to print the current working directory. Generally the directory is correct when one double clicks a hoc file.
What happens when you double click the nrngui icon and then use
NEURONMainMenu/File/WorkingDir
and navigate to where your nrnmech.dll is. When you get there do the models load?
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

Yes the mechanisms loaded correctly when I did this and nrngui printed the mechanisms as being added correctly but opening the hoc still gave many other errors. I then saw the .hoc file properties and the error was that the default program for .hoc files was not clearly defined after I uninstalled Neuron and reinstalled the higher version. I have been opening the .hoc file each time by either choosing Neuron from a list of programs or from nrngui, after the upgrade. I have set the default program for .hoc files as Neuron now and its working fine. I am really sorry for the rookie mistake and thanks a lot for the help.
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Finding mechanisms after mknrndll

Post by ted »

yvp wrote:the default program for .hoc files was not clearly defined after I uninstalled Neuron and reinstalled the higher version.
Really? Exactly what was the default program for hoc files? I ask because it might provide a clue to answering these two key questions that remain unresolved: how is it that the hoc filetype was not associated with neuron.exe, and what is to prevent this from happening again? Another clue might lie in how you uninstalled the previous version of NEURON. Was that done with the Windows add/remove programs tool, or with the uninstaller that is packaged with NEURON and is found in the NEURON program group (which is in the Start menu, or in the list of "all programs" depending on what version of MSWin you're using).
yvp

Re: Finding mechanisms after mknrndll

Post by yvp »

The default program for HOC files was WordPad and the listed file type was HOC file. Now after changing the default program to Neuron, the file type has also changed to Neuron Model File. And yes I used only the Windows Add/Remove Programs to uninstall older versions, I will use the Neuron uninstaller next time and hopefully that will avoid this. Thanks
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Finding mechanisms after mknrndll

Post by ted »

yvp wrote:The default program for HOC files was WordPad
Which isn't even a decent text editor. Good thing MicroSoft abandoned the idea of adding a ham sandwich to Windows--would probably have given people food poisoning.
Now after changing the default program to Neuron, the file type has also changed to Neuron Model File.
Which is as it should be.
And yes I used only the Windows Add/Remove Programs to uninstall older versions
There's the cause of the problem.
I will use the Neuron uninstaller next time
That's the thing to do.
Post Reply