guides
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
guides [2018/06/13 11:24] – created xavi | guides [2018/06/13 11:27] (current) – xavi | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ##Screen | + | ### Guides |
- | + | ||
- | ### | + | |
- | + | ||
- | Screen let us, among others things, enter in a linux/ | + | |
- | Sometimes if network is unstable the cluster can reject our connection and lost all the work we were doing, so Screen is useful in this cases (this does not happen if we have sent a job by qsub). | + | |
- | + | ||
- | ###Short tutorial | + | |
- | + | ||
- | 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: | + | |
- | ``` | + | |
- | ssh < | + | |
- | ``` | + | |
- | 2. Start a screen session with an id label | + | |
- | ``` | + | |
- | ~$ screen -S pruebaScreen | + | |
- | ``` | + | |
- | Here we don't notice any change, it's like use the command ' | + | |
- | + | ||
- | 3. Now let's do a qlogin with the resources that we'll need: | + | |
- | ``` | + | |
- | @cluster-ceab: | + | |
- | local configuration cluster-ceab not defined - using global configuration | + | |
- | Your job 45946 (" | + | |
- | waiting for interactive job to be scheduled ... | + | |
- | Your interactive job 45946 has been successfully scheduled. | + | |
- | Establishing builtin session to host node108 ... | + | |
- | groups: cannot find name for group ID 20500 | + | |
- | + | ||
- | @node108: | + | |
- | ``` | + | |
- | + | ||
- | 4. Execute the program, in this example, Mr Bayes | + | |
- | ``` | + | |
- | @node108:~$ mpirun -np 4 / | + | |
- | + | ||
- | MrBayes v3.2.4 x64 | + | |
- | + | ||
- | (Bayesian Analysis of Phylogeny) | + | |
- | + | ||
- | | + | |
- | (4 processors available) | + | |
- | + | ||
- | Distributed under the GNU General Public License | + | |
- | + | ||
- | + | ||
- | Type " | + | |
- | on the commands that are available. | + | |
- | + | ||
- | Type " | + | |
- | | + | |
- | + | ||
- | MrBayes > | + | |
- | ``` | + | |
- | This step is important. Now we will exit from our ' | + | |
- | + | ||
- | ``` | + | |
- | [detached from 14868.pruebaScreen] | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | ``` | + | |
- | + | ||
- | Now we can exit even from the cluster, our program will keep running | + | |
- | + | ||
- | 6. After log in again to cluster-ceab, | + | |
- | ``` | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | There is a screen on: | + | |
- | 14868.pruebaScreen (13/ | + | |
- | 1 Socket in / | + | |
- | ``` | + | |
- | + | ||
- | and then: | + | |
- | + | ||
- | ``` | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | ``` | + | |
- | + | ||
- | Now consider this. If we see (Attached) when we list the screen sessions we will not be able to reattach to that session directly. | + | |
- | + | ||
- | There are two ways to reattach an attached session: | + | |
- | + | ||
- | ``` | + | |
- | screen -d < | + | |
- | screen -r < | + | |
- | ``` | + | |
- | or | + | |
- | ``` | + | |
- | screen -d -r < | + | |
- | ``` | + | |
- | + | ||
- | 7. 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 | + | |
- | + | ||
- | ``` | + | |
- | miguel.omullony@node108: | + | |
- | logout | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | + | ||
- | #again it's like use the command clear | + | |
- | ``` | + | |
- | If I press up key: | + | |
- | ``` | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | [screen is terminating] | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | ``` | + | |
- | + | ||
- | This is an example. I will use this to indicate our terminal ' | + | |
- | ``` | + | |
- | ---------------------------------------------- N | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | ---------------------------------------------- S | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | [18033.hola detached.] | + | |
- | ---------------------------------------------- N | + | |
- | [remote detached from 18033.hola] | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | There is a screen on: | + | |
- | 18033.hola (13/ | + | |
- | 1 Socket in / | + | |
- | + | ||
- | miguel.omullony@cluster-ceab: | + | |
- | --------------------------------------------------------------- S | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | There is a screen on: | + | |
- | 18033.hola | + | |
- | 1 Socket in / | + | |
- | + | ||
- | miguel.omullony@cluster-ceab: | + | |
- | local configuration cluster-ceab not defined - using global configuration | + | |
- | Your job 46039 (" | + | |
- | waiting for interactive job to be scheduled ... | + | |
- | Your interactive job 46039 has been successfully scheduled. | + | |
- | Establishing builtin session to host node101 ... | + | |
- | groups: cannot find name for group ID 20232 | + | |
- | miguel.omullony@node101: | + | |
- | There is no screen to be detached. | + | |
- | miguel.omullony@node101: | + | |
- | No Sockets found in / | + | |
- | + | ||
- | miguel.omullony@node101: | + | |
- | logout | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | There is a screen on: | + | |
- | 18033.hola | + | |
- | 1 Socket in / | + | |
- | + | ||
- | miguel.omullony@cluster-ceab: | + | |
- | Attaching from inside of screen? | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | [18033.hola detached.] | + | |
- | --------------------------------------------------------- N | + | |
- | [remote detached from 18033.hola] | + | |
- | miguel.omullony@cluster-ceab: | + | |
- | There is a screen on: | + | |
- | 18033.hola (13/ | + | |
- | 1 Socket in / | + | |
- | + | ||
- | miguel.omullony@cluster-ceab: | + | |
- | ``` | + | |
+ | [[guides: |
guides.txt · Last modified: 2018/06/13 11:27 by xavi