@@ -17,6 +17,24 @@ that is compatible with your Python installation. In addition, if you need to
17
17
use OpenMP you will need to make sure your compiler is compatible with that.
18
18
Some additional information on this is included below.
19
19
20
+ Installing the bleeding edge
21
+ ----------------------------
22
+
23
+ Note that if you want the latest bleeding edge of compyle, clone the
24
+ repository and install compyle like so::
25
+
26
+ $ git clone https://github.com/pypr/compyle
27
+ $ cd compyle
28
+ $ python setup.py develop
29
+ # Or
30
+ $ pip install -e .
31
+
32
+ If you just want the latest version and do not want to clone the repository,
33
+ you can also do::
34
+
35
+ $ pip install https://github.com/pypr/compyle/zipball/master
36
+
37
+
20
38
.. _PyOpenCL : https://documen.tician.de/pyopencl/
21
39
.. _OpenCL : https://www.khronos.org/opencl/
22
40
.. _Cython : http://www.cython.org
@@ -36,12 +54,34 @@ with (on apt-compatible systems)::
36
54
$ sudo apt-get install libgomp1
37
55
38
56
39
- Setting up on MacOS
40
- ---------------------
57
+ Installation with conda on MacOS
58
+ ---------------------------------
59
+
60
+ Recent conda _ packages make the process of setup very easy on MacOS assuming
61
+ that you have the `XCode command line utilities `_ installed. Please make sure
62
+ you install this.
41
63
42
- Ensure that you have gcc or clang installed by installing XCode. See `this
43
- <http://stackoverflow.com/questions/12228382/after-install-xcode-where-is-clang> `_
44
- if you installed XCode but can't find clang or gcc.
64
+ For example with conda-forge _ the following creates a new Python 3.8
65
+ environment with compyle installed and working with both OpenMP and OpenCL::
66
+
67
+ $ conda create -c conda-forge -n py38 python=3.8 numpy pyopencl
68
+ $ conda activate py38 # or a suitable such invocation
69
+ $ pip install compyle
70
+
71
+ Note that the above implicitly installs the ``llvm-openmp `` package in the
72
+ environment which works out of the box with clang and provides OpenMP support.
73
+
74
+ .. _conda : https://docs.conda.io/
75
+ .. _conda-forge : https://conda-forge.org/
76
+ .. _XCode command line utilities : http://stackoverflow.com/questions/12228382/after-install-xcode-where-is-clang
77
+
78
+
79
+ Possible issues on MacOS
80
+ --------------------------
81
+
82
+ Ensure that you have gcc or clang installed by installing XCode. See
83
+ installing `XCode command line utilities `_ if you installed XCode but can't
84
+ find clang or gcc.
45
85
46
86
If you are getting strange errors of the form::
47
87
@@ -62,17 +102,22 @@ in your default environment (``.bashrc`` for bash shells) so you do not have
62
102
to do this every time.
63
103
64
104
105
+
65
106
OpenMP on MacOS
66
107
~~~~~~~~~~~~~~~~
67
108
109
+ These instructions are a bit old and only if you are not using conda as
110
+ discussed above.
111
+
68
112
The default clang compiler available on MacOS uses an LLVM backend and does
69
- not support OpenMP _. There are two ways to support OpenMP. The first involves
70
- installing the OpenMP support for clang. This can be done with brew _ using::
113
+ not support OpenMP _ out of the box. There are two ways to support OpenMP. The
114
+ first involves installing the OpenMP support for clang. This can be done with
115
+ brew _ using::
71
116
72
117
$ brew install libomp
73
118
74
119
Once that is done, it should "just work". If you get strange errors, try
75
- setting the ``MACOSX_DEPLOYMENT_TARGET `` as shown above .
120
+ setting the ``MACOSX_DEPLOYMENT_TARGET `` as shown in the previous section .
76
121
77
122
Another option is to install GCC for MacOS available on brew _ using ::
78
123
@@ -121,3 +166,8 @@ documentation for PyOpenCL_ and PyCUDA_. Once those packages work correctly,
121
166
you should be all set. Note that if you are only using OpenCL/CUDA you do not
122
167
need to have Cython or a C/C++ compiler. Some features on CUDA require the use
123
168
of the CuPy _ library.
169
+
170
+ If you want to use OpenCL support, you will need to install the ``pyopencl ``
171
+ package (``conda install -c conda-forge pyopencl `` or ``pip install
172
+ pyopencl ``). For CUDA Support, you will need to install ``pycuda `` and
173
+ ``cupy ``. Of course this assumes you have the required hardware for this.
0 commit comments