1

I have a pending job and I want to resize it. I tried:

scontrol update job <jobid> NumNodes=128

It does not work.

Note: I can change the walltime using scontrol. But when I try to change number of nodes, it failed. It looks like I can change the nodes according to this page http://www.nersc.gov/users/computational-systems/cori/running-jobs/monitoring-jobs/.

4

2 回答 2

3

您可以在 Slurm 中调整作业的大小,前提是该作业正在挂起或正在运行。

根据FAQ,您可以按照以下步骤调整大小(带有示例):

扩张

  1. 假设j1请求 4 个节点并提交:

    $ salloc -N4 bash
    
  2. 提交一个新作业 ( j2 ),其中包含j1的额外节点数(在本例中为 10 个,总共 14 个节点)并使其依赖于j1 (SLURM_JOBID):

    $ salloc -N10 --dependency=expand:$SLURM_JOBID
    
  3. 释放j2的节点:

    $ scontrol update jobid=$SLURM_JOBID NumNodes=0
    
  4. 终止j2

    $ exit
    
  5. 将先前发布的节点分配给j1 :

    $ scontrol update jobid=$SLURM_JOBID NumNodes=ALL
    
  6. 并更新j1的环境变量:

    $ ./slurm_job_$SLURM_JOBID_resize.sh
    

现在,j1有 14 个节点。

收缩

  1. 假设j1已提交:

    $ salloc -N4 bash
    
  2. 将j1更新为新大小:

    $ scontrol update jobid=$SLURM_JOBID NumNodes=2
    $ scontrol update jobid=$SLURM_JOBID NumNodes=ALL
    
  3. 并更新j1的环境变量(脚本由前面的命令创建):

    $ ./slurm_job_$SLURM_JOBID_resize.sh
    

现在,j1有 2 个节点。

于 2018-03-21T10:12:27.267 回答
2

这是我从 NERSC 帮助台获得的解决方案(感谢 LBNL 的 Woo-Sun Yang):

$ scontrol update jobid=jobid numnodes=new_numnodes-new_numnodes

例如$ scontrol update jobid=12345 numnodes=10-10

诀窍是使用上述格式的 numnodes。它适用于缩小和扩展节点。

于 2018-04-19T21:38:02.790 回答