【问题标题】:error while trying to run MPI program with username尝试使用用户名运行 MPI 程序时出错
【发布时间】:2014-03-19 11:31:01
【问题描述】:

当我通过以下方式运行程序时:

myshell$] mpirun --hosts localhost,192.168.1.4 ./a.out

程序成功执行。现在当我尝试运行时:

myshell$] mpirun --hosts localhost,myac@192.168.1.4 ./a.out

openssh 提示输入密码。我明白了:

Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(433)..............: 
MPID_Init(176).....................: channel initialization failed
MPIDI_CH3_Init(70).................: 
MPID_nem_init(286).................: 
MPID_nem_tcp_init(108).............: 
MPID_nem_tcp_get_business_card(354): 
MPID_nem_tcp_init(313).............: gethostbyname failed, myac@192.168.1.4 (errno 1)

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
[proxy:0:0@myac] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:886): assert (!closed) failed
[proxy:0:0@myac] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[proxy:0:0@myac] main (./pm/pmiserv/pmip.c:206): demux engine error waiting for event
[mpiexec@myac] HYDT_bscu_wait_for_completion (./tools/bootstrap/utils/bscu_wait.c:76): one of the processes terminated badly; aborting
[mpiexec@myac] HYDT_bsci_wait_for_completion (./tools/bootstrap/src/bsci_wait.c:23): launcher returned error waiting for completion
[mpiexec@myac] HYD_pmci_wait_for_completion (./pm/pmiserv/pmiserv_pmci.c:217): launcher returned error waiting for completion
[mpiexec@myac] main (./ui/mpich/mpiexec.c:331): process manager error waiting for completion

为什么我在提供用户名时会出错?

【问题讨论】:

  • 您可能必须传递密码 no?
  • 我被提示输入密码,我正确地提供了相同的密码,否则它会给出“权限被拒绝错误”
  • 您可以使用该用户名而不使用密码 SSH 到 192.168.1.4。如果没有,您需要进行设置,以便您可以先执行此操作。 MPICH 需要无密码访问。

标签: c multiprocessing mpi mpich


【解决方案1】:

您可以尝试在 ssh 配置文件 (http://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/) 中而不是在 mpirun 命令行中指定用户名。这样,mpirun 可能不会被额外的用户名部分所混淆,据我从它不支持的文档中可以看出。但是 ssh 可以在幕后使用您在 ssh 配置文件中指定的用户名。当然,您还需要设置 SSH 密钥,这样您就不必输入密码了。

【讨论】:

    【解决方案2】:

    我不相信 MPICH 支持在命令行的 --hosts 值中提供用户名。您应该尝试 wiki 上描述的基于主机文件的方法。 http://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager#Using_Hydra_on_Machines_with_Different_User_Names

    例如:

    shell$ cat hosts
    donner  user=foo
    foo     user=bar
    shakey  user=bar
    terra   user=foo
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-02
      • 2017-07-15
      • 2012-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多