Re: [slurm-users] [EXT]Re: srun with &&, |, and > oh my!

2023-01-23 Thread Chandler
Williams, Gareth (IM&T, Black Mountain) wrote on 1/23/23 7:55 PM: Be brave and experiment! How far wrong can you go? Hmm I do love breaking and re-fixing things... srun bash -c "cmd1 infile1 | cmd2 opt2 arg2 | cmd3 opt3 arg3 -- > outfile && cmd4 opt4 arg4" Yes this will work! Thanks!

Re: [slurm-users] srun with &&, |, and > oh my!

2023-01-23 Thread Williams, Gareth (IM&T, Black Mountain)
Be brave and experiment! How far wrong can you go? I will offer two related tips. 1) Since you want/need to use shell syntax, use srun to run a shell and pass the command as a string for that shell to interpret. Like: srun bash -c "cmd1 infile1 | cmd2 opt2 arg2 | cmd3 opt3 arg3 -- > outfile &&

[slurm-users] srun with &&, |, and > oh my!

2023-01-23 Thread Chandler
I want to run a command like: cmd1 infile1 | cmd2 opt2 arg2 | cmd3 opt3 arg3 -- > outfile && cmd4 opt4 arg4 Which runs fine at any prompt. I'm afraid to just put `srun` at the beginning though, would it run the whole set of commands on the compute node? I don't want to try it because it invol