If I'm reading you right, you're presently unable to do the equivalent (albeit probably with PATH set on a different line somewhere above) of
PATH=arch/x86_64-rhel7-gcc48-opt/bin mpirun -n 1 psana I'm mildly curious whether it would help to add a leading "./" to get the equivalent of PATH=./arch/x86_64-rhel7-gcc48-opt/bin mpirun -n 1 psana But to be clear, I'm advocating PATH=$PWD/arch/x86_64-rhel7-gcc48-opt/bin mpirun -n 1 psana as opposed to mpirun -n 1 $PWD/arch/x86_64-rhel7-gcc48-opt/bin/psana mostly because you still get to set the path once and use it many times without duplicating code. For what it's worth, I've seen Ralph's suggestion generalized to something like PREFIX=$PWD/arch/x86_64-rhel7-gcc48-opt/bin mpirun -n 1 $PREFIX/psana where PREFIX might be set above in the same script, or sourced from a common config script or a custom environment module. I think this style appeals to many users on many levels. In any event, though, if this really is a bug that gets fixed, you've got lots of options. On Fri, Jul 29, 2016 at 5:24 PM, Schneider, David A. < david...@slac.stanford.edu> wrote: > Hi, Thanks for the reply! It does look like mpirun runs from the same > directory as where I launch it, and that the environment has the same value > for PATH that I had before (with the relative directory in front), but of > course, there are lots of other MPI based environment variables defined - > maybe one of those means don't use the relative paths? > > Explicitly setting the path with $PWD like you say, yes, I agree that is a > good defensive practice, but it is more cumbersome, the actually path looks > > mpirun -n 1 $PWD/arch/x86_64-rhel7-gcc48-opt/bin/psana > > best, > > David Schneider > SLAC/LCLS > ________________________________________ > From: users [users-boun...@lists.open-mpi.org] on behalf of Phil Regier [ > preg...@penguincomputing.com] > Sent: Friday, July 29, 2016 5:12 PM > To: Open MPI Users > Subject: Re: [OMPI users] mpirun won't find programs from the PATH > environment variable that are in directories that are relative paths > > I might be three steps behind you here, but does "mpirun <args> pwd" show > that all your launched processes are running in the same directory as the > mpirun command? I assume that "mpirun <args> env" would show that your > PATH variable is being passed along correctly, since you don't have any > problems with absolute paths. In any event, is PATH=$PWD/dir/bin not an > option? > > Seems to me that this last would be good practice for location-sensitive > launches in general, though I do tend to miss things. > > On Fri, Jul 29, 2016 at 4:34 PM, Schneider, David A. < > david...@slac.stanford.edu<mailto:david...@slac.stanford.edu>> wrote: > I am finding, on linux, rhel7, with openmpi 1.8.8 and 1.10.3, that mpirun > won't find apps that are specified on a relative path, i.e, if I have > > PATH=dir/bin > > and I am in a directory which has dir/bin as a subdirectory, and an > executable bir/bin/myprogram, I can't do > > mpirun myprogram > > I get the error message that > > mpirun was unable to find the specified executable file, and therefore > did not launch the job. > > whereas if I put an absolute path, something like > > PATH=/home/me/dir/bin > > then it works. > > This causes some problematic silent failure, sometimes we use relative > directories to override a 'base' release, so if I had > > PATH=dir/bin:/central/install/dir/bin > > and myprogram was in both dir/bin and /central/install/dir/bin, through > mpirun, I would be running myprogram from the central install, but > otherwise I would run it from my own directory. > > Do other people find this is the case? I wonder if it is a problem that > got introduced through our installation of openmpi. We do create > relocatable rpm's, and I'm also trying openmpi from a conda package that is > relocatable, I think all the prefix paths in the binary and text files were > corrected properly for the install - at least everything else seems to work. > > best, > > David Schneider > SLAC/LCLS > _______________________________________________ > users mailing list > users@lists.open-mpi.org<mailto:users@lists.open-mpi.org> > https://rfd.newmexicoconsortium.org/mailman/listinfo/users > > > > -- > Phil Regier, Professional Services Engineer > preg...@penguincomputing.com<mailto:preg...@penguincomputing.com> > 415.954.2864 (office) > 415.748.9056 (cell) > _______________________________________________ > users mailing list > users@lists.open-mpi.org > https://rfd.newmexicoconsortium.org/mailman/listinfo/users >
_______________________________________________ users mailing list users@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/users