using_perun
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| using_perun [2017/06/02 08:52] – created cgeb2001 | using_perun [2021/09/08 13:29] (current) – 134.190.232.139 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | **Accessing and Using Perun** | + | ====== |
| for an account contact | for an account contact | ||
| Line 9: | Line 10: | ||
| (username is perun, password is Perun_) as well as other useful pages about using perun. | (username is perun, password is Perun_) as well as other useful pages about using perun. | ||
| - | When text appears | + | When text appears in bold this indicates that you should type it either on the command line or into a text editor as part of a script. |
| Open a terminal on the Mac. | Open a terminal on the Mac. | ||
| Login to perun using | Login to perun using | ||
| - | ssh -l username perun.biochem.dal.ca | + | |
| + | |||
| + | **ssh -l username perun.biochem.dal.ca** | ||
| + | |||
| You will be asked for your password | You will be asked for your password | ||
| Then, always | Then, always | ||
| - | qrsh | + | |
| + | |||
| + | **qrsh** | ||
| + | |||
| You may or may not be asked for your password. If you don't enter qrsh you will be in a limited part of the system, unable to access all the programs. | You may or may not be asked for your password. If you don't enter qrsh you will be in a limited part of the system, unable to access all the programs. | ||
| You will always start in your home directory. | You will always start in your home directory. | ||
| - | You will notice on the cursor line that the absolute pathname of you location is present and should look something like this | + | You will notice on the cursor line that the absolute pathname of your location is present and should look something like this |
| / | / | ||
| / | / | ||
| Line 26: | Line 35: | ||
| Every person who has an account on perun has a home directory. To see the other | Every person who has an account on perun has a home directory. To see the other | ||
| home directories | home directories | ||
| - | cd .. | + | |
| + | |||
| + | **cd ..** | ||
| + | |||
| then | then | ||
| - | ls | + | |
| + | |||
| + | **ls** | ||
| + | |||
| You should see the names of the other perun account holders. Unless they have modified their home directory permissions you cannot enter or access the contents of their home directories (unless you are a superuser). To go back to your home directory simply type | You should see the names of the other perun account holders. Unless they have modified their home directory permissions you cannot enter or access the contents of their home directories (unless you are a superuser). To go back to your home directory simply type | ||
| - | cd | + | |
| + | |||
| + | **cd** | ||
| + | |||
| This will work regardless of where you are in the computer system. | This will work regardless of where you are in the computer system. | ||
| Line 37: | Line 58: | ||
| Therefore, if you want to work with large files (like the ones generated by NGS machines) and/or produce large result files you should do this in / | Therefore, if you want to work with large files (like the ones generated by NGS machines) and/or produce large result files you should do this in / | ||
| To see the capacity and how much is currently being used on the system | To see the capacity and how much is currently being used on the system | ||
| - | df -h | + | |
| + | |||
| + | **df -h** | ||
| Running Scripts and Processes - Command line vs the Queue | Running Scripts and Processes - Command line vs the Queue | ||
| Perun contains lots of scripts and programs for your use. There are two main ways to run scripts/ | Perun contains lots of scripts and programs for your use. There are two main ways to run scripts/ | ||
| - | ./ | + | |
| + | |||
| + | **./ | ||
| + | |||
| and the script/ | and the script/ | ||
| So, why would you submit your script/ | So, why would you submit your script/ | ||
| - | 1. Perun has 15 nodes with multiple CPUs per node. When you run something on the command line directly it is only using the computing power of the head node which is used by everyone else to do simple tasks. Consequently you are not using the full potential of perun and you are slowing down everyone else's simple tasks like ls or cd. | + | 1. Perun has 17 nodes with multiple CPUs per node. When you run something on the command line directly it is only using the computing power of the head node which is used by everyone else to do simple tasks. Consequently you are not using the full potential of perun and you are slowing down everyone else's simple tasks like ls or cd. |
| 2. You may not be getting all the appropriate environmental parameters necessary to run the script/ | 2. You may not be getting all the appropriate environmental parameters necessary to run the script/ | ||
| 3. The script/ | 3. The script/ | ||
| Line 56: | Line 84: | ||
| Either open a text editor on perun (pico, vi, emacs) or create the script on your local computer (and then copy and paste it into a pico editor on perun or scp it to perun). | Either open a text editor on perun (pico, vi, emacs) or create the script on your local computer (and then copy and paste it into a pico editor on perun or scp it to perun). | ||
| Every submission script should start with the line | Every submission script should start with the line | ||
| - | #!/bin/sh | + | |
| - | at the very top. This tells the UNIX system what type of shell to use (this one is the bourne | + | |
| + | **#!/bin/bash** | ||
| + | |||
| + | |||
| + | at the very top. This tells the UNIX system what type of shell to use (this one is the Bourne-Again | ||
| The next two lines should be | The next two lines should be | ||
| - | #$ -S /bin/sh | + | |
| + | |||
| + | **#$ -S /bin/bash** | ||
| + | |||
| and | and | ||
| - | . / | + | |
| + | |||
| + | **. / | ||
| + | |||
| to ensure that the correct and current environmental variables are inherited | to ensure that the correct and current environmental variables are inherited | ||
| Then you can have options beneath these first lines. Some of the more common ones are | Then you can have options beneath these first lines. Some of the more common ones are | ||
| - | #$ -cwd (this means run the process in the current working directory ie where you submitted the script) | + | |
| - | #$ -o logfilename_of_your_choice (this creates a log file that contains any output that your script/ | + | |
| - | #$ -pe threaded number (how many CPUs you want to assign to the task - the default is 1 which is typically adequate for most jobs - there are 204 slots) | + | ** #$ -cwd** |
| + | |||
| + | (this means run the process in the current working directory ie where you submitted the script) | ||
| + | |||
| + | |||
| + | **#$ -o logfilename_of_your_choice** | ||
| + | |||
| + | (this creates a log file that contains any output that your script/ | ||
| + | |||
| + | |||
| + | **#$ -pe threaded number** | ||
| + | |||
| + | (how many CPUs you want to assign to the task - the default is 1 which is typically adequate for most jobs) | ||
| After the options you would then have the name of the program you are calling along with any program parameters and/or options. When you run the program from the command line you often just need the name of the program (and any options or parameters). However, when you call a program from a submission script it is generally a good idea to use the full path of the program like so | After the options you would then have the name of the program you are calling along with any program parameters and/or options. When you run the program from the command line you often just need the name of the program (and any options or parameters). However, when you call a program from a submission script it is generally a good idea to use the full path of the program like so | ||
| - | / | + | **/ |
| (See below for how to find the pathname of programs). | (See below for how to find the pathname of programs). | ||
| Submitting the script | Submitting the script | ||
| Once the submission script is finished save it. To submit the script | Once the submission script is finished save it. To submit the script | ||
| - | qsub name_of_script | + | |
| + | |||
| + | **qsub name_of_script** | ||
| Line 83: | Line 137: | ||
| There are special queues for large computationally heavy job like large assemblies or large trees. To use these special queues you use a modified qsub command | There are special queues for large computationally heavy job like large assemblies or large trees. To use these special queues you use a modified qsub command | ||
| - | qsub -q 144G-batch name_of_script (nodes with 144 GB RAM, 24 slots per node (1)) | + | **qsub -q 144G-batch name_of_script** (nodes with 144 GB RAM, 24 slots per node (1)) |
| - | qsub -q 16G-batch name_of_script (nodes with 16 GB RAM, 8 slots per node (12)) | + | **qsub -q 16G-batch name_of_script** (nodes with 16 GB RAM, 8 slots per node (12)) |
| - | qsub -q 256G0batch | + | **qsub -q 256G-batch |
| Line 93: | Line 147: | ||
| Monitoring your run | Monitoring your run | ||
| To see if you job is running | To see if you job is running | ||
| - | qstat | + | |
| + | |||
| + | **qstat** | ||
| + | |||
| This will list all the jobs currently being run on perun as well as who is logged in. To just see your jobs | This will list all the jobs currently being run on perun as well as who is logged in. To just see your jobs | ||
| - | qstat -u username | + | |
| + | you would normally do qstat -u username | ||
| + | |||
| + | **qstat | grep username** | ||
| + | |||
| + | or | ||
| + | |||
| + | **watch qstat** (control c to exit). | ||
| + | |||
| + | |||
| + | |||
| The qstat columns give you information about the processes that are being run. The first column is the job id. This can be used to delete/stop a job | The qstat columns give you information about the processes that are being run. The first column is the job id. This can be used to delete/stop a job | ||
| - | qdel job_id | + | |
| + | |||
| + | **qdel job_id** | ||
| + | |||
| The third column is the name of the process or script being run. If it says QRLOGIN this is simply the terminal (and the qrsh command you issued at the beginning of the session). | The third column is the name of the process or script being run. If it says QRLOGIN this is simply the terminal (and the qrsh command you issued at the beginning of the session). | ||
| The fourth column is the username of who is running the script/ | The fourth column is the username of who is running the script/ | ||
| The fifth column indicates whether the process is running or not. An r means it is actively running while qw means it is waiting in the queue for a slot to be free. If you see Eqw (this should not happen very often) it means your process is waiting in an error state and probably should be deleted. To see what the error is | The fifth column indicates whether the process is running or not. An r means it is actively running while qw means it is waiting in the queue for a slot to be free. If you see Eqw (this should not happen very often) it means your process is waiting in an error state and probably should be deleted. To see what the error is | ||
| - | qstat -j job_id | + | |
| + | |||
| + | **qstat -j job_id | ||
| If you do ls in the directory where you submitted the script myscript.x to the queue you will see that there is a file called something like this - myscript.x.e798764. | If you do ls in the directory where you submitted the script myscript.x to the queue you will see that there is a file called something like this - myscript.x.e798764. | ||
| - | You can have multiple perun sessions/ | + | You can have multiple perun sessions/ |
| - | exit | + | |
| + | **qalter -q [node you want, eg 256G-batch] [job ID number]** | ||
| + | |||
| + | The command above can change the job's hard queue after submission (without killing it). | ||
| + | |||
| + | |||
| + | **exit** | ||
| + | |||
| The first exit will terminate the qrsh environment you created so you need to do another | The first exit will terminate the qrsh environment you created so you need to do another | ||
| exit | exit | ||
| Line 113: | Line 197: | ||
| Finding the path of an installed program | Finding the path of an installed program | ||
| - | Most programs are installed in common, standard places on UNIX systems. On perun many of the programs/ | + | Most programs are installed in common, standard places on UNIX systems. On perun many of the programs/ |
| - | cd / | + | |
| - | ls | + | |
| - | cd bin | + | **cd /opt/perun/** |
| - | ls | + | |
| + | |||
| + | **ls** | ||
| + | |||
| + | |||
| + | //cd bin// | ||
| + | |||
| + | |||
| + | **ls** | ||
| + | |||
| to see the names of the programs | to see the names of the programs | ||
| If you know the precise name of the program you can find its path by | If you know the precise name of the program you can find its path by | ||
| - | which velvetg | + | |
| + | |||
| + | **which velvetg** | ||
| + | |||
| or | or | ||
| - | whereis velvetg | + | |
| + | |||
| + | **whereis velvetg** | ||
| Line 146: | Line 246: | ||
| eg blastn -help | eg blastn -help | ||
| 4. If all else fails you can try and read the program code (if it is in perl or python as opposed to C or C++) and try and figure out what the authors want. | 4. If all else fails you can try and read the program code (if it is in perl or python as opposed to C or C++) and try and figure out what the authors want. | ||
| - | |||
using_perun.1496404346.txt.gz · Last modified: by cgeb2001
