Skip to main content »

Trinity College Dublin

OpenMP

OpenMP is an API that supports multi-platform shared memory multiprocessing programming.

It can be useful for some codes to gain advantage of today's multi-core systems (a typical node on one of the main TCHPC clusters has 8 or 12 processor cores).

Compiling OpenMP Code

The main compilers (Intel, GCC) have OpenMP support. However, it must be enabled through compiler directives. Typically you would add the relevant directive to your CFLAGS variable in your Makefile.

Intel Compiler Directive

icc -openmp foo.c

GCC Compiler Directive

gcc -fopenmp foo.c

Last updated 28 Mar 2012Contact TCHPC: info | support.