Creating Tools to Make OpenMP* the Standard for Threading Application Software
PrintEmail to a friendSupportNewsletterRSSDigg thisdel.icio.us

Intel: Creating Tools to Make OpenMP* the Standard for Threading Application Software
OpenMP* provides programmers with a standardized, non-proprietary, portable set of Fortran and C++ compiler directives supporting shared memory parallelism in applications. This makes it easy to convert serial applications into parallel applications, enabling big performance gains from parallel execution on symmetric multiprocessor systems.

This paper explains some of the features of OpenMP and describes software tools that Intel has developed to make it practical for programmers to use OpenMP for threading applications. These tools include the latest Intel® C++ and Fortran compilers and OpenMP tools that Intelproduces to help programmers develop, debug and measure performance gains for code with OpenMP extensions.

What is OpenMP*?

OpenMP is an Application Programming Interface (API) that Intel helped develop to enable programs to run on shared memory computers. It consists of compiler directives, runtime libraries and environment variables that extend the Fortran, C and C++ languages. OpenMP is a standard that makes it practical to write multithreaded programs that scale-up to run on computers with many processors and are portable to most shared memory computers.

The OpenMP API provides programmers with a simple way to develop parallel applications for shared memory architectures, including Windows* and UNIX* computers. It offers several benefits compared to other parallelization approaches, including:

  • OpenMP is a single source code solution that supports multiple platforms and operating systems.
  • OpenMP facilitates incremental parallelization of sequential codes.
  • OpenMP is easier to use than message passing or implementing threads through the low level API supported by individual computing platforms.
OpenMP* Features

Directive-Based Processing

OpenMP supports directive-based processing, which uses special preprocessors or modified compilers to interpret the parallelism expressed in Fortran comments or C/C+ pragmas.

Directive-Based Processing Benefits

  • The original source is compiled unmodified. Although directives are inserted into the code, when no action is taken on them (i.e., the application is not running in shared memory parallel mode) they do not change the program. For shared memory parallel computers, this allows for simple comparisons between serial and parallel runs.
  • Because only directives are inserted into the code, it is possible to make incremental code changes. This preserves the algorithms of the original code and enables rapid debugging.
  • The ability to make incremental code changes helps programmers maintain serial consistency. When the code is run on one processor, it gives the same result as the unmodified source code.
Portability

OpenMP eliminates the need to rewrite code for parallel processing when an application is ported to computer systems from multiple vendors. This frees software vendors from having to maintain separate front ends to match increasingly complex proprietary language extensions, allowing them to concentrate on increasing application performance through back-end, processor-specific optimizations.

Portability Benefits

  • Developers of OpenMP-based applications benefit from low porting and maintenance costs.
  • Software tool vendors also benefit from OpenMP portability. In the past, tool vendors had been reluctant to invest heavily in developing their applications to take advantage of multi-processor systems; multiple, proprietary language extensions not only increased development and maintenance costs, they also fragmented the market and reduced profitability. Because of these costs, threading was applied to only the most obvious application areas where the payback justified the investment in initial development and maintenance.
  • By developing a set of tools based on a truly portable, directive-based standard - OpenMP - application developers can expand the number of applications that can benefit from threading. Coupled with this trend of reduced cost of development, the cost of computers with shared memory parallel capabilities has plummeted. For example, with the enhanced productivity made available from threading with OpenMP, an incremental processor in an Intel-based multi-processor system can be cost-justified in as little as 20 working days to one month.
Other OpenMP* Features

  • Scalability. OpenMP supports scalability in SMP applications. Application performance gains made possible by explicit, platform-specific multithreading are preserved in OpenMP. Application developers do not need to trade performance for portability.
  • Compatibility with Other Optimizations. With OpenMP, programmers can benefit simultaneously from multithreading and other compiler optimizations. For example, the multithreading benefits described above are complementary to benefits resulting from code vectorization in the Intel C++ and Fortran compilers.
  • Vendor Support. The vendors behind OpenMP collectively deliver a very large share of the SMP systems in use today.
Intel® Compiler Support for OpenMP

The Intel® Fortran Compiler and the Intel® C++ Compiler support OpenMP. These compilers provide developers with the following OpenMP-related benefits:
  • Ease of Use. Intel compilers give programmers a single source for all their OpenMP requirements. No other tools are necessary to begin compiling code for OpenMP.
    • Intel compilers interpret OpenMP directives directly. This means that no preprocessor is necessary before compiling code for OpenMP.
    • Intel compilers ship with runtime libraries to implement OpenMP directives.
Intel OpenMP Tools

Intel® Threading Tools speed and simplify the development and maintenance of applications threaded with OpenMP and Win32* threads. Intel Threading Tools include Intel® Thread Checker and Thread Profiler:

  • Intel® Thread Checker

    Intel® Thread Checker locates hard-to-find threading bugs including data races.
  • Thread Profiler

    Thread Profiler identifies threading performance bottlenecks including thread overhead and synchronization impact.
For more information on Threading Tools, visit http://www.intel.com/software/products/threading/index.htm.

Conclusions

OpenMP allows programmers to write portable and scalable applications using a shared memory programming model. Today, it is the standard for code portability that software developers, scientists and engineers have sought since the introduction of shared memory computers in the 1980's.

The Intel Fortran Compiler and the Intel C++ Compiler support OpenMP directives. In addition, Intel provides a set of development tools that simplify the development and maintenance of OpenMP based applications.


Intel® Software
Network
Intel® Software Network
  • It’s free and easy to become a member, so join today!
     
    Evaluate/Purchase
     
     
    Product Information
     
     
    Technical Information