Problem reading .mod files?

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
Posts: 1
Joined: Sun Mar 24, 2013 11:13 am

Problem reading .mod files?

Post by yorichchori » Fri Mar 29, 2013 12:11 pm

I've been trying to run Jones et al. 2009's model( ... del=136803) on my computer, but keep getting the same error message(pasted below), whether I run it on Windows or Mac OS or Unix. My guess is that the associated .mod files are somehow not being read properly, but after much Googling around, I still have no idea how to resolve the issue.
(The Auto-launch version works, but I ultimately want to build my own model based on this one, so that's unfortunately not an option.)

Code: Select all

nrniv: syntax error
 in sj10-cortex.hoc near line 202
                insert ca
xopen("sj10-cortex.hoc"        )
execute1("{xopen("sj10-cortex.hoc")}"      )
load_file("sj10-cortex.hoc"    )
nrniv: syntax error
 in sj10-cortex.hoc near line 204
                insert cad
Could anyone please help me figure it out?
Thanks in advance.

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

Re: Problem reading .mod files?

Post by ted » Fri Mar 29, 2013 5:09 pm

Good question. The error message isn't very explicit, so here's how to decode it.

Syntax errors typically occur when the model source code is first being parsed. They often contain a useful clue as to the underlying cause, in the form of the actual statement that caused failure. This

Code: Select all

1 nrniv: syntax error
1  in sj10-cortex.hoc near line 202
1  		insert ca
        1 xopen("sj10-cortex.hoc")
means that host 1 ran into difficulty with an "insert ca" statement while parsing a file called sj10-cortex.hoc.

"insert" statements are used to assign biophysical properties fo sections, and failure of an insert statement generally means that NEURON doesn't know about the mechanism that is supposed to be inserted. This will happen if the mechanism is specified by NMODL code in a mod file that has not been compiled, or if it is specified by a Channel Builder whose ses file has not already been parsed. Since the model runs fine when autolaunched, we know that the problem can't be a missing Channel Builder, because the principal difference between autolaunch and you launching the model from the command line (or double clicking on its mosinit.hoc file) is that the autolaunch process starts by compiling mod files.

The solution is for you to compile the mod files yourself, before trying to launch the model. But how should you do this?

Many models in ModelDB come with a text or html file that describes how to use the code. This particular model's readme.txt starts with somewhat detailed, but very welcome, descriptions of the various model source code files. Just before the end of readme.txt is a short, easily overlooked section with "Usage instructions" that tell how to compile the mod files and launch a simulation
After unzipping the attached file (on the parallel cluster master) and
cd'ing to the created folder compile the mod files with the command

nrnivmodl mod_files

and then type

mpirun -n 4 nrniv -mpi Batch.hoc

replacing the 4 above with a number of processors that you have
That should take care of the problem.

Using 3 cores of my desktop PC, which has a quad core i7 920 running at 2.67 GHz and 8 MB cache, 150 ms of model time take about 20 seconds to complete, so I'd guess that on a machine with similar core speed, 1500 ms of model time would take about 600/n seconds to complete, where n is the number of hosts specified on the command line.

Post Reply