spacer
ASCR Home Button ASCR Organization Button ASCR News Button Contact ASCR Button
DOE Homepage Science Homepage
ASCRlogo ASCR Discovery home page 


Annotations accelerate
supercomputer programs

(page 2 of 4)



This chart shows how Orio uses annotations to improve computer code. (Click image to enlarge and for more information.)

Norris continued to explore these ideas with Gropp and enlisted Albert Hartono, a graduate student in computer science and engineering at Ohio State University (OSU). With this team, Norris says, "We designed a more extensible system that can process different kinds of annotations and generate many versions of the code after applying different types of optimizations."

That's the basis of Orio.

Inside Orio

Written in Python (a program language capable of running on many kinds of systems), Orio lets a programmer insert annotations in C or Fortran code. These annotations &ndash simply written as comments that a computer running a C program, for example, typically ignores &ndash show Orio where to go to work. A programmer also can use the annotations to tell Orio a little bit about what the section of code does. Hartono led the programming and Norris led the design work to turn the idea into a tool.

Hartono and Norris developed Orio to provide two key capabilities: source-to-source transformations and automatic performance tuning. For source-to-source transformations, Orio starts with the C code plus the annotations, or performance-tuning tips, the programmer inserts. Orio pulls out the annotated sections and sends them to transformation modules, which develop ways to speed up the sections.

In particular, Orio includes transformation modules for compiler optimizations, including simple loop unrolling, memory-alignment optimization, loop unroll/jamming, loop tiling, loop permutation, scalar replacement, register tiling, loop-bound replacement, array-copy optimization, multicore parallelization and optimizations specific to a particular computer architecture. Then a code generator adds the optimized sections to the original code.

"These are actually typical compiler optimizations, but compilers do not necessarily do them because they cannot determine that it is safe to do so," Norris explains.

Since Orio generates various ways to optimize each annotated section, it also can provide automatic performance tuning. Orio tries the different versions of optimized code to see which runs fastest. The best-performing code gets embedded in the original program.

When it comes to finding the fastest code for any annotated section, "you can't try everything," Norris says. "The optimization space is gigantic," so "we have different strategies to narrow the options you need to search." Specifically, Orio limits how it searches for the best code and how hard it tries to find it.

To further expand Orio's capabilities, Norris and Hartono made it capable of incorporating other tools. With parallel hardware, for example, Orio can use Pluto &ndash a tool developed at OSU &ndash to automatically make sections of code run in parallel and to keep data as nearby as possible, all making the program run faster. Orio also can make loops run faster by using PrimeTile, which speeds up loops by, in part, keeping needed data accessible.

« Previous       1   |   2   |   3   |   4   |   Print       Next »

Web Policies Button No Fear Act Button Site Map Button Privacy Button Phone Book Button Employment Button
spacer