MPI执行程序:mpirun was unable to launch the specified application as it could not access or execute ……
错误:在linux上安装完MPI后,想执行一下自带的例子测试一下,执行下面命令:mpirun -np 4 ./examples/cpi报出下面错误:--------------------------------------------------------------------------mpirun was unable to launch the specified applicatio
·
错误:
在linux上安装完MPI后,想执行一下自带的例子测试一下,执行下面命令:
mpirun -np 4 ./examples/cpi
报出下面错误:
--------------------------------------------------------------------------
mpirun was unable to launch the specified application as it could not access
or execute an executable:
Executable: ./hello
Node: c311a22b76d4
while attempting to start process rank 0.
--------------------------------------------------------------------------
4 total processes failed to start
解决:
猜测,可能是我安装的时候,没有安装例子,或者有,但是我也不知道路径。也就是说,这里执行例子时,需要添加绝对路径。
我自己在当前目录下写了个测试程序进行测试
#include <mpi.h>
#include <stdio.h>
int main(int argc, char **argv)
{
int numtasks, rank;
MPI_Init(&argc, &argv);
printf("Hello parallelworld!\n");
MPI_Finalize();
return 0;
}
执行命令:
mpicc -o a test.c
mpirun -np 32 a
运行成功:
更多推荐
已为社区贡献7条内容
所有评论(0)