Open MP Resources
OpenMP Documents and Examples
Using OpenMP on Chimera
To compile an OpenMP based program on Chimera, use the option -fopenmp with whatever compiler you have set in your modules.
To submit an OpenMP program to the SLURM queue, first set the environment variable "OMP_NUM_THREADS" as the desired number of processing threads. For example, (tcsh):
setenv OMP_NUM_THREADS 4
(bash):
export OMP_NUM_THREADS=4
Then, when using srun or sbatch, include the option "--cpus-per-task=OMP_NUM_OF_THREADS" to ensure that the SLURM controller allocates the necessary number of processor cores to ensure that each OpenMP thread has its own core.