creating "special" on a cluster

NMODL and the Channel Builder.
Post Reply
Brad

creating "special" on a cluster

Post by Brad »

I am attempting to create on our cluster "special". All the mechanisms compile correctly on my single processor machine, so I am confident that all the .mod files are correct. nrnivmodl generates all the corresponding .lo and .c file without complaint, it just chokes at the very end with this error message
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
when it normally says "x86_64/special successfully created" (or whatever it usually says). ld appears to be the linker, but after that I don't know where to begin.

neuron version: 5.9.39
/proc/version: Linux version 2.6.5_H_01_04 (geeko@buildhost) (gcc version 3.3.3 (SuSE Linux)) #25 SMP Tue Jun 13 10:38:34 PDT 2006
Brad

Post by Brad »

At the risk of possibly introducing a red herring...

After a little searching, it appears that the linker can't find my system's readline library. I ran
~> locate readline
and the most likely candidates (i.e. those that are in a "high-level" system-type directory and aren't part of another software's lib files) to my eyes are /lib64/libreadline.so.4 and /lib64/libreadline.so.4.3 but I don't find a plain libreadline.so. I might ask my system's administrator to create a link between libreadline.so.X and libreadline.so (which does not appear to currently exist).

I also found the following in what appear the directories from which the cluster's admininstrators compiled NEURON
/home/kkt3863/src/nrn-5.9/src/readline/readline.c
/home/kkt3863/src/nrn-5.9/src/readline/readline.h

I don't know if the linker (or something else called in the course of running nrnivmodl) is having difficulty finding the system's shared readline library or some specific version that is distributed with NEURON.
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

/lib64/libreadline.so.4 and /lib64/libreadline.so.4.3 but I don't find a plain libreadline.so. I might ask my system's administrator to create a link between libreadline.so.X and libreadline.so
I believe you can safely create your own symbolic link inside any directory you have write access to that is listed in /etc/ld.so.conf or is specified in a LD_LIBRARY_PATH environment variable. If there is not a chicken and egg problem a good place might be the neuron <prefix>/x86_64/lib directory.

It turns out that I also supply a readline implementation to guard against the eventuality that readline is not already installed. To force its invocation use the configure option

Code: Select all

--with-readline=no
However, I do prefer the symbolic link approach.
The last workaround is if your cluster version will only be run in batch mode in which case you can get rid of it entirely with the

Code: Select all

--without-readline --without-memacs
options. Again, though, I think all your problems with readline will go away if the linker can find a libreadline.so symbolic link.
Brad

Post by Brad »

Thanks Michael. Here's what I did, for the record.

1. Because I don't have write permission to the /lib64 directory, I created a symbolic link to the system's readline library in a directory I do have persmission

Code: Select all

~> ln -s /lib64/libreadline.so.4.3 ~/...newpath.../libreadline.so
2. I then need to tell the linker to check that directory when it needs to load a shared object file. That is done by setting the environment variable LD_LIBRARY_PATH like so

Code: Select all

~> export LD_LIBRARY_PATH=~/...newpath.../:$LD_LIBRARY_PATH
Note, it's my understanding that this environment variable persists only for the current session so it will be lost at the next login. To make it permanent, add that line to your .profile script or wherever is appropriate. Also, the part after the colon is to ensure that you don't clobber the existing entries in the library path; the command just pre-pends the new directory to the path listing.



Good news:
I don't get the previous error any longer. So it appears that the linker (ld) is correctly finding the symbolic link to the readline library.


Bad news:
I now receive the following error:
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
Making a symbolic link to libncurses.so in an analogous manner does not rememdy this situation. Am I destined to requesting the system admins re-install with a bunch of configure options?

Thanks for the help.
Brad

Post by Brad »

I attempted to document in detail how I solved my original problem in case somebody else encounters a similar problem, but it may have obscured the fact that I have unmasked another (possibly related) problem.

In the absence of a working solution for my ncurses problem above, I am going to ask my cluster administrator to reinstall with certain make options (somewhat complicating the matter, I don't know what options, if any, were supplied for the original installation). According to http://www.neuron.yale.edu/neuron/install/confopt.html,

Code: Select all

--without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
In the packet "Parallel Simulations with NEURON", for a Cray XT3 (I am trying to use a Cray XD1), the following options are recommended:

Code: Select all

option				my best guess
--disable-shared		

--with-nmodl-only		
--with-paranrn			something to do with running on parallel machines
--without-x			compile without support for the X Window environment (GUI stuff on Unix systems)
--without-memacs		compile without support for MicroEMACS, a small text editor (not sure what it's used for, possibly only useful in Windows distribution)
For this reinstall request, I will explicity request these recommended options.

Some additional options I am considering

Code: Select all

--without-iv			compile without support for InterViews (GUI toolkit for XWindow)
--without-readline		"The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in."  Don't know what functionality will be missing if it's not included.  Suggested by M. Hines above.
--without-ncurses		Following the convention in the docs, compile without support for ncurses, a library used in the creation of text user interfaces.  Also don't know what functionality will be missing if it's not included.
So far, I have been pretty successful in debugging my parallel code on my desktop (ie I test output correctness in serial mode, and for serial and parallel versions that don't require special, the output is identical), so at this point I feel I can probably get away with running in only batch mode.

What functionality will I lose without readline and ncurses? Any other options I should exclude? Do any of those options remove the ability use the oc> prompt? That's basically the only thing I might need in addition to batch mode (though I could consider it a luxury; I could probably make do without it if necessary).
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

Making a symbolic link to libncurses.so in an analogous manner does not rememdy this situation.
This strategy should work but it requires that the link be to a 64 bit version of ncurses. It is probably easiest for us to
take this discussion to email. Let me know your LD_LIBRARY_PATH, and the ls -l
info about your link and the original ncurses. You can avoid both readline and
ncurses by using the options
--without-memacs --without-readline
Brad

Post by Brad »

After quite a bit of back-and-forth with Dr. Hines, we appear to have made some progress. There were actually two problems.

1. nrnivmodl was not looking in the proper place for the static object libraries libreadline.so and libncurses.so. First, I created a symbolic link to the system’s copies of those two libs into a directory to which I have full permissions. Then, I had to set my bash environment variables like so

Code: Select all

export LD_LIBRARY_PATH=$HOME/lib
export LDFLAGS=-L$HOME/lib
I then installed neuron with just a small change to the normal procedure (http://www.neuron.yale.edu/neuron/insta ... ullinstall)

Code: Select all

ftp http://www.neuron.yale.edu/ftp/neuron/versions/alpha/nrn-5.9-1500.tar.gz
ftp http://www.neuron.yale.edu/ftp/neuron/versions/alpha/iv-17.tar.gz
tar xvzf iv-17.tar.gz
tar xvzf nrn-5.9-1500.tar.gz
mv iv-17 iv
mv nrn-5.9 nrn
mv iv-17.tar.gz iv
mv nrn-5.9-1500.tar.gz nrn
cd iv
./configure --prefix=`pwd`
echo $LD_LIBRARY_PATH
echo $LDFLAGS
ls ~/lib/
make
make install
cd ../nrn/
./configure --prefix=`pwd` --with-paranrn
make
make install
I guess that “--with-paranrnâ€
Brad

Post by Brad »

[quote]I guess that “--with-paranrnâ€
Post Reply