Multiprocessing with Screen and Bash

Running a python script on different nodes in the school using SSH. Each node has 8 cores. I use the GNU screen to disconnect from a single process.

Is it desirable:

  • Launch multiple screen sessions.
  • Start the process with one screen and use &bash in the terminal.

Are they equivalent?

I'm not sure that my experiments are poorly encoded and require an excessive amount of time (very possible), or my choice to use 1. significantly slows down the process. Thank!

+4
source share
2 answers

bash , - (, /home ):

#!/bin/bash    

for i in {1..$NUM_NODES}
do
    ssh node$i 'python /home/ryan/my_script.py' &
done

script - screen . screen , .

, (, - 7, ). , , Torque, Maui qsub. .

+1

, . , . .

+1

Source: https://habr.com/ru/post/1547490/


All Articles