Running batch file in unix--conversion from mac

The basics of how to develop, test, and use models.
Post Reply
dlvc

Running batch file in unix--conversion from mac

Post by dlvc »

I am attempting to run a NEURON batch file. I usually run this file on an intel mac with no problems but now want to use a unix system.

Initially, I was receiving errors that one of my own synaptic mechanisms (FDSExp2Syn defined in fdsexp2syn.mod) was "not a template" (I have included the relevant .mod file in the appropriate directory -- the same as my .hoc code). When I updated the installation of NEURON on the Unix system to the current version, this problem was partially solved. Now that I've updated, I can run my batch file using the command nrngui, but when I use the command nrniv, I get the same "not a template" error.

I've checked carriage returns, since I know can cause problems when switching between operating systems, and they are in Unix format.

I'm perplexed. Do you know of any solutions?

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

Re: Running batch file in unix--conversion from mac

Post by ted »

dlvc wrote:I am attempting to run a NEURON batch file.
Batch file? "Program" yes, "script" maybe, but "batch file"?
Initially, I was receiving errors that one of my own synaptic mechanisms (FDSExp2Syn defined in fdsexp2syn.mod) was "not a template"
This usually means that one or more mod file(s) must be compiled. cd to the directory that contains your hoc and mod files, then
rm -r i686
nrnivmodl
and you should be able to
nrniv filename
where filename is the name of the hoc file that contains your, ah, program.
I've checked carriage returns, since I know can cause problems when switching between operating systems
Waste of time. NEURON recognizes all eol as equal, regardless of their OS of origin.

You don't happen to have spaces or punctuation in your directory names, do you? That might cause a hiccup or two.
dlvc

Re: Running batch file in unix--conversion from mac

Post by dlvc »

Thanks Ted.
ted wrote:
This usually means that one or more mod file(s) must be compiled. cd to the directory that contains your hoc and mod files, then
rm -r i686
nrnivmodl
and you should be able to
nrniv filename
where filename is the name of the hoc file that contains your, ah, program.
Yes, I had tried this since I know that's the most common reason for the "not a template" error and it wasn't the fix.

It turns out that I hadn't understood that I needed to be using the "special" script instead of nrniv to use mechansims from my mod files, which you describe at the bottom of the NEURON FAQ.

It's good to know I don't need to worry about line breaks.

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

Re: Running batch file in unix--conversion from mac

Post by ted »

It turns out that I hadn't understood that I needed to be using the "special" script instead of nrniv to use mechansims from my mod files, which you describe at the bottom of the NEURON FAQ
Written so long ago I forgot it. But things seem to have changed, at least with NEURON 7.1 (333:4aa881b7692d) 2009-08-20 under CentOS 5.3 (RHEL 5.3 without the trademarks or the fees). I find that nrniv loads the compiled mechanisms without any difficulty.

I need to look into this further. Which version of NEURON and exactly what OS are you using?
dlvc

Re: Running batch file in unix--conversion from mac

Post by dlvc »

I am running NEURON 7.0 (though I see 7.1 is just out) with the GNU/Linux OS on a system administered by my employer. Let me know exactly what further specifics about the system would be helpful, and I'll check with our IT folks. Thanks for checking this out.
hines
Site Admin
Posts: 1692
Joined: Wed May 18, 2005 3:32 pm

Re: Running batch file in unix--conversion from mac

Post by hines »

The linux script normally used to run a GUI version of neuron so that it automatically
loads the mod file library resulting from nrnivmodl is
nrngui ...
See
cat `which gui`
to see what it is doing.
<hostcpu>/special is typically a shell script that fills in the correct -dll arg to dynamically
load the mod file library.
There was a slight inconvenience with this sequence when running under mpiexec so when
NEURON is configured with the --with-mpi (or better, the --with-paranrn) option, then
launching nrniv, causes the executable to look in the current working directory for a
<hostcpu>/.libs/libnrnmech.so shared library and automatically load it. This happens
whether launched with the -mpi arg or not. This happens only if an explicit -dll file is
not in the nrniv arg list.
Post Reply