Hello,
I want to run neuron only for a batch job, without using any DISPLAY but it seems it's not possible.
I'm going to use it on a cluster where the DISPLAY will be not available.
check this:
$ DISPLAY=""
$ ipython
In [1]: import neuron
can't open DISPLAY
Where that message come from? Where is the checking?
I looked into the source of the __init__(): of the neuron module but I didn't find the hoc module (that is imported)
The same if I do
from neuron import h
Any suggestions?
Neuron refuse to run if the DISPLAY is wrongly set
Re: Neuron refuse to run if the DISPLAY is wrongly set
When running NEURON on a cluster in parallel, typically the -mpi arg is used which avoids the DISPLAY. On a single workstation, the -nogui arg is used. The question then becomes how to effectively set the -mpi arg when dynamically loading as an extension after launching ipython. This will be accomplished when, during build time, NEURON is configured with the --with-paranrn arg (in addition to the --with-nrnpython arg) and ipython has previously initialized MPI before importing neuron. See the section titled "Starting Parallel Neuron" in
http://www.frontiersin.org/neuroinforma ... /391/html/
The only other thing I can think of off hand is to edit nrn/src/nrnpython/inithoc.cpp and add '-nogui' to the argv list of args that are used in the call to ivocmain(argc, argv, env);
http://www.frontiersin.org/neuroinforma ... /391/html/
The only other thing I can think of off hand is to edit nrn/src/nrnpython/inithoc.cpp and add '-nogui' to the argv list of args that are used in the call to ivocmain(argc, argv, env);
Re: Neuron refuse to run if the DISPLAY is wrongly set
Code: Select all
$ DISPLAY=""
eliminating it altogether.
Code: Select all
unset DISPLAY
Re: Neuron refuse to run if the DISPLAY is wrongly set
Thanks.
That did the trick.
in python, to unset is also possible to run:
That did the trick.
in python, to unset is also possible to run:
Code: Select all
import os
if os.environ.has_key('DISPLAY')
del os.environ['DISPLAY']