CHARM++ provides a compiler called charmc in your charm/bin/ directory.
You can use this compiler to build your AMPI program the same way as other
compilers like cc. Especially, to build an AMPI program, a command line
option -language ampi should be applied. All the command line
flags that you would use for other compilers can be used with charmc the
same way. For example:
Shortcuts to the AMPI compiler are provided. If you have added charm/bin
into your $PATH environment variable, simply type mpicc, mpiCC,
mpif77, and mpif90 as provided by other MPI implementations.
CHARM++ distribution contains a script called charmrun that makes
the job of running AMPI programs portable and easier across all parallel
machines supported by CHARM++. charmrun is copied to a directory
where an AMPI prgram is built using charmc. It takes a command line
parameter specifying number of processors, and the name of the program followed
by AMPI options (such as number of chunks to create, and the stack size of
every chunk) and the program arguments. A typical invocation of AMPI program
pgm with charmrun is:
Here, the AMPI program pgm is run on 16 physical processors with
32 chunks (which will be mapped 2 per processor initially), where each
user-level thread associated with a chunk has the stack size of 3,276,800 bytes.