Why can't you just do for fasta_file in `ls /path/to/fasta_files`; do sbatch --output=$fasta_file.out --error=$fasta_file.err myscript.sbatch $fasta_file; done
On Wed, Oct 25, 2017 at 7:08 PM, Lachlan Musicman <data...@gmail.com> wrote: > Hi All, > > I've now been asked twice in two days if there is any way to intelligently > name slurm output files. > > Sometimes our users will do something like > > for fasta_file in `ls /path/to/fasta_files`; do sbatch myscript.sbatch > $fasta_file; done > > They would like their output and error files to be like: > > --output=$fasta_file.out > --error=$fasta_file.err > > Something like this shows that it's not in place at the moment. > > https://unix.stackexchange.com/questions/285690/slurm- > custom-standard-output-name > > 1. Are there any plans to implement something like this? > 2. Does anyone have a good solution that doesn't feel as hacky as > > for fasta_file in /path/to/files/*fasta; > do JOBID=$(sbatch --parsable test.sbatch $filename); > ln -s $JOBID.out $filename.out; > ln -s $JOBID.err $filename.err; > done > > > Cheers > L. > > > ------ > "The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic > civics is the insistence that we cannot ignore the truth, nor should we > panic about it. It is a shared consciousness that our institutions have > failed and our ecosystem is collapsing, yet we are still here — and we are > creative agents who can shape our destinies. Apocalyptic civics is the > conviction that the only way out is through, and the only way through is > together. " > > *Greg Bloom* @greggish https://twitter.com/greggish/ > status/873177525903609857 >