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