Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPI mpirun execvp error: no such file or directory

Tags:

mpi

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?

like image 833
donut Avatar asked Nov 24 '17 11:11

donut


1 Answers

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.

like image 101
John Zwinck Avatar answered Sep 17 '22 04:09

John Zwinck