我在 slurm 文档中读到我们可以使用的(在设置会计之后) sacct --format="JobID,AllocCPUS,**ReqGRES**
获取 GRES 请求的统计信息。我还使用 gres.conf 配置了我的 GPU(有 2 个),但此命令始终返回 0 表示 ReqGRES
或 AllocGRES
.有什么想法吗?提前致谢
有很多原因我认为您不是 root 用户,sacct 只显示用户的作业登录,或者您必须添加选项 -a 或者您的配置文件 slurm.conf 或 slurm 的日志文件有问题,有必要检查
sacct -a -X --format=JobID,AllocCPUS,Reqgres
它有效。
我总是发现这些报告对sreport很有帮助。只需指定 TRES,就像在 gres.conf slurm.conf 中所做的那样。
$sreport -tminper cluster utilization --tres="gres/gpu" start=2019-05-01T00:00:00
--------------------------------------------------------------------------------
Cluster Utilization 2019-05-01T00:00:00 - 2019-05-14T23:59:59
Usage reported in TRES Minutes/Percentage of Total
--------------------------------------------------------------------------------
Cluster TRES Name Allocated Down PLND Down Idle Reserved Reported
--------- -------------- ----------------- ----------------- ----------------- ----------------- ----------------- ------------------
gpugrid+ gres/gpu 8186500(70.06%) 17889(0.96%) 0(0.00%) 1289051(22.97%) 0(0.00%) 9693440(100.00%)
你也可以按用户,按gres执行,例如:--tres="gres/gpu:v100"(配置slurm.conf)等。
尝试使用 AllocTRES
sacct -X --format="JobID, State%-10, JobName%-30, Elapsed, AllocTRES%-42"
还可以使用 -e 查看可在格式选项中指定的可用字段列表。您还可以在此处查看列表:https://slurm.schedmd.com/sacct.html#OPT_helpformat
sacct -e