我不知道slurm脚本有什么问题--当我试图定义变量时,接收到的错误消息对我的$input和命令都是不明确的重定向。
#!/bin/bash
#SBATCH --job-name=gim
#SBATCH --time=24:00:00
#SBATCH --ntasks=20
#SBATCH --ntasks-per-node=2
#SBATCH --cpus-per-task=1
#SBATCH -o output_%A_%a.out #Standard Output
#SBATCH -e output_%A_%a.err #Standard Error
module load program
input= gim${SLURM_ARRAY_TASK_ID}.gjf
output= gim${SLURM_ARRAY_TASK_ID}.log
program $input > $output我管理它的方式是:
sbatch --array=1-500 ./slurm.job发布于 2016-07-13 22:38:11
白色空间很重要:
#!/bin/bash
# ...etc...
input=gim${SLURM_ARRAY_TASK_ID}.gjf
output=gim${SLURM_ARRAY_TASK_ID}.log
program "$input" > "$output"注意,在赋值的=符号周围缺少空格。白色空间很重要:
foo = bar # this runs "foo" with "=" as the first argument and "bar" as the second
foo =bar # this runs "foo" with "=bar" as its first argument
foo= bar # this runs "bar" as a command with "foo" as an empty string in its environment
foo=bar # this assigns the value "bar" to the shell variable "foo"https://stackoverflow.com/questions/38362811
复制相似问题