Compilation on CPU Genoa

Content

Code execution

For examples for code execution, please visit CPU Genoa partition.

Code compilation

Serial gcc
module load gcc
gcc -o hello.bin hello.c
gfortran -o hello.bin hello.f90
g++ -o hello.bin hello.cpp
OpenMP gcc
module load gcc
gcc -fopenmp -o hello.bin hello.c
gfortran -fopenmp -o hello.bin hello.f90
g++ -fopenmp -o hello.bin hello.cpp

Slurm job script

The examples for slurm job scripts, e.g. myjobscipt.slurm, that cover the setup

  • 1 node,
  • 1 OpenMP code running.
Serial
#SBATCH --nodes=1
#SBATCH --partition=cpu-genoa
./hello.bin
OpenMP, full node
#SBATCH --nodes=1
#SBATCH --partition=cpu-genoa
export OMP_PROC_BIND=spread
export OMP_NUM_THREADS=192
./hello.bin
OpenMP, hyperthreading
#SBATCH --nodes=1
#SBATCH --partition=cpu-genoa
export OMP_PROC_BIND=spread
export OMP_NUM_THREADS=384
./hello.bin