Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Somehow mpirun fails to acknowledge my $PATH. The program PyroDist, that I have in $PATH, works:

$ PyroDist
Can't find asked option -in
PyroDist - pairwise distance matrix from flowgrams
-in     string            flow file name
-out    stub              out file stub
Options:
-ni                       no index in dat file
-rin    string            lookup file name

And running it with mpirun and full path works too:

$ mpirun -np 4 ../bin/PyroDist -in C005.dat -out foo
0: Read data
0: Broadcast data
0: Broadcast flows
nN=2094 nM=360 nSize=753840

But this fails:

$ mpirun -np 4 PyroDist
Missing: program name
Program PyroDist either does not exist, is not 
executable, or is an erroneous argument to mpirun.

Since I am going to use a complex set of workflows it is not feasible to use full paths. Any ideas?

(openmpi 1.2.7 on Linux 2.6.32)

share|improve this question
add comment

1 Answer

mpirun probably uses an execv() call to run the program instead of an execvp() one (which would search for it in PATH).

First workaround: ask the shell to lookup for the command by itself:

mpirun -np 4 $(which PyroDist) -in C005.dat -out foo

Otherwise: two (not so good) workarounds I can think of:

  1. Use /usr/bin/env with argument PyroDist, but this requires that mpirun allows to pass arguments along with the program somehow.

  2. Write your own wrapper like:

    #!/bin/sh
    PyroDist
    

    and place it somewhere with a “fixed” relative path.

share|improve this answer
    
Can I somehow confirm that the 'problem' is with execv() contra execvp()? I would prefere a recompile of mpi to support the latter, if that helps. The suggested work-arounds will not help me since this is only one bit of a large framework (QIIME) and there is a lot of programs like PyroDist and also, mpirun is tucked away inside multiple wrappers. –  Martin Oct 6 '11 at 11:07
1  
It strikes me that openmpi 1.2.7 is quite old. On another machine running openmpi 1.4.1 there is no problem. –  Martin Oct 6 '11 at 11:38
    
Updating to 1.4 solved the problem (too bad I am not allowed to answer my own question - now someone can beat me to it! ;o) –  Martin Oct 6 '11 at 12:21
    
Ok glad you could solve it! –  Stéphane Gimenez Oct 6 '11 at 13:07
    
@Martin You can answer your own question, you just need to wait a bit (by now, you should be able to do it). –  Gilles Oct 6 '11 at 22:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.