mpirun不起作用并要求将TMPDIR变量更改为/ tmp(mpirun doesnt work and ask to change TMPDIR variable to /tmp)

编程入门 行业动态 更新时间:2024-10-26 16:33:52
mpirun不起作用并要求将TMPDIR变量更改为/ tmp(mpirun doesnt work and ask to change TMPDIR variable to /tmp)

我编译了下一个代码:

#include <mpi.h> #include <stdio.h> int main(int argc, char* argv[]) { int rank, size, len; char host[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Finalize(); return 0; }

-------------------------------------------------- -----

mpirun检测到一个或多个进程退出非零状态,从而导致作业终止。 这样做的第一个过程是:

流程名称:[[22798,1],0]

退出代码:1

请告诉我,我该怎么做才能运行这段代码?

I compiled the next code:

#include <mpi.h> #include <stdio.h> int main(int argc, char* argv[]) { int rank, size, len; char host[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Finalize(); return 0; }

-------------------------------------------------------

mpirun detected that one or more processes exited with non-zero status, thus causing the job to be terminated. The first process to do so was:

Process name: [[22798,1],0]

Exit code: 1

Tell me please, what should I do to run this code?

最满意答案

已报告初始错误,这被视为一项功能。 使用短路的TMPDIR是正确的。

您可能想尝试在openmpi-mca-params.conf添加orte_tmpdir_base = /tmp ,看看它是否修复了您的问题(因此您不必在每个终端中设置TMPDIR )

关于第二个问题,你很可能运行/usr/bin/test而不是你的测试程序,所以你可以简单地mpirun -np 2 ./test或将测试程序重命名为不在你的PATH

the initial error was already reported and this is considered as a feature. using a shorted TMPDIR as you did is correct.

you might want to try adding orte_tmpdir_base = /tmp in your openmpi-mca-params.conf and see whether it fixes your problem (so you will not have to set TMPDIR in every terminal)

about the second issue, you are very likely running /usr/bin/test instead of your test program, so you can simply mpirun -np 2 ./test or rename your test program into something that is not in your PATH

更多推荐

本文发布于:2023-07-24 10:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1244928.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   不起作用   TMPDIR   mpirun   tmp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!