我编译了下一个代码:
#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
更多推荐
发布评论