@@ -15,53 +15,56 @@ CPython (most common implementation) and PyPy_.
15
15
.. _PyPy : http://pypy.org
16
16
17
17
18
- pip
19
- ---
20
-
21
- To install on regular Linux, macOS and Windows machines, do::
18
+ Manually building the Charm++ shared library
19
+ --------------------------------------------
22
20
23
- $ pip3 install charm4py
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).
24
24
25
- .. note ::
25
+ Before installing, you need the following prerequisites:
26
+ - CPython: numpy, greenlet and cython (``pip3 install 'numpy>=1.10.0' cython greenlet ``)
27
+ - PyPy: none
26
28
27
- This option uses Charm++'s TCP layer as the communication layer.
28
- If you want a faster communication layer (e.g. MPI), see "Install from
29
- source" below.
29
+ The first step is to clone the Charm4py repository from Git::
30
30
31
- pip >= 8.0 is recommended to simplify the install and avoid building Charm4py or
32
- any dependencies from sources.
31
+ $ git clone https://github.com/UIUC-PPL/charm4py
32
+ $ cd charm4py
33
33
34
- Note that a 64-bit version of Python is required to install and run Charm4py.
34
+ Next, create a folder called charm_src in the charm4py repo, and then clone the Charm++ repo
35
+ into that folder::
35
36
37
+ $ mkdir charm_src && cd charm_src
38
+ $ git clone https://github.com/UIUC-PPL/charm
36
39
37
- Install from source
38
- -------------------
40
+ Once this is done, there are two ways to build Charm4py. The first way is to change back up
41
+ into the Charm4Py directory and run the install script::
42
+
43
+ $ cd ..
44
+ $ python3 setup.py install [--mpi]
39
45
40
- .. note ::
41
- This is not required if installing from a binary wheel with pip.
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.
42
49
43
- Prerequisites:
44
- - CPython: numpy, greenlet and cython (``pip3 install 'numpy>=1.10.0' cython greenlet ``)
45
- - PyPy: none
50
+ The other option is to manually build Charm++ before building Charm4py. To do this, change to
51
+ the charm directory and run the following build command::
52
+
53
+ $ cd charm
54
+ $ ./build charm4py <version> -j<N> --with-production
46
55
47
- To build the latest * stable * release, do ::
56
+ Then, return to the charm4py directory and run setup.py ::
48
57
49
- $ pip3 install [--install-option="--mpi"] charm4py --no-binary charm4py
58
+ $ cd ../..
59
+ $ python3 setup.py install [--mpi]
50
60
51
- Or download the source distribution from PyPI, uncompress and run
52
- ``python3 setup.py install [--mpi] ``.
53
61
54
- The optional flag ``--mpi ``, when enabled, will build the
55
- Charm++ library with the MPI communication layer (MPI headers and libraries
56
- need to be installed on the system).
62
+ After building, you can run Charm4py examples. One example you can try is
63
+ array_hello.py, which can be run as follows::
57
64
58
- To build the latest * development * version, download Charm4py and Charm++ source code
59
- and run setup::
65
+ $ cd examples/hello
66
+ $ python -m charmrun.start +p2 array_hello.py
60
67
61
- $ git clone https://github.com/UIUC-PPL/charm4py
62
- $ cd charm4py
63
- $ git clone https://github.com/UIUC-PPL/charm charm_src/charm
64
- $ python3 setup.py install [--mpi]
65
68
66
69
.. note ::
67
70
@@ -72,25 +75,27 @@ and run setup::
72
75
to manually build the Charm++ library (see below).
73
76
74
77
75
- Manually building the Charm++ shared library
76
- --------------------------------------------
78
+ pip
79
+ ---
77
80
78
- This is needed when building Charm++ for specialized machine/network layers
79
- other than TCP and MPI (e.g. Cray XC/XE) .
81
+ This option installs prebuilt Charm4Py binaries from pip. The prebuilt pip libraries
82
+ were built with Python 3.7 .
80
83
81
- Before running ``python3 setup.py `` in the steps above, enter the Charm++ source code
82
- directory (``charm_src/charm ``), and manually build the Charm++ library. The build
83
- command syntax is::
84
+ To install on regular Linux, macOS and Windows machines, do::
84
85
85
- $ ./build charm4py <version> -j<N> --with-production
86
+ $ pip3 install charm4py
86
87
87
- where ``<version> `` varies based on the system and communication layer, and ``<N> ``
88
- is the number of processes to use for compiling.
89
- For help in choosing the correct ``<version> ``, please refer to the Charm++ manual _
90
- and the README in Charm++'s root directory.
88
+ .. note ::
89
+
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.
93
+
94
+ pip >= 8.0 is recommended to simplify the install and avoid building Charm4py or
95
+ any dependencies from sources.
96
+
97
+ Note that a 64-bit version of Python is required to install and run Charm4py.
91
98
92
- After the library has been built, continue with ``python3 setup.py install `` in the
93
- Charm4py source root directory.
94
99
95
100
96
101
.. _manual : https://charm.readthedocs.io/en/latest/charm++/manual.html#installing-charm
0 commit comments