Hyppää sisältöön

Docs CSC now features an automatic Finnish translation. Click here for more information.

Warning!

Puhti and Mahti will be decommissioned after Roihu becomes available. Users should clean up unnecessary files and move any required data by the end of August 2026. See the Roihu data preparation instructions for details.

Puhti scratch is very full: keep only active data there and move or delete everything else. No new Puhti scratch quota will be granted.

Esimerkkieräajokomennostot Puhdissa

Esimerkkieräajokomentosarjoja erityyppisten sovellusten/ohjelmien ajamiseen Puhdissa.

Muokkaa paikkamerkkejä tarpeen mukaan

Kun käytät näitä komentojonoja, muista muuttaa resurssit (ajoaika, tehtävät, jne.) tarpeitasi vastaaviksi ja korvata myprog <options> sen ohjelman suoritettavalla tiedostolla (ja valinnoilla), jota aiot ajaa. Muista myös korvata <project> laskutusprojektisi nimellä (katso MyCSC tai csc-projects-komento).

Sarjatyö

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --time=02:00:00
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=4000

srun myprog <options>

OpenMP

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --time=02:00:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=6
#SBATCH --mem-per-cpu=4000

# set the number of threads based on --cpus-per-task
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK

srun myprog <options>

MPI

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --time=02:00:00
#SBATCH --ntasks=40
#SBATCH --mem-per-cpu=4000

srun myprog <options>

Suuri MPI-ajo

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=large
#SBATCH --time=02:00:00
#SBATCH --nodes=8
#SBATCH --ntasks-per-node=40
#SBATCH --mem-per-cpu=4000

srun myprog <options>

MPI + OpenMP

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=large
#SBATCH --time=02:00:00
#SBATCH --ntasks=8
#SBATCH --cpus-per-task=10
#SBATCH --mem-per-cpu=4000

# set the number of threads based on --cpus-per-task
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK

srun myprog <options>

Yksi GPU

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=gpu
#SBATCH --time=02:00:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=10
#SBATCH --mem-per-cpu=8000
#SBATCH --gres=gpu:v100:1

srun myprog <options>

Useita GPU:ita

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=gpu
#SBATCH --time=02:00:00
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=10
#SBATCH --mem-per-cpu=8000
#SBATCH --gres=gpu:v100:4

srun myprog <options>

Interaktiivinen ajo X11-grafiikalla

Anna tämä suoraan komentorivillä eräajokomentosarjan ja sbatch-komennon käytön sijaan. Huomaa, että koska voit joutua jonottamaan, on kätevää pyytää sähköposti-ilmoitus, kun resurssit on myönnetty (--mail-type=BEGIN).

srun --ntasks=1 --time=00:10:00 --mem=1G --x11=first --pty \
     --account=<project> --partition=small --mail-type=BEGIN \
     myprog

Katso myös Interaktiivinen käyttö.

Paikallinen tallennustila

#!/bin/bash
#SBATCH --job-name=example
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --time=02:00:00
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=4000
#SBATCH --gres=nvme:10

# access the local storage using $LOCAL_SCRATCH environment variable, e.g.
cd $LOCAL_SCRATCH

srun myprog <options>

# move important data to the directory from which the job was submitted, e.g.
mv mydata $SLURM_SUBMIT_DIR

Muista palauttaa datasi

Paikallinen tallennustila tyhjennetään jokaisen eräajon jälkeen. Muista siirtää säilytettävä data paikalliselta levyltä takaisin jaetulle levyalueelle (esim. /scratch).

Suomenkielinen tekoälykäännös

Sisällössä voi esiintyä virheellistä tietoa tekoälykäännöksestä johtuen.

Klikkaa tästä antaaksesi palautetta