@@ -15,48 +15,50 @@ CPython (most common implementation) and PyPy_.
1515.. _PyPy : http://pypy.org
1616
1717
18- Manually building the Charm++ shared library
19- --------------------------------------------
18+ Installing Charm4Py on a laptop/personal machine
19+ ------------------------------------------------
2020
21- Use this to build Charm4py binaries manually, instead of downloading prebuilt libraries from pip.
22- This is needed when building Charm++ for specialized machine/network layers
23- other than TCP and MPI (e.g. Cray XC/XE).
21+ This install process covers the installation of Charm4Py on a laptop or personal machine, as opposed to a cluster.
2422
2523Before installing, you need the following prerequisites:
2624 - CPython: numpy, greenlet and cython (``pip3 install 'numpy>=1.10.0' cython greenlet ``)
2725 - PyPy: none
2826
27+ You can get these prerequisites by running the following command::
28+
29+ $ pip3 install -r requirements.txt
30+
2931The first step is to clone the Charm4py repository from Git::
3032
31- $ git clone https://github.com/UIUC-PPL /charm4py
33+ $ git clone https://github.com/charmplusplus /charm4py.git
3234 $ cd charm4py
3335
3436Next, create a folder called charm_src in the charm4py repo, and then clone the Charm++ repo
3537into that folder::
3638
3739 $ mkdir charm_src && cd charm_src
38- $ git clone https://github.com/UIUC-PPL /charm
40+ $ git clone https://github.com/charmplusplus /charm.git
3941
4042Once this is done, there are two ways to build Charm4py. The first way is to change back up
4143into the Charm4Py directory and run the install script::
4244
4345 $ cd ..
44- $ python3 setup.py install [--mpi]
45-
46- The optional flag ``--mpi ``, when enabled, will build the
47- Charm++ library with the MPI communication layer (MPI headers and libraries
48- need to be installed on the system). After this, Charm4Py will be built.
46+ $ python3 setup.py install
4947
5048The other option is to manually build Charm++ before building Charm4py. To do this, change to
5149the charm directory and run the following build command::
5250
5351 $ cd charm
54- $ ./build charm4py <version> -j<N> --with-production
52+ $ ./build charm4py netlrts-<os>-<architecture> -j<N> --with-production
53+
54+ For building on a laptop, you must use a netlrts build of Charm4Py. Check the Charm++ documentation
55+ to identify the correct os and architecture command to pass into the build command. The -j option
56+ is a cmake option that launches N threads for the make.
5557
5658Then, return to the charm4py directory and run setup.py::
5759
5860 $ cd ../..
59- $ python3 setup.py install [--mpi]
61+ $ python3 setup.py install
6062
6163
6264After building, you can run Charm4py examples. One example you can try is
@@ -65,36 +67,21 @@ array_hello.py, which can be run as follows::
6567 $ cd examples/hello
6668 $ python -m charmrun.start +p2 array_hello.py
6769
70+ Installing Charm4Py on a cluster machine
71+ ----------------------------------------
6872
69- .. note ::
70-
71- The TCP layer (selected by default) will work on desktop, servers and
72- small clusters. The MPI layer is faster and should work on most systems
73- including large clusters and supercomputers. Charm++ however also has support
74- for specialized network layers like uGNI and UCX. To use these, you have
75- to manually build the Charm++ library (see below).
76-
77-
78- pip
79- ---
80-
81- This option installs prebuilt Charm4Py binaries from pip. The prebuilt pip libraries
82- were built with Python 3.7.
83-
84- To install on regular Linux, macOS and Windows machines, do::
85-
86- $ pip3 install charm4py
73+ To install Charm4Py on a cluster machine, you will generally follow the same steps as above, but
74+ with the following changes. First, when building Charm++, use the MPI build instead of the netlrts
75+ build::
8776
88- .. note ::
77+ $ ./build charm4py mpi-<os>-<architecture> -j<N> --with-production
8978
90- This option uses Charm++'s TCP layer as the communication layer.
91- If you want a faster communication layer (e.g. MPI), see "Install from
92- source" below.
79+ Next, pass in the MPI option to the python setup script::
9380
94- pip >= 8.0 is recommended to simplify the install and avoid building Charm4py or
95- any dependencies from sources.
81+ $ python3 setup.py install --mpi
9682
97- Note that a 64-bit version of Python is required to install and run Charm4py.
83+ Finally, if necessary, when installing dependencies or when running the install script, add the --user
84+ option to the Python command to complete the installation without permission errors.
9885
9986
10087
0 commit comments