Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

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-06 14:43:51


Hi Jeff,

thank you very much for your reply! :)

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.

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. :)

Thanks,
Tomislav

Jeff Squyres wrote:
> Sorry for not replying earlier -- travel to the MPI Forum last week
> put me waaaay behind on my INBOX. :-(
>
> I don't think you want to "printenv > ~/.ssh/environment" -- you don't/
> can't know for sure that the remote environment should be exactly the
> same as your local environment.
>
> Instead, you might want to use OMPI's built-in "set the PATH /
> LD_LIBRARY_PATH remotely" functionality. Use the full path name to
> mpirun, like:
>
> /opt/openmpi/bin/mpirun ...
>
> And that should tell mpirun to set the PATH and LD_LIBRARY_PATH
> remotely. Note that this functionality assumes that Open MPI is
> installed in exactly the same filesystem location on the node where
> mpirun is invoked and the back-end compute nodes.
>
> FWIW, you can also use the --prefix argument to mpirun; the "/opt/
> openmpi/bin/mpirun ..." behavior is a shortcut for that same behavior
> (we emulated the idea of using the full pathname to mpirun from HP MPI).
>
> Additionally, you can force Open MPI to use the --prefix behavior by
> default if you configure/build Open MPI with the --enable-mpirun-
> prefix-by-default configure switch.
>
> Hope that helps!
>
>
>
> On Aug 3, 2009, at 7:35 AM, Tomislav Maric wrote:
>
>> Thank you Dominik for all your help!!
>>
>> I've solved the problem: execute : printenv > ~/.ssh/environment
>>
>> edit /etc/ssh/sshd_config and set PermitUserEnvironment to "yes" and
>> check that UseLogin is set to "no"
>>
>> scp hostname ~/.ssh/environment user_at_hostname:~/.ssh/environment
>>
>> edit sshd_config on the other host and set the same things.
>>
>> Works like a charm!
>>
>> Tomislav
>>
>> Dominik Táborský wrote:
>>> I'm sorry, I can't help you with NFS. I have never had it on my
>>> network.
>>>
>>> Good luck anyway... :)
>>>
>>>
>>> Tomislav Maric píše v Ne 02. 08. 2009 v 20:18 +0200:
>>>> Dominik Táborský wrote:
>>>>> Okay, now it's getting more confusing since I just found out that
>>>>> it
>>>>> somehow stopped working for me!
>>>>>
>>>>> Anyway, let's find a solution.
>>>>> I found out that there is difference between
>>>>> ssh node1 echo $PATH
>>>>> and
>>>>> ssh node1 'echo $PATH'
>>>>> These command give you different output. 'man ssh' states that it
>>>>> sets
>>>>> its own PATH variable right before the user logs in but after the
>>>>> connection is established. This variable is set during compilation.
>>>>>
>>>>> I am using dropbear as SSH2 server so I won't be able to guide
>>>>> you if
>>>>> you're using OpenSSH as a server, but the manpages should be
>>>>> sufficient.
>>>>> Look into man ssh and man ssh_config. You should create files
>>>>> ~/.ssh/rc
>>>>> OR ~/.ssh/config OR ~/.ssh/environment. Setting it up in one of
>>>>> these
>>>>> files should be enough.
>>>>>
>>>>> I will probably recompile dropbear with new default PATH.
>>>>>
>>>>> Anyway, I am sure it used to work for me and I have no idea why it
>>>>> stopped.
>>>>>
>>>>> If you'd need more help, just ask :-)
>>>>>
>>>>> Dr. Eddy
>>>>>
>>>> Thank you very much!! I'm also finding out about those files and I'm
>>>> using OpenSSH. I'll try and configure it to work. The weirdest
>>>> thing is
>>>> that people who use Ubuntu on OpenFOAM forum just had to comment a
>>>> line
>>>> in .bashrc that returns if the bash is run in non-interactive mode.
>>>>
>>>> I just don't get it. Let me ask you just one thing, before the
>>>> next 5-6
>>>> hours of fighting with config files:
>>>>
>>>> what about NFS?
>>>>
>>>> What if I export the directory? On OMPI pages is written that nfs
>>>> simplifies things. I'm noob in networking so I don't know if this
>>>> would
>>>> benefit me.
>>>>
>>>> If I edit ~/.ssh/environment then I have to manually set
>>>> VARIABLE=VALUE,
>>>> and there are dozens of variables to set. I think I'll try the rc
>>>> file
>>>> first.
>>>>
>>>> Thank you again!
>>>>
>>>> Best regards,
>>>> Tomislav
>>>> _______________________________________________
>>>> users mailing list
>>>> users_at_[hidden]
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>> _______________________________________________
>>> users mailing list
>>> users_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>