The Open Multi-Processing library (OpenMP) is an open-source library that provides simple extensions to allow multi-threaded programming in C/C++ and Fortran. OpenMP is structured largely around the use of compiler directives to enable, disable, and modify parallel subsections of otherwise serial code. The main difference between OpenMP and MPI is that an OpenMP program runs as a single process on the operating system, and so all the threads within the program have access to a single memory space. This chapter introduces OpenMP, first showing how to include the library and build executables that use it, then continuing with how to use the compiler directives to control and refine the parallel regions, and finishing up with variable scoping and reduction operations.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

OpenMP I

  • Raymond J. Spiteri,
  • Kyle Klenk

摘要

The Open Multi-Processing library (OpenMP) is an open-source library that provides simple extensions to allow multi-threaded programming in C/C++ and Fortran. OpenMP is structured largely around the use of compiler directives to enable, disable, and modify parallel subsections of otherwise serial code. The main difference between OpenMP and MPI is that an OpenMP program runs as a single process on the operating system, and so all the threads within the program have access to a single memory space. This chapter introduces OpenMP, first showing how to include the library and build executables that use it, then continuing with how to use the compiler directives to control and refine the parallel regions, and finishing up with variable scoping and reduction operations.