【发布时间】:2022-01-12 23:31:20
【问题描述】:
我有两个可执行的 Python3 脚本,如下所示。
脚本1:
#/usr/bin/env python
import sys
from mymodule import launch
if __name__ == '__main__':
sys.exit(launch())
和
脚本2:
#/usr/bin/env python
import sys
if __name__ == '__main__':
from mymodule import launch
sys.exit(launch())
我对 CPython 的理解是,这两个脚本应该是一样的。
但是,如果我尝试使用 OpenMPI 的 mpirun 运行 ./script1 脚本,如下所示:
$ mpirun -np 2 ./script1
它失败(在 Debian linux 上)并出现以下错误:
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
getting local rank failed
--> Returned value No permission (-17) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
orte_ess_init failed
--> Returned value No permission (-17) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems. This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):
ompi_mpi_init: ompi_rte_init failed
--> Returned "No permission" (-17) instead of "Success" (0)
--------------------------------------------------------------------------
*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
*** and potentially your MPI job)
[3018108860e1:05983] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!
但如果我跑:
$ mpirun -np 2 ./script2
它运行没有错误。
我希望能给您一个独立的简短示例,说明 mymodule 模块和重现此错误的 go 函数。我试图将我的大型生产代码减少到重现问题的小代码,但每次我尝试将生产代码缩减为小代码时,错误是不可重现的。所以,也就是说,我不是要求大家告诉我我的错误在哪里。
相反,我想知道你们中是否有人有任何想法关于为什么两个启动脚本可能表现不同?
【问题讨论】: