【发布时间】:2015-09-14 09:39:18
【问题描述】:
我写了一个简单的 MPI 程序:
#include <stdio.h>
2 #include "mpi.h"
3
4 int main(int argc,char* argv[])
5 {
6 int rank;
7 int size;
8
9 MPI_Init(0,0);
10 MPI_Comm_rank(MPI_COMM_WORLD,&rank);
11 MPI_Comm_size(MPI_COMM_WORLD,&size);
12 printf("Hello World from process %d of %d\n",rank,size);
13 MPI_Finalize();
14 return 0;
15 }
程序编译成功,但无法运行
我使用“mpirun -np 4 ./hello”或“mpirun -np 4 hello”
显示如下:
_create_ep, create command failed: Operation not permitted
GLEX_ERR(ln0): _init_glex(608), _create_ep: system error
_create_ep, create command failed: Operation not permitted
GLEX_ERR(ln0): _init_glex(608), _create_ep: system error
_create_ep, create command failed: Operation not permitted
GLEX_ERR(ln0): _init_glex(608), _create_ep: system error
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(498)........:
MPID_Init(187)...............: channel initialization failed
MPIDI_CH3_Init(89)...........:
MPID_nem_init(320)...........:
MPID_nem_glex_init(74).......:
MPIDI_nem_glex_init_glex(610): Cannot create GLEX endpoint.
此外,我在 HPC 上编写了这个程序。我猜“无法创建 GLEX 端点”的问题可能与 HPC 相关(HPC 已经部署了 MPI)。
【问题讨论】:
-
试试
mpiexec -np 4 -f <machinefile> ./hello。您的机器文件包含主机名和每台主机上的处理器数量。
标签: runtime-error mpi hpc