Caf*_*eso 10 memory cluster-computing slurm
我在SLURM集群中工作,并且同时(在多个输入文件上)使用相同的bash脚本运行多个进程。
在工作结束时,该过程被终止,这是我获得的错误。
slurmstepd: error: Detected 1 oom-kill event(s) in step 1090990.batch cgroup.
Run Code Online (Sandbox Code Playgroud)
我的猜测是内存有问题。但是我怎么能知道更多呢?我没有提供足够的内存吗?还是作为用户我要求的权限超出了我的权限?
有什么建议吗?
kas*_*otr 11
批准的答案是正确的,但更准确地说,是错误的
slurmstepd: error: Detected 1 oom-kill event(s) in step 1090990.batch cgroup.
Run Code Online (Sandbox Code Playgroud)
表示您的 Linux 的CPU RAM 内存不足。
例如,如果你在 GPU 上运行一些计算,请求比可用内存更多的 GPU 内存将导致这样的错误(例如 PyTorch):
RuntimeError: CUDA out of memory. Tried to allocate 8.94 GiB (GPU 0; 15.90 GiB total capacity; 8.94 GiB already allocated; 6.34 GiB free; 0 bytes cached)
Run Code Online (Sandbox Code Playgroud)
查看本文中的解释以获取更多详细信息。
解决方案:增加或添加您的脚本参数--mem-per-cpu。
1) 如果您使用sbatch :sbatch your_script.sh来运行您的脚本,请在其中添加以下行:
#SBATCH --mem-per-cpu=<value bigger than you've requested before>
Run Code Online (Sandbox Code Playgroud)
2)如果您使用的是sran:sran python3 your_script.py像这样添加这个参数:
sran --mem-per-cpu=<value bigger than you've requested before> python3 your_script.py
Run Code Online (Sandbox Code Playgroud)