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: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-08-06 21:17:39

On Aug 6, 2009, at 2:43 PM, Tomislav Maric wrote:

> the problem wasn't only in the OMPI libs and bins, it was in other
> binaries as well: OpenFOAM simulation suite is also installed
> locally so
> a short PATH could't be informative enough.
> Actually, I know that the environment is exactly the same, because I'm
> running liveDVDs with a sole purpose of setting up a NOW and running
> simulations.
> Therefore, --prefix and /full/path/mpirun gave me the ability to find
> orted and similar stuff needed for OMPI, but failed to give me the
> linkage :) to OpenFOAM binaries and libs. That's why my solver
> complained that it coulnd't link the .so libraries.

Gotcha -- sorry, I probably glossed over those details in the lengthy

> I'm not quite sure how secure is my solution, it seems a bit radical,
> but I have tried everything, even sending vars with -x option but gave
> up because there's like 50 of them. I would have to cat the -x
> arguments
> from a file or smth. :)

Nah, you shouldn't need to have a whole string of -x arguments.

What I generally do is setup my shell startup files (.tcshrc, in my
case) to be "correct" on each node. I have my $HOME directory NFS-
mounted on all my machines, so I generally only have to setup
my .tcshrc "once" and then it's available on all machines. All my
machines are generally setup fairly homogeneously, too -- I make an
effort to ensure that paths and whatnot are the same across all
machines. In my opinion, running in a homogeneous environment is
tremendously easier.

That being said, it looks like you were trying to do exactly that in
some of the mails in the prior thread (i.e., setup your shell startup
files). If you're a bash user, you might want to look at this FAQ
entry if you haven't already (I admittedly breezed through some of the
thread; apologies if you've already mentioned this):

In there, it mentions that the interactive shell startup files for
bash are:

.bash_profile if it exists, or .bash_login if it exists, or .profile
if it exists (in that order). Note that some Linux distributions
automatically come with .bash_profile scripts for users that
automatically execute .bashrc as well. Consult the bash man page for
more information.

And the non-interactive shell startup files for bash are:

.bashrc if it exists

I think there was some mails back-n-forth about .bashrc
and .bash_profile, but let me throw in my $0.02: you had the right
idea with putting echo statements in .bashrc and .bash_profile and
seeing what gets executed. Keep it simple, and do tests with ssh (not
running bash manually). For example, add echo statements like
"starting bashrc" and "exiting bashrc" and "starting bash_profile" and
"exiting bash_profile".

host1$ ssh localhost
--> what displays in this case?

host1$ ssh localhost hostname
--> what displays in this case?

host1$ ssh otherhost
--> what displays in this case?

host1$ ssh otherhost hostname
--> what displays in this case?

Also, don't apologize for being a MechE. You're exactly our target
audience; we thank you for taking the time to learn and use our

Jeff Squyres