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

Post Reply
ziemek
Posts: 34
Joined: Thu May 23, 2019 8:02 am
Location: Warsaw, Poland
Contact:

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

Post by ziemek » Thu Dec 19, 2019 12:43 pm

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?

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

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

Post by hines » Mon Dec 23, 2019 8:34 am

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.

Post Reply