Skip to Content

Charm++

Charm++ is a parallel C++ library which provides processor virtualization. It provides intelligent runtime systems, including automatic load balancing and communication optimizations, with performance visualization and analysis tools that can provide intuitive and specific feedback for improving performance. A few frameworks are developed to further enhance programmer productivity by automating domain-specific parallelization techniques, and producing reusable libraries for parallel algorithms.

How to use Charm++

First download Charm++ from http://charm.cs.illinois.edu/software.

There are a few ways to compile Charm++ on Blue Waters:

  • build Charm++ on top of the native uGNI communication library. This is the recommended way of building Charm++ on Blue Waters since it provides better performance.

         ./build charm+++ gni-crayxe

  • build Charm++ on top of MPI:

         ./build charm++ mpi-crayxe 
 

Several useful build options:

  • smp:     to enable shared-memory optimizations in the Charm++ runtime by using pthreads

         e.g.      ./build charm+++ gni-crayxe  smp

  • hugepages:    to use hugepages for communication on uGNI. This is only valid for the gni-crayxe build. A Cray hugepage module must be loaded before building Charm++.

         e.g.      module load craype-hugepages8M; ./build charm+++ gemini_gni-crayxe  hugepages

  •  PrgEnv-gnu : to use g++ and the usual gnu toolchain

         e.g.     module swap PrgEnv-cray PrgEnv-gnu

  • rca: to enable network topology aware mapping

         e.g.     module load rca

Running a Charm++ job:

  • When running a Charm++ non-SMP program on two XE nodes using all cores:    

       $aprun –n 64 –N 32 ./charm_hello

  • When running a Charm++ SMP program on three XE nodes, with two Charm++ processes on each node, each process containing 15 worker threads and 1 communication thread:

       $aprun –n 6 –N 2  -d 16 ./charm_hello   ++ppn 15 +commap 0,16 +pemap 1-15,17-31

 

Additional Information / References

http://charm.cs.illinois.edu