Slurm:即使资源可用也无法分配资源
Slurm : cannot allocate resources even when they are available
我正在尝试在使用 SLURM 进行节点分配的集群上执行套接字编程代码。我使用了如下的 slurm 脚本:
#!/bin/bash
#SBATCH --job-name="abcd"
#SBATCH --ntasks=2
#SBATCH --nodes=2-2
#SBATCH --cpus-per-task=128
#SBATCH --partition=knl
./a.out
当运行将其作为 sbatch 脚本时,我得到一个错误 "sbatch: error: Batch job submission failed: Requested node configuration is not available"。
但是,我确实看到一些节点满足上述配置。两个节点的 scontrol 输出如下所示:
NodeName=compute140 Arch=x86_64 CoresPerSocket=64
CPUAlloc=20 CPUErr=0 CPUTot=256 CPULoad=20.01
AvailableFeatures=knl
ActiveFeatures=knl
Gres=(null)
NodeAddr=compute140 NodeHostName=compute140 Version=16.05
OS=Linux RealMemory=96000 AllocMem=81920 FreeMem=102580 Sockets=1 Boards=1
MemSpecLimit=1024
State=MIXED ThreadsPerCore=4 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A
BootTime=2018-06-04T12:41:22 SlurmdStartTime=2018-06-04T12:47:01
CapWatts=n/a
CurrentWatts=0 LowestJoules=0 ConsumedJoules=0
ExtSensorsJoules=n/s ExtSensorsWatts=0 ExtSensorsTemp=n/s
NodeName=compute141 Arch=x86_64 CoresPerSocket=64
CPUAlloc=20 CPUErr=0 CPUTot=256 CPULoad=20.01
AvailableFeatures=knl
ActiveFeatures=knl
Gres=(null)
NodeAddr=compute141 NodeHostName=compute141 Version=16.05
OS=Linux RealMemory=96000 AllocMem=81920 FreeMem=87441 Sockets=1 Boards=1
MemSpecLimit=1024
State=MIXED ThreadsPerCore=4 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A
BootTime=2018-06-04T12:46:37 SlurmdStartTime=2018-06-04T12:52:11
CapWatts=n/a
CurrentWatts=0 LowestJoules=0 ConsumedJoules=0
ExtSensorsJoules=n/s ExtSensorsWatts=0 ExtSensorsTemp=n/s
我不确定为什么当 slurm 应该为我分配请求的配置时我会收到错误消息。
我想在两个不同的 knl 节点上 运行 客户端-服务器应用程序,每个任务将是多线程的,每个任务有 128 个线程。
请帮忙,因为我尝试了几种方法,但没有任何效果。
您没有根据 CPU 明确指定内存要求,因此应用默认值。如果默认值大于 RealMemory
/CPUTot
,在您的情况下为 96000MB/128=750MB,则任务无法在一个节点中完成。
因此,如果默认值为 4GB/CPU,并且您为每个节点请求一个任务,每个任务请求 128CPUs,您实际上为每个节点请求 524GB 的 RAM,这是您的集群无法提供的.
我正在尝试在使用 SLURM 进行节点分配的集群上执行套接字编程代码。我使用了如下的 slurm 脚本:
#!/bin/bash
#SBATCH --job-name="abcd"
#SBATCH --ntasks=2
#SBATCH --nodes=2-2
#SBATCH --cpus-per-task=128
#SBATCH --partition=knl
./a.out
当运行将其作为 sbatch 脚本时,我得到一个错误 "sbatch: error: Batch job submission failed: Requested node configuration is not available"。
但是,我确实看到一些节点满足上述配置。两个节点的 scontrol 输出如下所示:
NodeName=compute140 Arch=x86_64 CoresPerSocket=64
CPUAlloc=20 CPUErr=0 CPUTot=256 CPULoad=20.01
AvailableFeatures=knl
ActiveFeatures=knl
Gres=(null)
NodeAddr=compute140 NodeHostName=compute140 Version=16.05
OS=Linux RealMemory=96000 AllocMem=81920 FreeMem=102580 Sockets=1 Boards=1
MemSpecLimit=1024
State=MIXED ThreadsPerCore=4 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A
BootTime=2018-06-04T12:41:22 SlurmdStartTime=2018-06-04T12:47:01
CapWatts=n/a
CurrentWatts=0 LowestJoules=0 ConsumedJoules=0
ExtSensorsJoules=n/s ExtSensorsWatts=0 ExtSensorsTemp=n/s
NodeName=compute141 Arch=x86_64 CoresPerSocket=64
CPUAlloc=20 CPUErr=0 CPUTot=256 CPULoad=20.01
AvailableFeatures=knl
ActiveFeatures=knl
Gres=(null)
NodeAddr=compute141 NodeHostName=compute141 Version=16.05
OS=Linux RealMemory=96000 AllocMem=81920 FreeMem=87441 Sockets=1 Boards=1
MemSpecLimit=1024
State=MIXED ThreadsPerCore=4 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A
BootTime=2018-06-04T12:46:37 SlurmdStartTime=2018-06-04T12:52:11
CapWatts=n/a
CurrentWatts=0 LowestJoules=0 ConsumedJoules=0
ExtSensorsJoules=n/s ExtSensorsWatts=0 ExtSensorsTemp=n/s
我不确定为什么当 slurm 应该为我分配请求的配置时我会收到错误消息。
我想在两个不同的 knl 节点上 运行 客户端-服务器应用程序,每个任务将是多线程的,每个任务有 128 个线程。
请帮忙,因为我尝试了几种方法,但没有任何效果。
您没有根据 CPU 明确指定内存要求,因此应用默认值。如果默认值大于 RealMemory
/CPUTot
,在您的情况下为 96000MB/128=750MB,则任务无法在一个节点中完成。
因此,如果默认值为 4GB/CPU,并且您为每个节点请求一个任务,每个任务请求 128CPUs,您实际上为每个节点请求 524GB 的 RAM,这是您的集群无法提供的.