• OpenMP

  • OpenMP defines a platform-independent programming interface for "shared memory" parallelization.

  • Contact Person:
    • Services provided by SCC:

    Translated with DeepL.com

    OpenMP

    OpenMP defines a platform-independent programming interface for "shared memory" parallelization. In the OpenMP specification compiler directives, environment variables and few functions are defined, so that a program parallelized with OpenMP can be compiled in general without changes also in a serial version by a compiler, which does not support parallelization. OpenMP is defined for the programming languages Fortran and C / C++.

    OpenMP stands on all systems running the GNU compiler suite from version 4.2, the Intel or the PGI compiler suite. In particular, OpenMP is available on all parallel computers of the SCC. On the systems, the maximum number of parallel threads corresponds to the number of cores within a node.


    OpenMP when using the Intel compiler

    Source code located in the filemy_openmp_prog.f90or my_openmp_prog.cis compiled with the following commands:

    ifort -c -O3 -qopenmp -o openmp_exe my_openmp_prog.f90 ! Compile Fortran90 code
    icc -c -O3 -qopenmp -o openmp_exe my_openmp_prog.c /* Compiling C code */

    The Intel compiler is available on all systems of the SCC and is the default loaded compiler on most systems.


    OpenMP when using the GNU compiler suite

    Source code located in the filemy_openmp_prog.f90or my_openmp_prog.cis compiled with the following commands:

    gfortran -c -O3 -fopenmp -o openmp_exe my_openmp_prog.f90 ! Compile Fortran90 code
    gcc -c -O3 -fopenmp -o openmp_exe my_openmp_prog.c /* Compiling C code */

    From version 4.2 of the GNU compiler suite OpenMP is supported, so that on all HPC systems at SCC OpenMP can be used with the GNU compilers.


    OpenMP when using the PGI compiler

    Source code located in the filemy_openmp_prog.f90or my_openmp_prog.cis compiled with the following commands:

    pgf95 -c -O3 -mp -o openmp_exe my_openmp_prog.f90 ! Compile Fortran90 code
    pgcc -c -O3 -mp -o openmp_exe my_openmp_prog.c /* Compiling C code */

    The PGI compiler is available on some HPC systems at SCC. It is activated by themodule add pgi command.


    Linking OpenMP jobs

    When linking programs that use both "multithreading" using OpenMP and "message passing" using MPI, the scripts mpif90, mpicc or mpiCC must be used for Fortran, C or C++ programs!


    Starting OpenMP Jobs

    How to start OpenMP jobs with and without MPI usage as batch jobs on the HPC systems can be found in the bwUniCluster wiki or ForHLR wiki.










    Detect languageAfrikaansAlbanianAmharicArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CorsicanCroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchFrisianGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHawaiianHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanKurdishKyrgyzLaoLatinLatvianLithuanianLuxembourgishMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPashtoPersianPolishPortuguesePunjabiRomanianRussianSamoanScots GaelicSerbianSesothoShonaSindhiSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshXhosaYiddishYorubaZulu

    AfrikaansAlbanianAmharicArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CorsicanCroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchFrisianGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHawaiianHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanKurdishKyrgyzLaoLatinLatvianLithuanianLuxembourgishMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPashtoPersianPolishPortuguesePunjabiRomanianRussianSamoanScots GaelicSerbianSesothoShonaSindhiSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshXhosaYiddishYorubaZulu









    Text-to-speech function is limited to 200 characters