gpt4 book ai didi

compiler-errors - 我如何编译MPI程序

转载 作者:行者123 更新时间:2023-12-02 10:56:24 25 4
gpt4 key购买 nike

我尝试使用“mpirun -np 4 ./code.c”在MPI上运行并行代码,并得到以下消息:

Open MPI tried to fork a new process via the "execve" system call butfailed. Open MPI checks many things before attempting to launch achild process, but nothing is perfect. This error may be indicative ofanother problem on the target host, or even something as silly ashaving specified a directory for your application. Your job will nowabort.


我究竟做错了什么?

最佳答案

您必须先编译代码,然后才能使用mpirun运行它。
编译代码:

mpicc code.c -o code
确保安装编译器来执行此操作。您可以使用 Open MPI
然后,使用以下命令运行它:
mpirun -np 4 code
您可以找到很棒的教程 here

关于compiler-errors - 我如何编译MPI程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62761128/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com