Skip to content

Commit

Permalink
Miscellaneous changes for 3.6 release (arrayfire#2095)
Browse files Browse the repository at this point in the history
* fix ASSETS_DIR for out of builddir builds
* update install documentation for 3.6.0 release
* Update build instructions for debian and centos
* Update install instructions for debian and it's derivatives
* Update using ArrayFire on Windows tutorial
* Update using ArrayFire on Linux tutorial
* Update using ArrayFire on OSX tutorial
* Remove xcode related instructions
  • Loading branch information
9prady9 authored and syurkevi committed Jul 25, 2018
1 parent 6e3a57b commit b1494c1
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 676 deletions.
244 changes: 89 additions & 155 deletions docs/pages/install.md
Original file line number Diff line number Diff line change
@@ -1,200 +1,134 @@
ArrayFire Binary Installation Instructions {#installing}
=====

Installing ArrayFire couldn't be easier. We ship installers for Windows,
OSX, and Linux. Although you could
[build ArrayFire from source](https://github.com/arrayfire/arrayfire), we
suggest using our pre-compiled binaries as they include the Intel Math
Kernel Library to accelerate linear algebra functions.

Please note that although our download page requires a valid login, registration
is free and downloading ArrayFire is also free. We request your contact
information so that we may notify you of software updates and occasionally
collect user feedback about our library.

In general, the installation process for ArrayFire looks like this:

1. Install prerequisites
2. [Download](http://arrayfire.com/download/) the ArrayFire installer for your
operating system
3. Install ArrayFire
4. Test the installation
5. [Where to go for help?](#GettingHelp)

Below you will find instructions for:
# ArrayFire Installer {#installing}

Installing ArrayFire couldn't be easier. Navigate to
https://arrayfire.com/download and download the installer for your architecture
and operating system. Although you could [build ArrayFire from
source](https://github.com/arrayfire/arrayfire), we recommend using our
installers as we have packaged together all of the necessary dependencies to
give you the best performance.

We provide installers for Windows, Linux, and macOS. There are two installers
for each operating system: one with graphics support and the other without
graphics support. Download the installer with graphics support if you would like
to be able to do high performance visualizations using our
[Forge](https://github.com/arrayfire/forge) library. Otherwise, download the
installer without graphics support.

Make sure you have the latest device drivers installed on your system before
using ArrayFire. If you are going to be targeting the CPU using ArrayFire’s
OpenCL backend, you will need to have the OpenCL **runtime** installed on your
system. Drivers and runtimes should be downloaded and installed from your device
vendor’s website.

# Install Instructions

* [Windows](#Windows)
* Linux
* [Debian 8](#Debian)
* [Ubuntu 14.04 and later](#Ubuntu)
* [RedHat, Fedora, and CentOS](#RPM-distros)
* [Mac OSX (.sh and brew)](#OSX)

# <a name="Windows"></a> Windows

If you wish to use CUDA or OpenCL please ensure that you have also installed
support for these technologies from your video card vendor's website.

Next, [download](http://arrayfire.com/download/) and run the ArrayFire
installer. After installation, you'll need to add ArrayFire to the path for
all users:

1. Open Advanced System Settings:
* Windows 8: Move the Mouse pointer to the bottom right corner of the
screen, Right click, choose System. Then click "Advanced System Settings"
* Windows 7: Open the Start Menu and Right Click on "Computer". Then choose
Properties and click "Advanced System Settings"
2. In Advanced System Settings window, click on Advanced tab
3. Click on Environment Variables, then under System Variables, find PATH, and
click on it.
4. In edit mode, append `%AF_PATH%/lib`. Make sure to separate `%AF_PATH%/lib`
from any existing content using a semicolon (e.g.
`EXISTING_PATHS;%AF_PATH%/lib;`). Other software may function incorrectly
if this is not the case.

Finally, verify that the path addition worked correctly. You can do this by:

1. Open Visual Studio 2013. Open the `HelloWorld` solution which is located at
`%AF_PATH%/examples/helloworld/helloworld.exe`.
2. Build and run the `helloworld` example. Use the "Solution Platform"
drop-down to select from the CPU, CUDA, or OpenCL backends ArrayFire
provides.

# Linux
* [Linux](#Linux)
* [macOS](#macOS)

## <a name="Debian"></a> Debian 8
## <a name="Windows"></a> Windows

First, install the prerequisite packages:
Prior to installing ArrayFire on Windows,
[download](https://www.microsoft.com/en-in/download/details.aspx?id=48145)
install the Visual Studio 2015 (x64) runtime libraries.

# Install prerequisite packages:
apt-get install libglfw3-dev cmake
Once you have downloaded the ArrayFire installer, execute the installer as you
normally would on Windows. If you choose not to modify the path during the
installation procedure, you'll need to manually add ArrayFire to the path for
all users. Simply append `%AF_PATH%/lib` to the PATH variable so that the loader
can find ArrayFire DLLs.

# Enable GPU support (OpenCL):
apt-get install ocl-icd-libopencl1
For more information on using ArrayFire on Windows, visit the following
[page](http://arrayfire.org/docs/using_on_windows.htm).

If you wish to use CUDA,
[download](https://developer.nvidia.com/cuda-downloads) and install the latest
version.
## <a name="Linux"></a> Linux

Next, [download](http://arrayfire.com/download/) the ArrayFire installer for
your system. After you have the file, run the installer:
Once you have downloaded the ArrayFire installer, execute the installer from the
terminal as shown below. Set the `--prefix` argument to the directory you would
like to install ArrayFire to - we recommend `/opt`.

./arrayfire_*_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
./Arrayfire_*_Linux_x86_64.sh --include-subdir --prefix=/opt

## <a name="RPM-distros"></a> RedHat, Fedora, and CentOS
Given sudo permissions, you can add the ArrayFire libraries via `ldconfig` like
so:

First, install the prerequisite packages:
echo /opt/arrayfire/lib > /etc/ld.so.conf.d/arrayfire.conf
sudo ldconfig

# Install prerequiste packages
yum install glfw cmake
Otherwise, you will need to set the `LD_LIBRARY_PATH` environment variable in
order to let your shared library loader find the ArrayFire libraries.

NOTE: On CentOS and Redhat, the `glfw` package is outdated and you will need
to compile it from source. Follow these
[instructions](https://github.com/arrayfire/arrayfire/wiki/GLFW-for-ArrayFire)
for more information on how to build and install GFLW.
For more information on using ArrayFire on Linux, visit the following
[page](http://arrayfire.org/docs/using_on_linux.htm).

If you wish to use CUDA,
[download](https://developer.nvidia.com/cuda-downloads) and install the latest
version.
### Graphics support

Next, [download](http://arrayfire.com/download/) the ArrayFire installer for
your system. After you have the file, run the installer:
ArrayFire allows you to do high performance visualizations via our
[Forge](https://github.com/arrayfire/forge) library. On Linux, there are a few
dependencies you will need to install to enable graphics support:

./arrayfire_*_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
FreeImage
Fontconfig
GLU (OpenGL Utility Library)

## <a name="Ubuntu"></a> Ubuntu 14.04 and later
We show how to install these dependencies on common Linux distributions:

First, install the prerequisite packages:
__Debian, Ubuntu (14.04 and above), and other Debian derivatives__

### Ubuntu 16.04
apt install build-essential libfreeimage3 libfontconfig1 libglu1-mesa

# Install prerequisite packages:
sudo apt-get install libglfw3-dev cmake
__Fedora, Redhat, CentOS__

### Ubuntu 14.04
yum install freeimage fontconfig mesa-libGLU

# Install prerequisite packages:
sudo apt-get install cmake

Ubuntu 14.04 does not include the `libglfw3-dev` package in its
repositories. In order to install, you can either:
## <a name="macOS"></a> macOS

1. Build the library from source by following these
[instructions](https://github.com/arrayfire/arrayfire/wiki/GLFW-for-ArrayFire),
or
2. Install the library from a PPA as follows:
Once you have downloaded the ArrayFire installer, execute the installer by
either double clicking on the ArrayFire `pkg` file or running the following
command from your terminal:

sudo apt-add-repository ppa:keithw/glfw3
sudo apt-get update
sudo apt-get install glfw3
sudo installer -pkg Arrayfire-*_OSX.pkg -target /

At this point, the installation should proceed identically for Ubuntu 14.04
and newer.
For more information on using ArrayFire on macOS, visit the following
[page](http://arrayfire.org/docs/using_on_osx.htm).

If your system has a CUDA GPU, we suggest downloading the latest drivers
from NVIDIA in the form of a Debian package and installing using the
package manager. At present, CUDA downloads can be found on the
[NVIDIA CUDA download page](https://developer.nvidia.com/cuda-downloads).
Follow NVIDIA's instructions for getting CUDA set up.
## NVIDIA Tegra devices

If you wish to use OpenCL, simply install the OpenCL ICD loader along
with any drivers required for your hardware.
ArrayFire is capable of running on TX1 and TX2 devices. The TK1 is no longer
supported.

# Enable GPU support (OpenCL):
apt-get install ocl-icd-libopencl1
Prior to installing ArrayFire, make sure you have the latest version of JetPack
(v2.3 and above) or L4T (v24.2 and above) on your device.

### Special instructions for Tegra X1
### Tegra prerequisites

**The ArrayFire binary installer for Tegra X1 requires at least JetPack 2.3 or
L4T 24.2 for Jetson TX1. This includes Ubuntu 16.04, CUDA 8.0 etc.**
The following dependencies are required for Tegra devices:

You will also want to install the following packages when using ArrayFire on
the Tegra X1:

sudo apt-get install libopenblas-dev liblapacke-dev

### Special instructions for Tegra K1

You will also want to install the following packages when using ArrayFire on
the Tegra K1:

sudo apt-get install libatlas3gf-base libatlas-dev libfftw3-dev liblapacke-dev

Finally, [download](http://arrayfire.com/download/) ArrayFire for your
system. After you have the file, run the installer using:

./arrayfire_*_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local

# <a name="OSX"></a> Mac OSX

On OSX there are several dependencies that are not integrated into the
operating system. The ArrayFire installer automatically satisfies these
dependencies using [Homebrew](http://brew.sh/).
If you don't have Homebrew installed on your system, the ArrayFire installer
will ask you do to so.

Simply [download](http://arrayfire.com/download) the ArrayFire installer
and double-click it to carry out the installation.

ArrayFire can also be installed through Homebrew directly using
`brew install arrayfire`; however, it will
not include MKL acceleration of linear algebra functions.
sudo apt install libopenblas-dev liblapacke-dev

## Testing installation

Test ArrayFire after the installation process by building the example programs
as follows:
After ArrayFire is finished installing, we recommend building and running a few
of the provided examples to verify things are working as expected.

On Unix-like systems:

cp -r /usr/local/share/ArrayFire/examples .
cd examples
cp -r /opt/arrayfire/share/ArrayFire/examples /tmp/examples
cd /tmp/examples
mkdir build
cd build
cmake ..
cmake -DASSETS_DIR:PATH=/tmp ..
make
./helloworld/helloworld_{cpu,cuda,opencl}

On Windows, open the CMakeLists.txt file from CMake-GUI and set `ASSETS_DIR`
variable to the parent folder of examples folder. Once the project is configured
and generated, you can build and run the examples from Visual Studio.

## <a name="GettingHelp"></a> Getting help

* Google Groups: https://groups.google.com/forum/#!forum/arrayfire-users
* ArrayFire Services: [Consulting](http://arrayfire.com/consulting/) | [Support](http://arrayfire.com/support/) | [Training](http://arrayfire.com/training/)
* ArrayFire Services: [Consulting](https://arrayfire.com/consulting/) | [Support](https://arrayfire.com/support/) | [Training](https://arrayfire.com/training/)
* ArrayFire Blogs: http://arrayfire.com/blog/
* Email: <mailto:technical@arrayfire.com>
Loading

0 comments on commit b1494c1

Please sign in to comment.