13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MULTICORE AND HYPER-THREADING TECHNOLOGY8.2.4 Tools for Creating Multithreaded ApplicationsProgramming directly to a multithreading application programming interface (API) isnot the only method for creating multithreaded applications. New tools (such as theIntel compiler) have become available with capabilities that make the challenge ofcreating multithreaded application easier.Features available in the latest Intel compilers are:• Generating multithreaded code using OpenMP* directives 4• Generating multithreaded code automatically from unmodified high-level code 58.2.4.1 Programming with OpenMP DirectivesOpenMP provides a st<strong>and</strong>ardized, non-proprietary, portable set of Fortran <strong>and</strong> C++compiler directives supporting shared memory parallelism in applications. OpenMPsupports directive-based processing. This uses special preprocessors or modifiedcompilers to interpret parallelism expressed in Fortran comments or C/C++pragmas. Benefits of directive-based processing include:• The original source can be compiled unmodified.• It is possible to make incremental code changes. This preserves algorithms in theoriginal code <strong>and</strong> enables rapid debugging.• Incremental code changes help programmers maintain serial consistency. Whenthe code is run on one processor, it gives the same result as the unmodifiedsource code.• Offering directives to fine tune thread scheduling imbalance.• Intel’s implementation of OpenMP runtime can add minimal threading overheadrelative to h<strong>and</strong>-coded multithreading.8.2.4.2 Automatic Parallelization of CodeWhile OpenMP directives allow programmers to quickly transform serial applicationsinto parallel applications, programmers must identify specific portions of the applicationcode that contain parallelism <strong>and</strong> add compiler directives. Intel Compiler 6.0supports a new (-QPARALLEL) option, which can identify loop structures that containparallelism. During program compilation, the compiler automatically attempts todecompose the parallelism into threads for parallel processing. No other interventionor programmer is needed.4. Intel Compiler 5.0 <strong>and</strong> later supports OpenMP directives. Visit http://developer.intel.com/software/productsfor details.5. Intel Compiler 6.0 supports auto-parallelization.8-10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!