Springe direkt zu Inhalt

SMP-paralleles Programm

Ein Programm, das symmetric multiprocessing oder SMP unterstützt, kann auf mehreren Rechnenkernen laufen, die sich alle auf einem Knoten befinden.

#!/bin/bash

#SBATCH --job-name=my_smp_job                   # replace name
#SBATCH --mail-user=nobody@zedat.fu-berlin.de   # replace email address
#SBATCH --mail-type=end
#SBATCH --ntasks=1                             
#SBATCH --cpus-per-task=16                      # replace with value for your job       
#SBATCH --mem-per-cpu=4096                      # replace with value for your job
#SBATCH --time=08:00:00                         # replace with value for your job
#SBATCH --qos=standard                          # replace with value for your job

module add ExampleProg/1.2.3-foss-2018b         # replace with value for your job

# For OpenMP programs, the following should also be set 
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}

cd /scratch/${USER}                             # replace with your directory
srun -n ${SLURM_CPUS_PER_TASK} exampleprog_smp  # replace with your program

Ein Program kann nur SMP-Parallelität unterstützen, wenn der Code dementsprechend geschrieben und kompilert wurde. Wenn Sie sich nicht sicher sind, ob das für das Programm, das Sie verwenden wollen, zutrifft, bitte kontaktieren Sie uns.