Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 3.39 KB

PERFORMANCE.md

File metadata and controls

80 lines (62 loc) · 3.39 KB

======================== Chapel Performance Notes

Though Chapel has been designed to ultimately yield high performance, our focus to date has predominantly been on implementing its features correctly and providing user-supported control of features like array implementations, loop schedules, and architectural descriptions. To that end, the current compiler is lacking several key optimizations and therefore is often not competitive with hand-coded C, Fortran, MPI, and the like. We are currently working on closing this gap.

Use the --fast flag!

Once your program is correct and you are ready to do a performance study, make sure to compile with the --fast flag. This is a compiler meta-flag that turns off several execution-time correctness checks (bounds checks, NULL pointer checks, etc.) and turns on C-level optimizations. See the 'chpl' man page for details.

How is Chapel performance today?

To characterize Chapel performance, generally speaking...

  • single-locale (CHPL_COMM=none | --local) compilations perform better than multi-locale (CHPL_COMM!=none | --no-local) compilations;

  • 1D loops/arrays perform better than multidimensional cases;

  • codes with structured communication (e.g., stencils) tend not to perform competitively with hand-coded computations, whereas embarrassingly parallel and unstructured communications tend to be more competitive. The reason for this is that Chapel communications currently tend to be very fine-grain and demand-driven unless array assignments are used to move chunks of data between locales.

Experimental flags for improving performance

Our current implementation supports the following config param-based flags, which are intended to provide a preview of performance improvements that we are working on delivering automatically in upcoming releases. Both are available for use "at your own risk" in that they are not guaranteed to maintain program correctness (detailed after the flag's description).

  • chpl -snoRefCount ...

    At present, Chapel reference counts arrays, domains, and domain maps in a manner that is far too conservative. This can add unnecessary overhead, particularly when passing such variables between functions.

    This flag turns off such reference counting, but also results in leaking all arrays, domains, and domain maps. For programs that only use global arrays, domains, and domain maps, this is unlikely to be an issue, but for programs with local arrays, domains, and domain maps, the resulting memory leaks may prevent the program from running correctly.

    We are currently evaluating changes to the implementation and language definition that would reduce (or eliminate) the amount of reference counting required by Chapel programs without introducing these memory leaks. Once these changes are complete, this flag will be retired.

Tracking Chapel Performance

We are currently working to improve Chapel performance with each release and are making significant strides. To track our progress over time, refer to:

http://chapel.sourceforge.net/perf/

From this page, you can track performance tests, either on a nightly or release-over-release basis. Interested users are encouraged to submit their own performance tests back to the project for tracking on this page.