Building the Charm++ Runtime System

In the root directory of the Charm++ distribution is a build script. This build script is used to compile the Charm++ Runtime System for a particular platform. The exact platform that should be used depends on the setup of the machine being used by the user. For the sake of this example, we will assume that the target platform is a cluster of Linux workstations. Please Note: If the build script is executed with the "--help" command-line argument (i.e. the command "./build --help"), it will print out a usage message which includes a list of platforms available.

The general usage form of the build script is:

build <target> <version> <options> [ charmc-options ... ]

where:

  • <target>: This indicates which portion of the Charm++ distribution should be built. Because there are many components to the Charm++ distribution this allows the user to only build the portions that are needed for their purpose. Targets include: charm++, AMPI, FEM, LIBS, bigemulator, pose, jade, and msa. For example, the charm++ target builds the basic Charm++ Runtime System. The LIBS target builds additional libraries with various functionality (also builds the charm++ target on which it depends). If the pose target is used, both charm++ and LIBS targets will be built followed by the pose target. The pose target will create the required libraries needed for applications that will use its PDES functionality.
  • <version>: This is one of the available platforms. For a cluster of linux workstations connected using an Ethernet network, the target platform is net-linux. For the full list of supported platforms, use "./build --help".
  • <options> (Optional): This is where platform specific options should be specified. For example, multiple compilers are supported for various platforms. If the user wishes to use a compiler different from the default compiler for the platform, this would be specified here. Other platform specific options can include options for the type of network, SMP-mode, PAPI support, and so on.
  • [ charmc-options ... ] (Optional): This is where compiler specific options can be specified. The compiler wrapper charmc will use the options specified here by default when it is used to compile Charm++ programs. The compiler that it wraps is either the default compiler for the platform or the user defined compiler specified in the <options> portion of the build command.

Examples

(1) For a cluster of Linux workstations connected by an Ethernet network (32-bit x86 architecture): ./build charm++ net-linux
(2) 1 with SMP support: ./build charm++ net-linux smp
(3) 1 with the "-O3" compiler option on by default for charmc: ./build charm++ net-linux "-O3"
(4) 1 with both SMP support and the "-O3" compiler option on by default for charmc: ./build charm++ net-linux smp "-O3"

WARNING: Depending on the speed of the machine being used and the options specified, the build process of the Charm++ Runtime System can take several minutes (as high as 10-20 minutes for older machines).