Loading mechanisms without a gui?

The basics of how to develop, test, and use models.
Post Reply
mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

Loading mechanisms without a gui?

Post by mctavish » Mon Mar 19, 2007 7:24 pm

Hey all,

I am wanting to run neuron without a gui. I can launch via

Code: Select all

nrniv my_init_file.hoc
However, this does not seem to find or load my NMODL files and I get "undefined function" errors from functions that are in these NMODL files.

If I call

Code: Select all

nrngui my_init_file.hoc
, then these additional mechanisms are automatically loaded.

The reason I am wanting to run without the GUI when I have the GUI installed is that I am preparing simulations to run on a parallel computer without a GUI....

Thanks,
Tom

hines
Site Admin
Posts: 1577
Joined: Wed May 18, 2005 3:32 pm

Post by hines » Wed Mar 21, 2007 7:49 am

In a non-parallel environment, launch the
<cpu_name>/special script instead of
nrniv. (or look at that script and when you
launch nrniv, use the proper -dll argument.

On a parallel computer, you will indeed
launch <installpath>/<cpu_name>/bin/nrniv
under mpiexec or mpirun and you will
give nrniv the -mpi argument. In that case
it will automatically load the shared library
containing the compiled mod files.

mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

Post by mctavish » Wed Mar 21, 2007 12:12 pm

Perfect answer, Ted. Thanks!

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

Post by ted » Thu Mar 22, 2007 9:42 am

That should read "Perfect answer, Michael . . . "

eschombu

Re: Loading mechanisms without a gui?

Post by eschombu » Thu Nov 12, 2009 10:18 pm

Where is this "<cpu_name>/special" script located? I don't know what folder <cpu_name> refers to. I'm now encountering this problem as well, so if there's newer documentation on how to do this could you point me there?

Thanks!
Erik

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

Re: Loading mechanisms without a gui?

Post by ted » Fri Nov 13, 2009 2:12 pm

Specific example on an Intel-based machine with a 32 bit OS:
Suppose ~/myhoc/mcproject contains na.mod

Code: Select all

$ cd ~/myhoc/mcproject
$ ls
na.mod
$ nrnivmodl
 . . . a bunch of msgs ending with the following:
Successfully created i686/special
$ ls
i686  na.mod
$ ls i686/
libnrnmech.la  mod_func.c  mod_func.lo  na.c  na.lo  na.mod  special
Capisce?

eschombu

Re: Loading mechanisms without a gui?

Post by eschombu » Mon Nov 16, 2009 6:07 pm

Thanks for the location. What can and cannot be done with this "special" script? I tried running my hoc code, which works through nrngui, but hit a syntax error when cvode.re_init() was called. It works with cvode statements all commented out. Also, one reason I wanted to run without the gui was to get rid of all the "first instance of [variable name]" output, but they are still there. Is there a way to suppress those? Not a big deal if not, though.

Thanks again,
Erik

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

Re: Loading mechanisms without a gui?

Post by ted » Mon Nov 16, 2009 7:22 pm

eschombu wrote:What can and cannot be done with this "special" script?
Whatever doesn't need the GUI. And, if you simply include
load_file("nrngui.hoc")
in your hoc file, you can also do whatever needs the GUI.
I tried running my hoc code, which works through nrngui, but hit a syntax error when cvode.re_init() was called. It works with cvode statements all commented out.
That's news to me. Maybe you uncovered a bug. What's the minimal code that is required to elicit the error msg?
Also, one reason I wanted to run without the gui was to get rid of all the "first instance of [variable name]" output, but they are still there. Is there a way to suppress those?
Try wrapping offending code blocks in paired curly brackets
{
like this
}

Post Reply