1

I have a small SLURM cluster, which I am using to run jobs. I run a script and while that script is running, I want to enter a specific key command "t + enter". I believe I should do it by submitting another job, but I need it to run within the first running script.

Any ideas on how I can achieve this?

George
  • 111
  • 1

1 Answers1

0

George,

You would not want to queue a separate sbatch command to do this. If you used the OpenHPC stack, you could potentially use wwsh ssh -a <command> where the -a is for all or alternatively replace this with the nodes that you want to run the command on.

As for doing it from your existing batch script, have you considered using expect? The expect program would allow you to type something like send -- "t\r" (the t character followed by a return key) if the time that you needed the input to be run would be deterministic. If you want more information on expect, check out something like https://likegeeks.com/expect-command/ .

In my experience can be helpful if your cluster doesn't have a lot of space or you want max performance to use a command line only approach instead of installing x11 on a system (or at least the parts of it required to run xdotool). Personal comfort level will dictate this.

thePinochleKid
  • 120
  • 1
  • 6