run mpi program [Errno 2]没有这样的文件或目录

时间:2014-06-08 08:31:22

标签: mpi

我是MPI的新手,我正在尝试运行我在服务器上编写的程序(它在我的笔记本电脑上工作正常)。我的笔记本电脑操作系统是ubuntu,服务器操作系统是centos。在服务器上它编译得很好但是当我运行它时:

mpicxx main.cpp -o main
mpirun -np 1 main

我收到此错误:

problem with execution of main  on  www.judge.com:  [Errno 2] No such file or directory

看起来它正在尝试使用主机。有没有办法在我的笔记本电脑上运行我的程序? 另请注意,我在服务器上没有root访问权限。

1 个答案:

答案 0 :(得分:2)

我最近遇到了类似的问题。我正在使用this page底部的一些测试MPI程序来解决我的HDF5安装问题。

user@host: mpiexec -n 4 f.out  
problem with execution of f.out  on  host:  [Errno 2] No such file or directory 
problem with execution of f.out  on  host:  [Errno 2] No such file or directory 
problem with execution of f.out  on  host:  [Errno 2] No such file or directory 
problem with execution of f.out  on  host:  [Errno 2] No such file or directory

当我包含程序的完整路径时,错误就消失了:

user@host: mpiexec -n 4 ~/testing/f.out 
Trying to create filef.h5                                                                        

MPI_FILE_OPEN succeeded
Trying to create filef.h5     

MPI_FILE_OPEN succeeded
Trying to create filef.h5       

MPI_FILE_OPEN succeeded
Trying to create filef.h5      

MPI_FILE_OPEN succeeded