Page 1 of 1

Which environmental variables do I need to setup for NEURON to work after rpm installation without sudo with cpio

Posted: Thu Dec 19, 2019 12:43 pm
by ziemek
Since I have no sudo on CentOS I installed rpm package with:

Code: Select all

rpm2cpio nrn-7.7.x86_64-linux.rpm | cpio -id
which installed neuron in $HOME/usr/local/nrn. I also added ~/usr/local/nrn/x86_64/bin to my $PATH.

But when I execute nrnivmodl i have an error:

Code: Select all

cadif_rectangle.mod
cadif_rectangle.mod
make: /usr/local/nrn/x86_64/bin/nrnmech_makefile: No such file
make: *** No rule to execute object '/usr/local/nrn/x86_64/bin/nrnmech_makefile'. Stop.
I see that nrnivmodl starts from:

Code: Select all

if test "x${NRNHOME}" = x ; then
        prefix=/usr/local/nrn
        exec_prefix=/usr/local/nrn/x86_64
So I set:

Code: Select all

export NRNHOME="/home/ziemek/usr/local/nrn"

and it worked.

But then I had en error:

Code: Select all

Set a MODLUNIT environment variable path to the units table file
Cant open units table in either of:

/usr/local/nrn/share/nrn/lib/nrnunits.lib../../share/lib/nrnunits.lib at line 14 in file cadif_rectangle.mod
UNITS {
I see there is MODLUNIT environmental variable to set. So what are others envs to setup for NEURON to work this way?

Re: Which environmental variables do I need to setup for NEURON to work after rpm installation without sudo with cpio

Posted: Mon Dec 23, 2019 8:34 am
by hines
MODLUNIT and NEURONHOME should be
export MODLUNIT=/home/ziemek/usr/local/nrn/share/nrn/lib/nrnunits.lib
export NEURONHOME=/home/ziemek/usr/local/nrn/share/nrn
(I'm not sure but if you have NEURONHOME set, you may not need MODLUNIT)
If you want to launch python and import neuron then
export PYTHONPATH=/home/ziemek/usr/local/nrn/lib/python:$PYTHONPATH
Lastly, you may need
export LD_LIBRARY_PATH=/home/ziemek/usr/local/nrn/X86_64/lib:$LD_LIBRARY_PATH
But with this last, I'm only guessing that it will take precedence over the built-in rpaths.

If all the above is insufficient, then I suspect there are a few remaining absolute path specs.

In the near future there will be an attempt to make relocatable installers.