【发布时间】:2017-12-22 22:49:20
【问题描述】:
我正在尝试在 SLURM 上提交一系列作业,但 sleep 命令没有按预期工作。我想每 10 秒启动一次工作。但是,此代码等待 10 秒以启动整个作业数组。我应该如何修改以下 bash 文件?
#!/usr/bin/env bash
# The name to show in queue lists for this job:
#SBATCH -J matlab.sh
# Number of desired cpus:
#SBATCH --cpus=1
#SBATCH --mem=8gb
# The time the job will be running:
#SBATCH --time=167:00:00
# To use GPUs you have to request them:
##SBATCH --gres=gpu:1
# If you need nodes with special features uncomment the desired constraint line:
##SBATCH --constraint=bigmem
#SBATCH --constraint=cal
##SBATCH --constraint=slim
# Set output and error files
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out
# MAKE AN ARRAY JOB, SLURM_ARRAYID will take values from 1 to 100
#SARRAY --range=1-60
# To load some software (you can show the list with 'module avail'):
module load matlab
export from=400
export to=1000
export steps=60
mkdir temp_${SLURM_ARRAYID}
cd temp_${SLURM_ARRAYID}
# the program to execute with its parameters:
matlab < ../SS.m > output_temp_${SLURM_ARRAYID}.out
sleep 10
【问题讨论】:
标签: slurm