我的计划:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[]) {
int numprocs, rank, namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Get_processor_name(processor_name, &namelen);
printf("Process %d on %s out of %d\n", rank, processor_name, numprocs);
MPI_Finalize();
}
要运行的命令:
mpirun -np 2 -machinefile mach_list a.out
我收到了这些错误:
[noor-desktop:04209] [[50859,0],1]->[[50859,0],0] mca_oob_tcp_msg_send_handler: writev failed: Bad file descriptor (9) [sd = 9]
[noor-desktop:04209] [[50859,0],1]->[[50859,0],0] mca_oob_tcp_msg_send_handler: writev failed: Bad file descriptor (9) [sd = 9]
[noor-desktop:04209] [[50859,0],1] routed:binomial: Connection to lifeline [[50859,0],0] lost
[noor-desktop:04209] [[50859,0],1] routed:binomial: Connection to lifeline [[50859,0],0] lost
机器文件的内容是:
noor@192.168.1.4
noor@192.168.1.4
没问题,我已经使用没有密码的ssh登录了,因为我已经在那里复制了公钥。