在docker中运行一个mpi应用程序

我正在玩docker,我想能够在其中启动一个mpi应用程序。

我正在使用ubuntu:latest作为基础映像,并且已经安装了所需的工具来编译我的程序并将其与mpi链接起来。

当我使用mpirun启动程序时,我收到以下警告:

[c1dab84c3fac:10417] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file ess_hnp_module.c at line 170 -------------------------------------------------------------------------- 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_plm_base_select failed --> Returned value Not found (-13) instead of ORTE_SUCCESS -------------------------------------------------------------------------- [c1dab84c3fac:10417] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file runtime/orte_init.c at line 128 -------------------------------------------------------------------------- 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_set_name failed --> Returned value Not found (-13) instead of ORTE_SUCCESS -------------------------------------------------------------------------- [c1dab84c3fac:10417] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file orterun.c at line 694 

如果我在一个正常的Ubuntu(相同版本)中运行相同的程序,它运行。

Docker容器不像普通的Ubuntu。 默认的Ubuntu容器缺less一些基本的东西(例如:init,ssh daemon,cron)

通常我会使用phusion的基础镜像docker,像下面的goto一样了解更多关于默认Ubuntu docker中的一些基本问题以及如何解决这些问题。

http://phusion.github.io/baseimage-docker/

我最近遇到这个问题。 安装ssh包会解决这个问题。