MPI - 找不到架构x86_64的符号

时间:2016-03-17 03:17:01

标签: clang mpi

我试图在我的Mac上安装mpi(运行Yosemite),然后运行以下内容:

brew update
brew install open-mpi

一切似乎都没问题,但当我尝试编译我的文件mpi.cpp时,我收到了:

 Undefined symbols for architecture x86_64:
  "_MPI_Allgatherv", referenced from:
      _main in mpi.o
  "_MPI_Comm_rank", referenced from:
      _main in mpi.o
  "_MPI_Comm_size", referenced from:
      _main in mpi.o
  "_MPI_Finalize", referenced from:
      _main in mpi.o
  "_MPI_Init", referenced from:
      _main in mpi.o
  "_MPI_Reduce", referenced from:
      _main in mpi.o
  "_MPI_Scatterv", referenced from:
      _main in mpi.o
  "_MPI_Type_commit", referenced from:
      _main in mpi.o
  "_MPI_Type_contiguous", referenced from:
      _main in mpi.o
  "_ompi_mpi_comm_world", referenced from:
      _main in mpi.o
  "_ompi_mpi_double", referenced from:
      _main in mpi.o
  "_ompi_mpi_int", referenced from:
      _main in mpi.o
  "_ompi_mpi_op_min", referenced from:
      _main in mpi.o
  "_ompi_mpi_op_sum", referenced from:
      _main in mpi.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mpi] Error 1

我不确定该怎么做。还有一个额外的步骤吗?

0 个答案:

没有答案