$darkmode
A high-performance general-purpose compute library
/home/abuild/rpmbuild/BUILD/arrayfire-full-v3.9.0/docs/pages/install.md
Go to the documentation of this file.
1 # ArrayFire Installer {#installing}
2 
3 Installing ArrayFire couldn't be easier. Navigate to
4 https://arrayfire.com/download and download the appropriate installer for the
5 target architecture and operating system. Although ArrayFire can be [built
6 from source](https://github.com/arrayfire/arrayfire), the installers
7 conveniently package necessary dependencies.
8 
9 Install the latest device drivers before using ArrayFire. If you are going to
10 target the CPU using ArrayFire’s OpenCL backend, install the OpenCL
11 runtime. Drivers and runtimes should be downloaded and installed from the
12 device vendor’s website.
13 
14 # Install Instructions {#InstallInstructions}
15 
16 * [Windows](#Windows)
17 * [Linux](#Linux)
18 * [macOS](#macOS)
19 
20 ## Windows {#Windows}
21 
22 Prior to installing ArrayFire on Windows,
23 [download](https://www.microsoft.com/download/details.aspx?id=48145)
24 install the Visual Studio 2015 (x64) runtime libraries.
25 
26 Once the ArrayFire installer has been downloaded, run the installer. If you
27 choose not to modify the path during the installation procedure, you'll need
28 to manually add ArrayFire to the path for all users. Simply append
29 `%%AF_PATH%/lib` to the PATH variable so that the loader can find ArrayFire
30 DLLs.
31 
32 For more information on using ArrayFire on Windows, visit the following
33 [page](http://arrayfire.org/docs/using_on_windows.htm).
34 
35 ## Linux {#Linux}
36 
37 There are two ways to install ArrayFire on Linux.
38 1. Package Manager
39 2. Using ArrayFire Linux Installer
40 
41 As of today, approach (1) is only supported for Ubuntu 18.04 and 20.04. Please
42 go through [our GitHub wiki
43 page](https://github.com/arrayfire/arrayfire/wiki/Install-ArrayFire-From-Linux-Package-Managers)
44 for the detailed instructions.
45 
46 For approach (2), once you have downloaded the ArrayFire installer, execute
47 the installer from the terminal as shown below. Set the `--prefix` argument to
48 the directory you would like to install ArrayFire to - we recommend `/opt`.
49 
50  ./Arrayfire_*_Linux_x86_64.sh --include-subdir --prefix=/opt
51 
52 Given sudo permissions, you can add the ArrayFire libraries via `ldconfig` like
53 so:
54 
55  echo /opt/arrayfire/lib64 > /etc/ld.so.conf.d/arrayfire.conf
56  sudo ldconfig
57 
58 Otherwise, you will need to set the `LD_LIBRARY_PATH` environment variable in
59 order to let your shared library loader find the ArrayFire libraries.
60 
61 For more information on using ArrayFire on Linux, visit the following
62 [page](http://arrayfire.org/docs/using_on_linux.htm).
63 
64 ### Graphics support
65 
66 ArrayFire allows you to do high performance visualizations via our
67 [Forge](https://github.com/arrayfire/forge) library. On Linux, there are a few
68 dependencies you will need to install to enable graphics support:
69 
70 FreeImage
71 Fontconfig
72 GLU (OpenGL Utility Library)
73 
74 We show how to install these dependencies on common Linux distributions:
75 
76 __Debian, Ubuntu (14.04 and above), and other Debian derivatives__
77 
78  apt install build-essential libfreeimage3 libfontconfig1 libglu1-mesa
79 
80 __Fedora, Redhat, CentOS__
81 
82  yum install freeimage fontconfig mesa-libGLU
83 
84 
85 ## macOS {#macOS}
86 
87 Once you have downloaded the ArrayFire installer, execute the installer by
88 either double clicking on the ArrayFire `pkg` file or running the following
89 command from your terminal:
90 
91  sudo installer -pkg Arrayfire-*_OSX.pkg -target /
92 
93 For more information on using ArrayFire on macOS, visit the following
94 [page](http://arrayfire.org/docs/using_on_osx.htm).
95 
96 ## NVIDIA Tegra devices
97 
98 ArrayFire is capable of running on TX1 and TX2 devices. The TK1 is no longer
99 supported.
100 
101 Prior to installing ArrayFire, make sure you have the latest version of JetPack
102 (v2.3 and above) or L4T (v24.2 and above) on your device.
103 
104 ### Tegra prerequisites
105 
106 The following dependencies are required for Tegra devices:
107 
108  sudo apt install libopenblas-dev liblapacke-dev
109 
110 ## Testing installation
111 
112 After ArrayFire is finished installing, we recommend building and running a few
113 of the provided examples to verify things are working as expected.
114 
115 On Unix-like systems:
116 
117  cp -r /opt/arrayfire/share/ArrayFire/examples /tmp/examples
118  cd /tmp/examples
119  mkdir build
120  cd build
121  cmake -DASSETS_DIR:PATH=/tmp ..
122  make
123  ./helloworld/helloworld_{cpu,cuda,opencl}
124 
125 On Windows, open the CMakeLists.txt file from CMake-GUI and set `ASSETS_DIR`
126 variable to the parent folder of examples folder. Once the project is
127 configured and generated, you can build and run the examples from Visual
128 Studio.
129 
130 ## <a name="GettingHelp"></a> Getting help
131 
132 * Google Groups: https://groups.google.com/forum/#!forum/arrayfire-users
133 * ArrayFire Services: [Consulting](https://arrayfire.com/consulting/) | [Support](https://arrayfire.com/support/) | [Training](https://arrayfire.com/training/)
134 * ArrayFire Blogs: http://arrayfire.com/blog/
135 * Email: <mailto:technical@arrayfire.com>