How to use TRUBA for deep learning with PyTorch - 2
Today, we’ll build on the basics by diving deeper into TRUBA's functionalities. I will guide you through more advanced commands and configurations in your home directory. Following our baby steps metaphor, we’ll continue nurturing your project from its early stages to more complex operations. This tutorial is designed for macOS systems with Apple Silicon computers.
Breathe
When you want to execute computation, you need to prepare a .slurm file
Go to personal directory: type cd /truba_scratch/username
Start a .slurm file with touch jobName.slurm
Delete a .slurm file with rm jobName.slurm
Edit .slurm with command vi
To enter insert mode: Press i
To save changes: Press Esc, then type :w and press Enter
To exit without save: Press Esc, then type :q and press Enter
To exit with save: Press Esc, then type :wq and press Enter
Example .slurm file
#!/bin/bash
#SBATCH -J "trial"
#SBATCH -A username
#SBATCH -p debug
#SBATCH -N 1
#SBATCH -n 2
#SBATCH -c 1
#SBATCH --threads 1
echo -n "server name:"
hostname
echo -n "job start time:"
date
sleep 30
echo -n "job end time:"
date
How to open .slurm file: type vi jobName.slurm
How to see .slurm file: type cat jobName.slurm
How to send .slurm file: type sbatch jobName.slurm
Different queues: levrek1, barbun1, sardalya1 (!Whichever queue you send the job to, it will only run there; you cannot access other queues)
Extra:
To find example .slurm scripts in TRUBA: type cd /truba/sw/scripts/
To see all the partitions (e.g., debug, barbun etc.): type lssrv
To see the running job(s): squeue
To see previous job(s): sacct
To see the .out file: cat
Comments
Post a Comment