User Tools

Site Tools


guides:slurm:using-r

Differences

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

Link to this comparison view

Next revision Both sides next revision
guides:slurm:using-r [23.09.2019 11:02]
Teemu Kuulasmaa created
guides:slurm:using-r [23.09.2019 11:06]
Teemu Kuulasmaa
Line 35: Line 35:
 Rscript hello.R # Execute the script Rscript hello.R # Execute the script
  
 +sbatch
 ``` ```
- 
 User can submit the job to the compute queue with the **[sbatch](https://slurm.schedmd.com/sbatch.html)** command. Note that the batch file (and R script and data) must be located at the /home/ disk. User can submit the job to the compute queue with the **[sbatch](https://slurm.schedmd.com/sbatch.html)** command. Note that the batch file (and R script and data) must be located at the /home/ disk.
  
 ``` ```
 sbatch submit.sbatch sbatch submit.sbatch
-``` 
- 
-User can monitor the progress of the job with the **[squeue](https://slurm.schedmd.com/squeue.html)** command. JOBID is provided by the sbatch commmand when the job is submitted. 
- 
-``` 
-squeue -j JOBID 
-``` 
- 
-Also while the job is running user can login to executing compute node with the ssh command. When job is over the ssh session is terminated. 
- 
-``` 
-ssh sampo1 
-``` 
- 
-** Interactive session ** 
- 
-User can get an interactive sessions for whatever purpose. For this to be effective free node is more or less required. Following command will open bash session to any free node on the serial parallel for the next 5 minutes. 
- 
-``` 
-srun -p serial --pty -t 0-00:05 /bin/bash 
-``` 
- 
-** Slurm job efficiency report (seff) and Accounting ** 
- 
-SLURM can provide the user with various job statistics. Like memory usage and CPU time. 
-for example with seff (Slurm job effiency report) it is possible to monitor on how efficiency the job was. 
- 
-``` 
-seff JOBID 
-``` 
- 
-It is particularly useful to add following line to the end of the sbatch script: 
- 
-``` 
-seff $SLURM_JOBID 
-``` 
- 
-or if you wish to have more detailed information 
- 
-``` 
-# show all own jobs contained in the accounting database 
-sacct 
-# show specific job 
-sacct -j JOBID 
-# specify fields 
-sacct -j JOBID -o JobName,MaxRSS,MaxVMSize,CPUTime,ConsumedEnergy 
-# show all fields 
-sacct -j JOBID -o ALL 
 ``` ```
guides/slurm/using-r.txt · Last modified: 18.11.2021 11:19 by Administrator