@@ -15,48 +15,50 @@ CPython (most common implementation) and PyPy_.
15
15
.. _PyPy : http://pypy.org
16
16
17
17
18
- Manually building the Charm++ shared library
19
- --------------------------------------------
18
+ Installing Charm4Py on a laptop/personal machine
19
+ ------------------------------------------------
20
20
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.
24
22
25
23
Before installing, you need the following prerequisites:
26
24
- CPython: numpy, greenlet and cython (``pip3 install 'numpy>=1.10.0' cython greenlet ``)
27
25
- PyPy: none
28
26
27
+ You can get these prerequisites by running the following command::
28
+
29
+ $ pip3 install -r requirements.txt
30
+
29
31
The first step is to clone the Charm4py repository from Git::
30
32
31
- $ git clone https://github.com/UIUC-PPL /charm4py
33
+ $ git clone https://github.com/charmplusplus /charm4py.git
32
34
$ cd charm4py
33
35
34
36
Next, create a folder called charm_src in the charm4py repo, and then clone the Charm++ repo
35
37
into that folder::
36
38
37
39
$ mkdir charm_src && cd charm_src
38
- $ git clone https://github.com/UIUC-PPL /charm
40
+ $ git clone https://github.com/charmplusplus /charm.git
39
41
40
42
Once this is done, there are two ways to build Charm4py. The first way is to change back up
41
43
into the Charm4Py directory and run the install script::
42
44
43
45
$ 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
49
47
50
48
The other option is to manually build Charm++ before building Charm4py. To do this, change to
51
49
the charm directory and run the following build command::
52
50
53
51
$ 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.
55
57
56
58
Then, return to the charm4py directory and run setup.py::
57
59
58
60
$ cd ../..
59
- $ python3 setup.py install [--mpi]
61
+ $ python3 setup.py install
60
62
61
63
62
64
After 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::
65
67
$ cd examples/hello
66
68
$ python -m charmrun.start +p2 array_hello.py
67
69
70
+ Installing Charm4Py on a cluster machine
71
+ ----------------------------------------
68
72
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::
87
76
88
- .. note ::
77
+ $ ./build charm4py mpi-<os>-<architecture> -j<N> --with-production
89
78
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::
93
80
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
96
82
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.
98
85
99
86
100
87
0 commit comments