I am trying to make my new cluster flexible such that it can run with
more than one configuration at the same time. For example, you can
choose gcc, pg, or Intel compilers using OpenMPI. To start out with, I
am just using gcc 4.1 that comes with RHEL5 and OpenMPI. For some
reason, I am having trouble with the way it is loading the libraries
depending on how I run the job. Basically it would seem that the
LD_LIBRARY_PATH is not set properly depending one how I run the job; it
works interactively but not with torque.
I have this set in my .bashrc file in the root of my home directory
if [ `hostname | grep "prod"` ]; then
PATH=/usr/local/profiles/gcc-openmpi/bin/:$PATH
LD_LIBRARY_PATH=/usr/local/profiles/gcc-openmpi/lib/:$LD_LIBRARY_PATH
fi
[sam@prodnode1 fdtd_0.3]$ echo "echo $LD_LIBRARY_PATH" | qsub
And I got, which seems to be what I would expect:
[sam@prodnode1 fdtd_0.3]$ cat STDIN.o226
/usr/local/profiles/gcc-openmpi/lib/: