3.11 Compiling AMPI Programs

CHARM++ provides a cross-platform compile-and-link script called charmc to compile C, C++, Fortran, CHARM++ and AMPI programs. This script resides in the bin subdirectory in the CHARM++ installation directory. The main purpose of this script is to deal with the differences of various compiler names and command-line options across various machines on which CHARM++ runs. While, charmc handles C and C++ compiler differences most of the time, the support for Fortran 90 is new, and may have bugs. But CHARM++ developers are aware of this problem and are working to fix them. Even in its alpha stage of Fortran 90 support, charmc still handles many of the compiler differences across many machines, and it is recommended that charmc be used to compile and linking AMPI programs. One major advantage of using charmc is that one does not have to specify which libraries are to be linked for ensuring that C++ and Fortran 90 codes are linked correctly together. Appropriate libraries required for linking such modules together are known to charmc for various machines.

In spite of the platform-neutral syntax of charmc, one may have to specify some platform-specific options for compiling and building AMPI codes. Fortunately, if charmc does not recognize any particular options on its command line, it promptly passes it to all the individual compilers and linkers it invokes to compile the program.

January 17, 2008
AMPI Homepage
Charm Homepage