简体   繁体   English

SLURM sbatch 是否自动跨节点复制用户脚本?

[英]Does SLURM sbatch Automatically Copy User Script Across Nodes?

Should SLURM (specifically sbatch) automatically copy the user script (not the job configuration script) to the cluster's compute nodes for execution? SLURM(特别是sbatch)是否应该自动将用户脚本(不是作业配置脚本)复制到集群的计算节点执行? Upon executing the sbatch file from my login node, the output file is created on one of my compute nodes, but contains the following:从我的登录节点执行 sbatch 文件后,输出文件是在我的一个计算节点上创建的,但包含以下内容:

ERROR: could not open file /home/pi/slurm.jl
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] exec_options(::Base.JLOptions) at ./client.jl:287
 [5] _start() at ./client.jl:460

I'm running the batch script with sbatch julia.sbatch .我正在使用sbatch julia.sbatch运行批处理脚本。

julia.sbatch:朱莉娅.sbatch:

#!/bin/bash
#SBATCH --nodes=4
#SBATCH --ntasks=4
#SBATCH --time=00:15:00
#SBATCH --output=julia.out
#SBATCH --job-name=julia-job

julia slurm.jl

Or should the script (slurm.jl) be located on shared storage accessible to all of the nodes?或者脚本 (slurm.jl) 应该位于所有节点都可以访问的共享存储上吗?

Slurm will not copy files other than the submission script to the compute nodes. Slurm 不会将提交脚本以外的文件复制到计算节点。 From the Quick Start User Guide :快速入门用户指南

Slurm does not automatically migrate executable or data files to the nodes allocated to a job. Slurm 不会自动将可执行文件或数据文件迁移到分配给作业的节点。 Either the files must exists on local disk or in some global file system (eg NFS or Lustre).文件必须存在于本地磁盘或某些全局文件系统(例如 NFS 或 Lustre)中。

On most clusters, the /home directory is an NFS filesystem shared on each login and compute node.在大多数集群上, /home目录是在每个登录节点和计算节点上共享的 NFS 文件系统。

You can use sbcast in your script to copy the file to the node.您可以在脚本中使用sbcast将文件复制到节点。

#!/bin/bash
#SBATCH --nodes=4
#SBATCH --ntasks=4
#SBATCH --time=00:15:00
#SBATCH --output=julia.out
#SBATCH --job-name=julia-job
sbcast slurm.jl slurm.jl
julia slurm.jl

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM