【问题标题】:Error when using mpirun with a shell script将 mpirun 与 shell 脚本一起使用时出错
【发布时间】:2019-03-08 09:40:36
【问题描述】:

当我跑步时

mpirun -np 4 mpi_script.sh

我得到了错误

Open MPI tried to fork a new process via the "execve" system call but failed.
...
Error:             Exec format error

尽管我可以使用./mpi_script.sh 运行脚本

【问题讨论】:

    标签: shell mpi openmpi


    【解决方案1】:

    就我而言,问题是我没有shebang

    #!/usr/bin/env bash 添加到我的脚本顶部修复了它:

    #!/usr/bin/env bash
    
    # rest of script
    # ... 
    

    注意确保文件具有执行权限:

    chmod +x mpi_script.sh
    

    【讨论】:

      猜你喜欢
      • 2010-12-08
      • 2023-03-07
      • 2014-07-18
      • 1970-01-01
      • 2016-04-26
      • 2018-07-27
      • 1970-01-01
      • 1970-01-01
      • 2022-10-24
      相关资源
      最近更新 更多