我试图运行MPI程序,但我有一些问题与安装。我从储备库中获得数据包,我可以编译我的程序,但是当我尝试运行该程序,我可以做T吧。 嗯,我的计划是一点点比最大的“Hello World”的,但我的问题是与MPI库(我想是这样),不与代码。这里是我的“你好世界”平行(当然西班牙语):MPI程序运行在Linux
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf("Hola Mundo! Soy el %d de %d\n", rank, size);
MPI_Finalize();
return 0;
}
当我使用mpicc出现hola文件。
mpicc hola.c -o HOLA
然后我跑我的程序:
的mpirun -np 5 ./hola
的输出(用于@吉勒)
LS -1ħ OLA
只是
HOLA
从COMAND线输出显示是这样的:
[proxy:0:[email protected]] HYDU_create_process
(./utils/launch/launch.c:75): execvp error on file hola (No such file
or directory)
[proxy:0:[email protected]] HYDU_create_process
(./utils/launch/launch.c:75): execvp error on file hola (No such file
or directory)
[proxy:0:[email protected]] HYDU_create_process
(./utils/launch/launch.c:75): [proxy:0:[email protected]]
HYDU_create_process (./utils/launch/launch.c:75): execvp error on file
hola (No such file or directory)
execvp error on file hola (No such file or directory)
[proxy:0:[email protected]] HYDU_create_process
(./utils/launch/launch.c:75): execvp error on file hola (No such file
or directory)
Well the thing is that i dont know what is the problem.
我用了mpirun ./hola和mpirun hola(可能有用)。抱歉,报告错误的行是。 “mpirun ./hola”或“mpirun -np 3 ./hola”,当我想使用多个进程时。 – Patricio
请用你的'mpicc'和'mpirun'命令和输出编辑你的问题。你只在一台机器上运行吗? 'ls -l hola'说什么? –
'ls -l'这是'ls减小写L'。您使用的是哪个发行版和MPI库?如果你'mpirun -np 5'pwd'/hola'怎么办?如果它仍然不起作用,你可以尝试'strace -f -e execve mpirun -np 5'pwd'/hola'?你能确认你只在一个节点上运行,并且在'miMachine-LMint'上调用了'mpirun'吗?如果你'ls -l hola; mpirun -np 1 ls -l hola'? –