【问题标题】:What does `Fatal Python error: PyThreadState_Get: no current thread` mean?`Fatal Python error: PyThreadState_Get: no current thread` 是什么意思?
【发布时间】:2016-06-09 00:11:46
【问题描述】:

我正在将一个 mpi 通信器从 python 传递到 C。我选择使用 boost 的 mpi 通信器,因为 mpi4py 似乎没有很好的 C 支持。看看吧:

        try: from boost.mpi import world
        except ImportError: from mpi import world
        err = run_with_mpi(infile, world, stdout, stderr, exc)

在安装了 boost.mpi 的系统上,这不会引发错误。但是,在 mac 上无法安装 boost.mpi。我使用自制的 boost155 公式安装了 boost 的 mpi.so 模块,然后将 .so 文件添加到 pythonpath。

一般来说,Fatal Python error: PyThreadState_Get: no current thread 是什么意思?这条消息给像我这样的开发者提供了什么线索?

完整的错误信息:

Fatal Python error: PyThreadState_Get: no current thread
[kilojoules-20160s:64471] *** Process received signal ***
[kilojoules-20160s:64471] Signal: Abort trap: 6 (6)
[kilojoules-20160s:64471] Signal code:  (0)
[kilojoules-20160s:64471] *** End of error message ***

【问题讨论】:

    标签: python c++ boost mpi message-passing


    【解决方案1】:

    如果自制程序公式中的.so 文件链接到与您正在运行的解释器不同的python 库,则可能会出现此问题,另请参阅this threadthis response

    如果您没有其他依赖项,则使用 homebrew 中的 python 解释器(应该位于 /usr/local/bin/)运行您的程序可能会解决问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-30
      • 2020-05-03
      • 2015-09-25
      • 2021-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多