Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Open MPI and env. variables (LD_LIBRARY_PATH and PATH) - complete and utter Open MPI / Linux noob
From: Tomislav Maric (tomislav.maric_at_[hidden])
Date: 2009-08-02 10:09:56


Prasadcse Perera wrote:
> Hi,
> common bashrc meant if the /home is network mounted so ignore that I
> guess. Have you tried adding
> . $HOME/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc to your ~/.bashrc on nodes
> ? This will append the configurations you need from the bashrc file
> located inside the directory.

I've done that and still no go. I've tried it before, when I read that
bash reads .bashrc when invoked in non-interactive mode.

I'm not at all certain I understand the way bash works anymore.

Here's what I've been trying:

1) bash runs .bashrc if envoked in non-interactive (--login or no
--login mode)

2) i've added this line to .bashrc on my master node

   echo Hello, I'm your .bashrc file, you're running non-interactive bash

3) bash runs in non-interactive mode when you write and execute a
script, so I've written a script hello.sh

    echo Hello!!!

and tried bash hello.sh, but all I hot is "Hello!!!", as output, not
"Hello, I'm your .bashrc file, you're running non-interactive bash".

Why is that?

These are the commands I've tried after setting .bashrc to be to the
word same as .bash_profile (I didn't have .bashrc file before these
changes), and their outputs:

 slax_at_marija:/OpenFOAM/OpenFOAM-1.5-dev/tutorials/interFoam/mojDambreak$
/OpenFOAM/ThirdParty/openmpi-1.3/platforms/linuxGccDPOpt/bin/mpirun -H
mario -np 2 `which interFoam` -parallel
/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linuxGccDPOpt/interFoam:
error while loading shared libraries: libinterfaceProperties.so: cannot
open shared object file: No such file or directory
/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linuxGccDPOpt/interFoam:
error while loading shared libraries: libinterfaceProperties.so: cannot
open shared object file: No such file or directory
slax_at_marija:/OpenFOAM/OpenFOAM-1.5-dev/tutorials/interFoam/mojDambreak$

I've started mpirun with a full pathname, so that it works like the
--prefix command and translates the installation info to the node. Not
being able to find the dynamically linked shared libraries point to env.
variable that's missing or incorrectly set.

`which interFoam` part is from instructions on how to run OpenFOAM
programs using mpirun found here:

http://www.opencfd.co.uk/openfoam/doc/userse35.html

then I've tried another approach, sending env variables with the -x
option of mpirun:

slax_at_marija:/OpenFOAM/OpenFOAM-1.5-dev/tutorials/interFoam/mojDambreak$
/OpenFOAM/ThirdParty/openmpi-1.3/platforms/linuxGccDPOpt/bin/mpirun -x
LD_LIBRARY_PATH=$LD_LIBRARY_PATH, -x PATH=$PATH, -H mario -np 2 `which
interFoam` -parallel
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 12121 on node mario exited
on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
slax_at_marija:/OpenFOAM/OpenFOAM-1.5-dev/tutorials/interFoam/mojDambreak$

and this result gives me a new hint, but where does this hint lead to?

Questions:

Why didn't the copying of .bash_profile contents to .bashrc work at all?

Why did the second type of invocation return a Segmentation Fault?

I can try sending more env. variables via -x option, but they are really
numerous for OpenFOAM.

Any advice? As you all see, I'm really trying, and this is quite heavy
stuff for a newbish mech. engineer. :)))

Thank you Prasadcse Perera for your advice and time!

Best regards,
Tomislav