Loading hoc files after verson 7.1

Post Reply
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Loading hoc files after verson 7.1

Post by faor13 »

Hi everyone
I have some hoc files that I can loading before Version 7.1 instalation.
Now, when I try to open my hoc files I get a syntax error. The name of my MOD file is: grc_KA which is inserted into the HOC file as a current mechanism.

Any ideas???

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

Re: Loading hoc files after verson 7.1

Post by ted »

Mod files must be compiled before the mechanisms they describe can be used. See
How do I compile mod files?
in the FAQ list http://www.neuron.yale.edu/neuron/faq/general-questions

Compiling mod files produces a dll file (or, if you are using UNIX or Linux, an i386 or x86_64 subdirectory). New versions of NEURON are incompatible with old dlls and the contents of old i386 or x86_64 subdirectories. If you update NEURON, you will also have to delete the old dll and compile the mod files again (or delete the subdirectories and compile the mod files, for UNIX or Linux).
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Re: Loading hoc files after verson 7.1

Post by faor13 »

Hi Ted
I'm trying get neuron to work with my previus codes. However when compile them I got the following message:

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
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 GrG_Na.o GrG_Nar.o \
-L/cygdrive/c/nrn71/bin -lnrniv
Info: resolving _celsius by linking to __imp__celsius (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 _nrn_threads by linking to __imp__nrn_threads (auto-import)
Info: resolving _use_cachevec by linking to __imp__use_cachevec (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

How can I debug this?

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

Re: Loading hoc files after verson 7.1

Post by ted »

Throw away all .dll, .o, .h, and .c files in the directory that contains the mod files,, then run mknrndll again.
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Re: Loading hoc files after verson 7.1

Post by faor13 »

ted wrote:Throw away all .dll, .o, .h, and .c files in the directory that contains the mod files,, then run mknrndll again.
Hi Ted
First thanks for the prompt reply.
I did what you suggested, but every time that I try to compile I get the message that I sent you before.
I used the modlunit to check the Na currents that I borrowed from D'angelo et al. (Theta-Frequency Bursting and Resonance in Cerebellar Granule Cells:Experimenta Evidence and Modeling of a Slow K+-Dependent Mechanism Egidio D'Angelo,Thierry Nieus,Arianna Maffei,Simona Armano,Paola Rossi,Vanni Taglietti, Andrea Fontana and Giovanni Naldi) and the message that I got was: " 4 [main] rxvt 14816 dtable: stdio_init: couldn't make stderr distinct from stdout".
The code that I'm using to evoke the current is:

Code: Select all

load_file("nrngui.hoc")
/*
 General settings
*/ 
v_init = -90
tstop = 250
dt = 0.025
secondorder=0
celsius = 30



/*
 Single compartment cell
*/

create soma 
soma { 
	nseg = 1 
	diam = 9.76 
	L = 9.76 
	cm = 1
	Ra = 100
} 

Area = PI*soma.diam*soma.L*1e-8

access soma

insert GrG_Na
insert GrG_Nar


usetable_GrG_Na=1
usetable_GrG_Nar=1

ena = 87.39


objref my_vclamp,my_vec[20],my_temp_vec,my_graph,tempmatrix,f

my_vclamp=new SEClamp(0.5)
my_temp_vec=new Vector()
my_graph=new Graph()
my_graph.size(0,600,-1.5,0)

my_vclamp.amp1=-90
my_vclamp.amp2=30
my_vclamp.amp3=30

my_vclamp.dur1=50
my_vclamp.dur2=20
my_vclamp.dur3=180

my_vclamp.rs=0.0001

my_temp_vec.record(&my_vclamp.i)

tempmatrix=new Matrix(tstop/dt+1,10)


for (i=0;i<10;i=i+1){

 my_vclamp.amp3=30+i*-10

 init()
 run()
 my_vec[i]=new Vector()
 my_vec[i].copy(my_temp_vec)
 my_vec[i].plot(my_graph,dt)
 tempmatrix.setcol(i,my_temp_vec)
 
 init()
 run()

}




/*	
 my_vec[2].copy(my_vec[1])
 my_vec[2].mul(4)


 init()
 run()

 my_vec[2].add(my_vec[1])


*/

f= new File()	
f.wopen("I_V_grg_nar.ASC")
tempmatrix.fprint(f, " %g")
f.close()

I'm not an expert in Neuron but I'm starting to model using the software. So far, I'm very impressed with your software, the support and the possiblities that it opens.
I really appreciate your help

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

Re: Loading hoc files after verson 7.1

Post by ted »

faor13 wrote:every time that I try to compile I get the message that I sent you before.
Please describe how you are compiling the mod files.
I used the modlunit to check the Na currents
Please describe how you did this. Also, is it correct to assume you are using MSWin?

I'm deferring discussion of the hoc code until after these other issues are resolved.
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Re: Loading hoc files after verson 7.1

Post by faor13 »

1) Please describe how you are compiling the mod files.
First, I get to NEURON 7.1 folder and then open "mKnmdll" shortcut. Second, I go to "choose directory" and then find my directory which is in "C:/ nrn71" in a specific folder that I called: "simulations". When I get there I click "Make nrnmech.dll". Inside of "simulations" folder I have: the MOD files "GrG Na"; "GrG Nar" and the HOC file "test_grg_nar" which is the one that I sent you.

2) Please describe how you did this. Also, is it correct to assume you are using MSWin?
First, I get to NEURON 7.1 folder and then open "modlunit" shortcut. Second, I go to "choose directory" and then find my directory which is in "C:/ nrn71" in a specific folder that I called: "simulations". Third, I click "selected directory" and then NEURON shows me the 2 diferent files that I have there ("GrG Na" and "GrG Nar"). I select one of them and click "check units". For that, I always get the message: "4 [main] rxvt 14816 dtable: stdio_init: couldn't make stderr distinct from stdout".

Yes, I'm using Windows 7 64-bit

Please, let me know If I was not clear in some point.
Thank you
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Loading hoc files after verson 7.1

Post by ted »

faor13 wrote:1) Please describe how you are compiling the mod files.
Thanks. Those procedures are OK with this exception:
I go to "choose directory" and then find my directory which is in "C:/ nrn71" in a specific folder that I called: "simulations". . . .
It's not a good idea to write files inside NEURON's installation tree. Too easy to break something, and exposes your work files to accidental deletion when you update NEURON (which requires complete deletion of the installation tree). Best to keep your work in a separate directory, e.g. on the Desktop or someplace else.

But this isn't the cause of the strange error message you're getting.

Using NEURON 7.2 from the latest alpha installer for MSWin, I was able to compile the mod files without difficulty. I didn't try modlunit under MSWin, but it reported no errors under Linux.

Was cygwin previously installed on your PC, or is there any chance that you installed cygwin after installing NEURON?
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Re: Loading hoc files after verson 7.1

Post by faor13 »

It's not a good idea to write files inside NEURON's installation tree. Too easy to break something, and exposes your work files to accidental deletion when you update NEURON (which requires complete deletion of the installation tree). Best to keep your work in a separate directory, e.g. on the Desktop or someplace else.
Thanks for the advice. I always maintain a back up of my files in "My documents"
Using NEURON 7.2 from the latest alpha installer for MSWin, I was able to compile the mod files without difficulty. I didn't try modlunit under MSWin, but it reported no errors under Linux
.
I'll download it and give a try...
Was cygwin previously installed on your PC, or is there any chance that you installed cygwin after installing NEURON?
It is possible, because I had a Neuron previous version on my computer before. How can I check for this?
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Loading hoc files after verson 7.1

Post by ted »

I'll download it and give a try...
Be sure to uninstall the previous version first. Use NEURON's own uninstaller, which you will find in the NEURON program group. After it finishes, make sure there isn't any c:\nrn* directory; if you see one, dig into it and find any directories that you created and move them to a safe location, then delete c:\nrn* and all its subdirectories.

To check for the presence of cygwin, use MSWin's "find" tool to look for all files or directories with names that begin with the string "cyg". If you see any that lie outside of c:\nrn* then you have a separate installation of cygwin. Recent (past couple of years or so) NEURON installers are supposed to be able to handle this situation without difficulty, but when strange things happen, it is reasonable to suspect some interference between different versions of cygwin.
faor13
Posts: 6
Joined: Tue Sep 01, 2009 4:10 pm

Re: Loading hoc files after verson 7.1

Post by faor13 »

Looks like that my problem is because I'm having another software issue. I do not know what does it mean, but is something with Chemoffice2010. What I know is that this software uses Phyton 2.5.
Do you have any idea how should I procede from here?
The message that I'm getting after install Neuron7.2 or when I try to compile my files using "mknrndll" is:
cygwin warning:
MS-DOS style path detected: \Program Files (x86)\CambridgeSoft\ChemOffice2010\
ChemScript 12\Lib
Preferred POSIX equivalent is: /cygdrive/c/Program Files (x86)/CambridgeSoft/C
hemOffice2010/ChemScript 12/Lib
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Loading hoc files after verson 7.1

Post by hines »

That's only a warning. However it is a puzzle why mknrndll ever reaches that folder.
I see you started mentioning NEURON 7.2. Are you now using the latest alpha version
installer: http://www.neuron.yale.edu/ftp/neuron/v ... -setup.exe
If not, we should start our diagnosis with that (be sure to uninstall the previous NEURON
version). Also remove all the *.o, *.c, *.dll files in your simulations folder so only
*.mod and *.hoc are left. After installation of the above alpha version, start an rxvt
terminal window using the rxvt icon in the NEURON group and navigate (using cd)
to your simulations folder and then type
mknrndll

We should probably take this to email to improve response time and avoid cluttering
the forum with useless diagnostic recommendations.
Send to michael dot hines at yale dot edu
Post Reply