【问题标题】:"mpirun was unable to launch the specified application as it could not find an executable" error“mpirun 无法启动指定的应用程序,因为它找不到可执行文件”错误
【发布时间】:2013-10-13 08:38:43
【问题描述】:

我遇到了一个奇怪的问题,它有效,但现在无效。

我在 2 台计算机之间运行一个带有 tau 分析的 OpenMPI 程序。貌似mpirun不能在远程主机上运行tau_exec程序,可能是权限问题?

 cluster@master:~/software/mpi_in_30_source/test2$ mpirun -np 2 --hostfile hostfile -d           tau_exec -v -T MPI,TRACE,PROFILE ./hello.exe
 [master:19319] procdir: /tmp/openmpi-sessions-cluster@master_0/4568/0/0
 [master:19319] jobdir: /tmp/openmpi-sessions-cluster@master_0/4568/0
 [master:19319] top: openmpi-sessions-cluster@master_0
 [master:19319] tmp: /tmp
 [slave2:06777] procdir: /tmp/openmpi-sessions-cluster@slave2_0/4568/0/1
 [slave2:06777] jobdir: /tmp/openmpi-sessions-cluster@slave2_0/4568/0
 [slave2:06777] top: openmpi-sessions-cluster@slave2_0
 [slave2:06777] tmp: /tmp
 [master:19319] [[4568,0],0] node[0].name master daemon 0 arch ff000200
 [master:19319] [[4568,0],0] node[1].name slave2 daemon 1 arch ff000200
 [slave2:06777] [[4568,0],1] node[0].name master daemon 0 arch ff000200
 [slave2:06777] [[4568,0],1] node[1].name slave2 daemon 1 arch ff000200
 [master:19319] Info: Setting up debugger process table for applications
   MPIR_being_debugged = 0
   MPIR_debug_state = 1
   MPIR_partial_attach_ok = 1
   MPIR_i_am_starter = 0
   MPIR_proctable_size = 2
   MPIR_proctable:
     (i, host, exe, pid) = (0, master,      /home/cluster/software/mpi_in_30_source/test2/tau_exec, 19321)
     (i, host, exe, pid) = (1, slave2,      /home/cluster/software/mpi_in_30_source/test2/tau_exec, 0)
 --------------------------------------------------------------------------
 mpirun was unable to launch the specified application as it could not find an executable:

 Executable: tau_exec
 Node: slave2

 while attempting to start process rank 1.
 --------------------------------------------------------------------------
 [slave2:06777] sess_dir_finalize: job session dir not empty - leaving
 [slave2:06777] sess_dir_finalize: job session dir not empty - leaving
 [master:19319] sess_dir_finalize: job session dir not empty - leaving
 [master:19319] sess_dir_finalize: proc session dir not empty - leaving
 orterun: exiting with status -123

在 slave2 上:

cluster@slave2:~/software/mpi_in_30_source/test2$ tau_exec -T MPI,TRACE,PROFILE ./hello.exe
hello MPI user: from process = 0 on machine=slave2, of NCPU=1 processes
cluster@slave2:~/software/mpi_in_30_source/test2$ which tau_exec
/home/cluster/tools/tau-2.22.2/arm_linux/bin/tau_exec

所以两个节点上都有一个工作的 tau_exec。当我在没有 tau_exec 的情况下运行 mpirun 时,一切正常。

cluster@master:~/software/mpi_in_30_source/test2$ mpirun -np 2 --hostfile hostfile  ./hello.exe
hello MPI user: from process = 0 on machine=master, of NCPU=2 processes
hello MPI user: from process = 1 on machine=slave2, of NCPU=2 processes

【问题讨论】:

    标签: openmpi


    【解决方案1】:

    尝试在命令行中输入tau_exec 的完整路径。您的 PATH 可能在所有节点上都不相同。如果是这种情况,它将无法在路径不正确的任何地方找到可执行文件。

    这很可能不是权限问题,但我不记得 Open MPI 中的所有错误消息都告诉您它们可能有多大帮助。

    【讨论】:

    • 即使在一台简单的笔记本电脑上,这实际上也可能是一个问题:在我的情况下,OpenMPI 不喜欢~
    【解决方案2】:

    当我尝试命名输出文件时,曾经出现过这样的错误 试着保持原样

        mpirun -n <number> a.out
    

    这就是我的工作原理!

    【讨论】:

      【解决方案3】:

      可能是因为你已经安装了 openMPI 而不仅仅是 MPICH2,所以你应该以 root 运行以下命令:

      root~# update-alternatives --config mpirun

      替代 mpirun 有 2 种选择(提供 /usr/bin/mpirun)。

      选择 |路径 |优先 |状态

      • *0 | /usr/bin/mpirun.openmpi | 50 |自动模式
      • 1 | /usr/bin/mpirun.mpich2 | 40 |手动模式
      • 2 | /usr/bin/mpirun.openmpi | 50 |手动模式

      按回车键保留当前选择[*],或输入选择编号:1

      那么你应该选择MPICH版本,如上,正常运行。

      【讨论】:

        【解决方案4】:

        如果您使用 mpirun 运行 shell 脚本,请确保您有 chmod +x script_file.sh 否则您会看到此错误。

        【讨论】:

          猜你喜欢
          • 2015-02-16
          • 2015-11-12
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-06-07
          • 2011-10-24
          相关资源
          最近更新 更多