donut
donut

Reputation: 636

MPI mpirun execvp error: no such file or directory

I'm trying to run a c++ code (BCparallel.cpp) using MPI; compiling the code with:

 mpic++ BCparallel.cpp -o BCparallel

is well succeed, but when I pass the line

 mpiexec -np 4 BCparallel file.txt

It returns

[proxy:0:0@lps-Inspiron-5537] HYDU_create_process 
(utils/launch/launch.c:75): execvp error on file BCparallel (No such 
file or directory)
[proxy:0:0@lps-Inspiron-5537] HYDU_create_process 
(utils/launch/launch.c:75): execvp error on file BCparallel (No such 
file or directory)
[proxy:0:0@lps-Inspiron-5537] HYDU_create_process 
(utils/launch/launch.c:75): execvp error on file BCparallel (No such 
file or directory)
[proxy:0:0@lps-Inspiron-5537] HYDU_create_process 
(utils/launch/launch.c:75): execvp error on file BCparallel (No such 
file or directory)

What am I doing wrong?

Upvotes: 15

Views: 45054

Answers (1)

John Zwinck
John Zwinck

Reputation: 249582

The program is not in your $PATH and you have not specified the path where it exists. Try this:

mpiexec -np 4 ./BCparallel file.txt

This is the same as for any other program, which if it is not in $PATH must be qualified with a path. This protects you from accidentally running a program called ls (for example) in your current directory.

Upvotes: 32

Related Questions