【问题标题】:How to run SocWatch with OpenMPI programming?如何使用 OpenMPI 编程运行 SocWatch?
【发布时间】:2020-05-19 17:46:56
【问题描述】:

我尝试使用 openMPI 程序测量系统的能耗。

对于 OpenMPI,我们可以使用mpirun -n 4 ./hello

此程序将从 4 个进程打印 hello

现在,如果它是一个 C++ 程序,我们可以用 sudo socwatch -m -f sys -f wakelock -t 35 -p ./hello 运行 SocWatch

使用OpenMpi,我尝试sudo socwatch -m -f sys -f wakelock -t 35 -p mpirun -n 4 ./hello,但是由于socwatch无法识别到mpi-run,因此程序被停止。

如何使用 MPI 运行 SoCWatch?

如果没有,是否有任何程序可以测量 Linux 上的能耗。

【问题讨论】:

  • 尝试使用mpirun 而不是mpi-run。我不知道有任何 MPI 实现将其进程启动器命名为 mpi-run,中间带有破折号。
  • 是的。这是我输入命令时的错误。但是,当我在服务器上运行它时,我使用 mpirun
  • 我猜mpirun 作为用户在您的$PATH 中,但在使用sudo 时不再在您的$PATH 中。尝试改用mpirun 的绝对路径。请注意,您需要将--allow-run-as-root 选项传递给mpirun

标签: c++ mpi energy


【解决方案1】:

对于SocWatch,第一个参数是程序,其他参数是程序的参数。

sudo socwatch -m -f sys -f wakelock -t 35 -p [程序] [程序参数]

【讨论】:

    猜你喜欢
    • 2011-10-31
    • 2012-03-12
    • 1970-01-01
    • 1970-01-01
    • 2011-03-22
    • 2019-07-12
    • 2013-10-22
    • 1970-01-01
    • 2012-08-08
    相关资源
    最近更新 更多