Install¶
Charm4py runs on Linux, macOS, Windows, Raspberry Pi, and a wide variety of clusters and supercomputer environments (including many supercomputers in the TOP500).
Charm4py runs on Python 3.4+. Charm4py has been tested with the following Python implementations: CPython (most common implementation) and PyPy.
pip¶
To install on regular Linux, macOS and Windows machines, do:
$ pip3 install charm4py
Note
This option uses Charm++’s TCP layer as the communication layer. If you want a faster communication layer (e.g. MPI), see “Install from source” below.
pip >= 8.0 is recommended to simplify the install and avoid building Charm4py or any dependencies from sources.
Note that a 64-bit version of Python is required to install and run Charm4py.
Install from source¶
Note
This is not required if installing from a binary wheel with pip.
- Prerequisites:
- CPython: numpy, greenlet and cython (
pip3 install 'numpy>=1.10.0' cython greenlet
) - PyPy: none
- CPython: numpy, greenlet and cython (
To build the latest stable release, do:
$ pip3 install [--install-option="--mpi"] charm4py --no-binary charm4py
Or download the source distribution from PyPI, uncompress and run
python3 setup.py install [--mpi]
.
The optional flag --mpi
, when enabled, will build the
Charm++ library with the MPI communication layer (MPI headers and libraries
need to be installed on the system).
To build the latest development version, download Charm4py and Charm++ source code and run setup:
$ git clone https://github.com/UIUC-PPL/charm4py
$ cd charm4py
$ git clone https://github.com/UIUC-PPL/charm charm_src/charm
$ python3 setup.py install [--mpi]
Note
The TCP layer (selected by default) will work on desktop, servers and small clusters. The MPI layer is faster and should work on most systems including large clusters and supercomputers. Charm++ however also has support for specialized network layers like uGNI and UCX. To use these, you have to manually build the Charm++ library (see below).