diff --git a/CMakeModules/osx_install/OSXInstaller.cmake b/CMakeModules/osx_install/OSXInstaller.cmake index b2514f8e2a..2b2a52be62 100644 --- a/CMakeModules/osx_install/OSXInstaller.cmake +++ b/CMakeModules/osx_install/OSXInstaller.cmake @@ -158,6 +158,7 @@ PKG_BUILD( PKG_NAME ArrayFireOPENCL DEPENDS OSX_INSTALL_SETUP_OpenCL TARGETS opencl_package INSTALL_LOCATION /usr/local + SCRIPT_DIR ${OSX_INSTALL_DIR}/opencl_scripts IDENTIFIER com.arrayfire.pkg.arrayfire.opencl.lib PATH_TO_FILES ${OSX_TEMP}/OpenCL FILTERS cpu cuda unified) diff --git a/CMakeModules/osx_install/cpu_scripts/postinstall b/CMakeModules/osx_install/cpu_scripts/postinstall index 730065a710..a9bce9de8e 100755 --- a/CMakeModules/osx_install/cpu_scripts/postinstall +++ b/CMakeModules/osx_install/cpu_scripts/postinstall @@ -6,8 +6,10 @@ set -o pipefail err_file=/tmp/AFInstallerCPU.err brew=/usr/local/bin/brew +echo $(date) > $err_file + if [ ! -f $brew ]; then - osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at http://brew.sh"' + osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at http://brew.sh"' open http://brew.sh echo "Brew not found" >> $err_file exit 1 @@ -20,5 +22,14 @@ if [ -z $user ]; then exit 1 fi -su $user -c "$brew tap homebrew/versions" 2> $err_file -su $user -c "$brew install fftw glfw3 fontconfig" 2> $err_file +function deps_err +{ + osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."' + osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."' + open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures + echo "Dependencies failed to install" >> $err_file + exit 1 +} + +su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1 +su $user -c "$brew install fftw glfw3 fontconfig" >> $err_file 2>&1 || deps_err diff --git a/CMakeModules/osx_install/cuda_scripts/postinstall b/CMakeModules/osx_install/cuda_scripts/postinstall index 4713f46645..49f0fd2e2f 100755 --- a/CMakeModules/osx_install/cuda_scripts/postinstall +++ b/CMakeModules/osx_install/cuda_scripts/postinstall @@ -6,8 +6,10 @@ set -o pipefail err_file=/tmp/AFInstallerCUDA.err brew=/usr/local/bin/brew +echo $(date) > $err_file + if [ ! -f $brew ]; then - osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at brew.sh"' + osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at brew.sh"' echo "Brew not found" >> $err_file exit 1 fi @@ -19,5 +21,14 @@ if [ -z $user ]; then exit 1 fi -su $user -c "$brew tap homebrew/versions" 2> $err_file -su $user -c "$brew install glfw3 fontconfig" 2> $err_file +function deps_err +{ + osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."' + osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."' + open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures + echo "Dependencies failed to install" >> $err_file + exit 1 +} + +su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1 +su $user -c "$brew install glfw3 fontconfig" >> $err_file 2>&1 || deps_err diff --git a/CMakeModules/osx_install/opencl_scripts/postinstall b/CMakeModules/osx_install/opencl_scripts/postinstall index 0dd01a29f9..54ecb4df19 100755 --- a/CMakeModules/osx_install/opencl_scripts/postinstall +++ b/CMakeModules/osx_install/opencl_scripts/postinstall @@ -6,8 +6,10 @@ set -o pipefail err_file=/tmp/AFInstallerOpenCL.err brew=/usr/local/bin/brew +echo $(date) > $err_file + if [ ! -f $brew ]; then - osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at brew.sh"' + osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at brew.sh"' echo "Brew not found" >> $err_file exit 1 fi @@ -19,5 +21,14 @@ if [ -z $user ]; then exit 1 fi -su $user -c "$brew tap homebrew/versions" 2> $err_file -su $user -c "$brew install glfw3 fontconfig" 2> $err_file +function deps_err +{ + osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."' + osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."' + open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures + echo "Dependencies failed to install" >> $err_file + exit 1 +} + +su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1 +su $user -c "$brew install fftw glfw3 fontconfig" >> $err_file 2>&1 || deps_err diff --git a/CMakeModules/osx_install/readme.html b/CMakeModules/osx_install/readme.html index 482b7add7e..2443b5fae3 100644 --- a/CMakeModules/osx_install/readme.html +++ b/CMakeModules/osx_install/readme.html @@ -9,5 +9,6 @@

Install Directories

For complete list of updates, visit ArrayFire Release Notes

+

For questions about ArrayFire or this installer, visit ArrayFire User Forums

diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 7aa387847c..2f3a447718 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -1,6 +1,49 @@ Release Notes {#releasenotes} ============== +v3.3.2 +============== + +Improvements +------------ +* Family of [Sort](\ref sort_mat) functions now support + [higher order dimensions](https://github.com/arrayfire/arrayfire/pull/1373). +* Improved performance of batched sort on dim 0 for all [Sort](\ref sort_mat) functions. +* [Median](\ref stat_func_median) now also supports higher order dimensions. + +Bug Fixes +-------------- + +* Fixes to [error handling](https://github.com/arrayfire/arrayfire/issues/1352) in C++ API for binary functions. +* Fixes to [external OpenCL context management](https://github.com/arrayfire/arrayfire/issues/1350). +* Fixes to [JPEG_GREYSCALE](https://github.com/arrayfire/arrayfire/issues/1360) for FreeImage versions <= 3.154. +* Fixed for [non-float inputs](https://github.com/arrayfire/arrayfire/issues/1386) to \ref af::rgb2gray(). + +Build +------ +* [Disable CPU Async](https://github.com/arrayfire/arrayfire/issues/1378) when building with GCC < 4.8.4. +* Add option to [disable CPUID](https://github.com/arrayfire/arrayfire/issues/1369) from CMake. +* More verbose message when [CUDA Compute Detection fails](https://github.com/arrayfire/arrayfire/issues/1362). +* Print message to use [CUDA library stub](https://github.com/arrayfire/arrayfire/issues/1363) + from CUDA Toolkit if CUDA Library is not found from default paths. +* [Build Fixes](https://github.com/arrayfire/arrayfire/pull/1385) on Windows. + * For compiling tests our of source. + * For compiling ArrayFire with static MKL. +* [Exclude ](https://github.com/arrayfire/arrayfire/pull/1368) when building on GNU Hurd. +* Add [manual CMake options](https://github.com/arrayfire/arrayfire/pull/1389) to build DEB and RPM packages. + +Documentation +------------- +* Fixed documentation for \ref af::replace(). +* Fixed images in [Using on OSX](\ref using_on_osx) page. + +Installer +--------- +* Linux x64 installers will now be compiled with GCC 4.9.2. +* OSX installer gives better error messages on brew failures and + now includes link to [Fixing OS X Installer Failures] (https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures) + for brew installation failures. + v3.3.1 ============== @@ -361,7 +404,7 @@ Bug Fixes Documentation Updates --------------------- * Improved tutorials documentation - * More detailed Using on [Linux](\ref using_on_windows), [OSX](\ref using_on_windows), + * More detailed Using on [Linux](\ref using_on_linux), [OSX](\ref using_on_osx), [Windows](\ref using_on_windows) pages. * Added return type information for functions that return different type arrays diff --git a/docs/pages/using_on_osx.md b/docs/pages/using_on_osx.md index ccb0fb523a..ef7e1e4255 100644 --- a/docs/pages/using_on_osx.md +++ b/docs/pages/using_on_osx.md @@ -27,75 +27,12 @@ any build system to create and compile projects that use ArrayFire. Among the many possible build systems on Linux we suggest using ArrayFire with either CMake or Makefiles with CMake being our preferred build system. -## XCode +## Build Instructions: +* [CMake](#CMake) +* [MakeFiles](#MakeFiles) +* [XCode](#XCode) -Although we recommend using CMake to build ArrayFire projects on OSX, you can -use XCode if this is your preferred development platform. -To save some time, we have created an sample XCode project in our -[ArrayFire Project Templates repository](https://github.com/arrayfire/arrayfire-project-templates). - -To set up a basic C/C++ project in XCode do the following: - -1. Start up XCode. Choose OSX -> Application, Command Line Tool for the project: -Create a command line too XCode Project - -2. Fill in the details for your project and choose either C or C++ for the project: -Create a C/C++ project - -3. Next we need to configure the build settings. In the left-hand pane, click - on the project. In the center pane, click on "Build Settings" followed by - the "All" button: -Configure build settings - -4. Now search for "Header Search Paths" and add `/usr/local/include` to the list: -Configure build settings - -5. Then search for "Library Search Paths" and add `/usr/local/lib` to the list: -Configure build settings - -6. Next, we need to make sure the executable is linked with an ArrayFire library: - To do this, click the "Build Phases" tab and expand the "Link with Binary Library" - menu: -Configure build settings - -7. In the search dialog that pops up, choose the "Add Other" button from the - lower right. Specify the `/usr/local/lib` folder: -Configure build settings - -8. Lastly, select the ArrayFire library with which you wish to link your program. - Your options will be: - -~~~~~ -libafcuda.*.dylib - CUDA backend -libafopencl.*.dylib - OpenCL backend -libafcpu.*.dylib - CPU backend -libaf.*.dylib - Unified backend -~~~~~ - -In the picture below, we have elected to link with the OpenCL backend: - -Configure build settings - -9. Lastly, lets test ArrayFire's functionality. In the left hand pane open - the main.cpp` file and insert the following code: - -~~~~~ -// Include the ArrayFire header file -#include - -int main(int argc, const char * argv[]) { - // Gather some information about the ArrayFire device - af::info(); - return 0; -} -~~~~~ - -Finally, click the build button and you should see some information about your -graphics card in the lower-section of your screen: - -Configure build settings - -## CMake +## CMake We recommend that the CMake build system be used to create ArrayFire projects. If you are writing a new ArrayFire project in C/C++ from scratch, we suggest @@ -193,7 +130,7 @@ would modify the `cmake` command above to contain the following definition: You can also specify this information in the ccmake command-line interface. -## MakeFiles +## MakeFiles Building ArrayFire projects with Makefiles is fairly similar to CMake except you must specify all paths and libraries manually. @@ -217,3 +154,113 @@ Here is a minimial example MakeFile which uses ArrayFire's CPU backend: all: main.cpp Makefile $(CC) main.cpp -o test $(INCLUDES) $(LIBS) $(LIB_PATHS) + +## XCode + +Although we recommend using CMake to build ArrayFire projects on OSX, you can +use XCode if this is your preferred development platform. +To save some time, we have created an sample XCode project in our +[ArrayFire Project Templates repository](https://github.com/arrayfire/arrayfire-project-templates). + +To set up a basic C/C++ project in XCode do the following: + +1. Start up XCode. Choose OSX -> Application, Command Line Tool for the project: +\htmlonly +
+ +Create a command line too XCode Project + +\endhtmlonly + +2. Fill in the details for your project and choose either C or C++ for the project: +\htmlonly +
+ +Create a C/C++ project + +\endhtmlonly + +3. Next we need to configure the build settings. In the left-hand pane, click + on the project. In the center pane, click on "Build Settings" followed by + the "All" button: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +4. Now search for "Header Search Paths" and add `/usr/local/include` to the list: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +5. Then search for "Library Search Paths" and add `/usr/local/lib` to the list: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +6. Next, we need to make sure the executable is linked with an ArrayFire library: + To do this, click the "Build Phases" tab and expand the "Link with Binary Library" + menu: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +7. In the search dialog that pops up, choose the "Add Other" button from the + lower right. Specify the `/usr/local/lib` folder: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +8. Lastly, select the ArrayFire library with which you wish to link your program. + Your options will be: +~~~~~ +libafcuda.*.dylib - CUDA backend +libafopencl.*.dylib - OpenCL backend +libafcpu.*.dylib - CPU backend +libaf.*.dylib - Unified backend +~~~~~ +In the picture below, we have elected to link with the OpenCL backend: +\htmlonly +
+ +Configure build settings + +\endhtmlonly + +9. Lastly, lets test ArrayFire's functionality. In the left hand pane open + the main.cpp` file and insert the following code: + +~~~~~ +// Include the ArrayFire header file +#include + +int main(int argc, const char * argv[]) { + // Gather some information about the ArrayFire device + af::info(); + return 0; +} +~~~~~ + +Finally, click the build button and you should see some information about your +graphics card in the lower-section of your screen: + +\htmlonly +
+ +Configure build settings + +\endhtmlonly