【发布时间】:2021-10-16 07:03:00
【问题描述】:
我正在使用 FreeBSD 13,并尝试编译(成功)和运行(不成功)一个简单的最小 MPI 程序
#include <mpi.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
int res;
res = MPI_Init(&argc, &argv);
if (res != MPI_SUCCESS)
{
fprintf (stderr, "MPI_Init failed!\n");
exit (0);
}
res = MPI_Finalize();
if (res != MPI_SUCCESS)
{
fprintf (stderr, "MPI_Finalize failed!\n");
exit (0);
}
}
我正在使用mpich-3.4.2_2 MPI 库,用mpicc example_mpi.c 编译上面的代码,然后用mpirun -np 2 ./a.out 运行。
编译器是
FreeBSD clang 版本 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) 目标:x86_64-unknown-freebsd13.0 线程模型:posix 安装目录:/usr/bin
我收到一个奇怪的 MPI 初始化错误
节点 0 上的中止 (268484367)(comm 0 中的等级 0):PMPI_Init 中的致命错误:其他 MPI 错误,错误堆栈: MPIR_Init_thread(153):gpu_init 失败 [未设置]:write_line 错误; fd=-1 buf=:cmd=abort 退出码=268484367 : write_line 失败的系统消息:错误的文件描述符 MPI_Init 失败!
知道发生了什么吗?我在 root 和同样的问题下运行。
【问题讨论】:
-
看起来它正在尝试启动 GPU -
gpu_init failed。你有 GPU 吗? MPI 库编译时是否支持 GPU? -
@DavidHenty 我有一个 GPU,虽然我没有编译 MPI 库,我只是用
pkg install mpich安装它。