Pass command line arguments via sbatch

后端 未结 6 1223
我寻月下人不归
我寻月下人不归 2021-01-31 02:44

Suppose that I have the following simple bash script which I want to submit to a batch server through SLURM:

#!/bin/bash

#SBATCH -o \"outFile\"$1\".txt\"
#SBATC         


        
6条回答
  •  庸人自扰
    2021-01-31 03:16

    If you pass your commands via the command line, you can actually bypass the issue of not being able to pass command line arguments in the batch script. So for instance, at the command line :

    var1="my_error_file.txt"
    var2="my_output_file.txt"
    sbatch --error=$var1 --output=$var2 batch_script.sh
    

提交回复
热议问题