User Tools

Site Tools


users:guides:screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
users:guides:screen [2018/06/18 08:34] – created admins_ceabusers:guides:screen [2020/10/08 08:14] (current) admins_ceab
Line 10: Line 10:
 We learn to use Screen with the program Mr Bayes in a node of the cluster. Without screen we had to keep the terminal open all the time (and if it is closed accidentally MrBayes will be interrupted). So: We learn to use Screen with the program Mr Bayes in a node of the cluster. Without screen we had to keep the terminal open all the time (and if it is closed accidentally MrBayes will be interrupted). So:
  
-1. Connection with te cluster as usual: +1.Connection with te cluster as usual:  
 ``` ```
 ssh <user>@cluster-ceab.ceab.csic.es ssh <user>@cluster-ceab.ceab.csic.es
 ``` ```
-2. Start a screen session with an id label+ 
 +2.Start a screen session with an id label 
 ``` ```
 ~$ screen -S pruebaScreen ~$ screen -S pruebaScreen
 ``` ```
 +
 Here we don't notice any change, it's like use the command 'clear'. The prompt ($) will be the same, but now we are inside a 'screen terminal' Here we don't notice any change, it's like use the command 'clear'. The prompt ($) will be the same, but now we are inside a 'screen terminal'
  
-3. Now let's do a qlogin with the resources that we'll need:+3.Now let's do a qlogin with the resources that we'll need: 
 ``` ```
 @cluster-ceab:~$ qlogin -l h_vmem=10G -pe make 4 @cluster-ceab:~$ qlogin -l h_vmem=10G -pe make 4
Line 33: Line 38:
 ``` ```
  
-4. Execute the program, in this example, Mr Bayes+4.Execute the program, in this example, Mr Bayes 
 ``` ```
 @node108:~$ mpirun -np 4 /home/soft/mrbayes/src/./mb @node108:~$ mpirun -np 4 /home/soft/mrbayes/src/./mb
Line 55: Line 61:
 MrBayes > MrBayes >
 ``` ```
 +
 This step is important. Now we will exit from our 'screen terminal' (that's mean go back to a 'normal terminal'). Use 'Ctrl+A' and then push 'D' (detach) or simpler 'screen -d' This step is important. Now we will exit from our 'screen terminal' (that's mean go back to a 'normal terminal'). Use 'Ctrl+A' and then push 'D' (detach) or simpler 'screen -d'
 +
  
 ``` ```
Line 64: Line 72:
 Now we can exit even from the cluster, our program will keep running Now we can exit even from the cluster, our program will keep running
  
-6. After log in again to cluster-ceab, if we want to reattach to our screen session first we check how many sessions are.+5.After log in again to cluster-ceab, if we want to reattach to our screen session first we check how many sessions are. 
 + 
 ``` ```
 miguel.omullony@cluster-ceab:~$ screen -ls miguel.omullony@cluster-ceab:~$ screen -ls
Line 86: Line 96:
 screen -r <screen.id> screen -r <screen.id>
 ``` ```
 +
 or or
 +
 ``` ```
 screen -d -r <screen.id> screen -d -r <screen.id>
 ``` ```
  
-7. When the program has ended and we want to close the screen session. First close the program if it's opened.+6.When the program has ended and we want to close the screen session. First close the program if it's opened.
 Then exit the node to close the qlogin and finally exit again to close the screen session Then exit the node to close the qlogin and finally exit again to close the screen session
  
Line 100: Line 112:
  
 #again it's like use the command clear #again it's like use the command clear
 +
 ``` ```
 +
 If I press up key: If I press up key:
 +
 +
 ``` ```
 miguel.omullony@cluster-ceab:~$ screen -d -r 14868 # last command I used before I reattached to the screen session miguel.omullony@cluster-ceab:~$ screen -d -r 14868 # last command I used before I reattached to the screen session
Line 107: Line 123:
 miguel.omullony@cluster-ceab:~$ miguel.omullony@cluster-ceab:~$
 ``` ```
 +
  
 This is an example. I will use  this to indicate our terminal '--------- N' ; and this '---------- S' means the screen terminal: This is an example. I will use  this to indicate our terminal '--------- N' ; and this '---------- S' means the screen terminal:
 +
 +
 ``` ```
 ---------------------------------------------- N ---------------------------------------------- N
users/guides/screen.1529310872.txt.gz · Last modified: by admins_ceab