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

  1. When you want to execute computation, you need to prepare a .slurm file

    1. How to prepare .slurm file (e.g., job.slurm) (1, 2, 3

      1. Go to personal directory: type cd /truba_scratch/username

      2. Start a .slurm file with touch jobName.slurm

      3. Delete a .slurm file with rm jobName.slurm

      4. Edit .slurm with command vi 

        1. To enter insert mode: Press i

        2. To save changes: Press Esc, then type :w and press Enter

        3. To exit without save: Press Esc, then type :q and press Enter

        4. To exit with save: Press Esc, then type :wq and press Enter

      5. 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

  1. How to open .slurm file: type vi  jobName.slurm 

  2. How to see .slurm file: type cat  jobName.slurm 

  1. How to send .slurm file: type sbatch jobName.slurm 

    1. Different queues: levrek1, barbun1, sardalya1 (!Whichever queue you send the job to, it will only run there; you cannot access other queues)

  2. Extra:

    1. To find example .slurm scripts in TRUBA: type cd /truba/sw/scripts/

    2. To see all the partitions (e.g., debug, barbun etc.): type lssrv

    3. To see the running job(s): squeue

    4. To see previous job(s): sacct

    5. To see the .out file: cat

Comments

Popular posts from this blog

07.09.2017 - How to create or modify EnergyPlus Weather Data (EPW)

An Algorithm for Efficient Urban Building Energy Modeling and Simulation