OK, thanks.  I guess what I would need is some more detailed suggestions
for how to debug the problem. Yes, starting with the actual error log is a
good idea. To that end I started over from the beginning, keeping a
detailed log, but ...

Starting with a fresh install and building everything from source works!
The failure on my first attempt may have been due to using

  cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir

to change the install prefix for Sage installation, after first installing
ArrayFire in the system-level Python. But I am not sure and have not tried
to actually reproduce this yet.

In any case, for the record here is a log of a successful installation
starting from a fresh install of Sage and installing all of ArrayFire,
arrayfire-python and afnumpy into the Sage shell from git repository
sources:

http://www.sagemath.org/download-linux.html

wspage@strix ~ $ *wget
http://mirrors.mit.edu/sage/linux/64bit/sage-7.3-Ubuntu_16.04-x86_64.tar.bz2
<http://mirrors.mit.edu/sage/linux/64bit/sage-7.3-Ubuntu_16.04-x86_64.tar.bz2>*

wspage@strix ~ $ *tar xf sage-7.3-Ubuntu_16.04-x86_64.t*
*ar.bz2*
wspage@strix ~/SageMath $ *./sage*

Rewriting paths for your new installation directory
===================================================

This might take a few minutes but only has to be done once.

patching /home/wspage/SageMath/src/build/cython_debug/cython_debug_in
fo_sage.rings.polynomial.real_roots
patching /home/wspage/SageMath/local/bin/linegraphg
...
patching /home/wspage/SageMath/local/lib/python2.7/lib-dynload/_codec
s_iso2022.so
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.3, Release Date: 2016-08-04                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: 1+1
2
sage: exit
Exiting Sage (CPU time 0m0.03s, Wall time 0m9.92s).

wspage@strix ~ $ *git clone https://github.com/arrayfire/arrayfire.git
<https://github.com/arrayfire/arrayfire.git>*

wspage@strix ~/SageMath $ *cd ~/arrayfire*

wspage@strix ~/arrayfire $
*~/SageMath/sage --sh*
Starting subshell with Sage environment variables set.  Don't forget
to exit when you are done.  Beware:
 * Do not do anything with other copies of Sage on your system.
 * Do not use this for installing Sage packages using "sage -i" or for
   running "make" at Sage's root directory.  These should be done
   outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/home/wspage/SageMath

(sage-sh) wspage@strix:arrayfire$* ls $SAGE_ROOT*
bootstrap  config.status  COPYING.txt  m4      sage        VERSION.txt
build       configure      local        Makefile   src
config       configure.ac   logs           README.md  upstream

(sage-sh) wspage@strix:arrayfire$ *ls $SAGE_ROOT/local*
bin  default.qepcadrc  etc  gap  include  lib  lib64  libexec  share  var

(sage-sh) wspage@strix:arrayfire$ *mkdir build*

(sage-sh) wspage@strix:arrayfire$ *cd build*

(sage-sh) wspage@strix:build$ *cmake .. -DCMAKE_INSTALL_PREFIX=$SAGE_R*
*OOT/local*
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found FREEIMAGE: /usr/include
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found PkgConfig: /home/wspage/SageMath/local/bin/pkg-config (found
version "0.29.1")
-- Checking for module 'cblas'
--   Found cblas, version 1.0
-- Found CBLAS:
/home/wspage/SageMath/local/lib/libcblas.so;/home/wspage/SageMath/local/lib/libatlas.so

-- Found FFTW: /usr/include
-- Found LAPACKE: /usr/lib/liblapacke.so;/home/w
spage/SageMath/local/lib/liblapack.so;/home/wspage/SageMath/
local/lib/libf77blas.so;/home/wspage/SageMath/local/lib/libc
blas.so;/home/wspage/SageMath/local/lib/libatlas.so;/home/
wspage/SageMath/local/lib/libf77blas.so;/home/wspage/
SageMath/local/lib/libatlas.so
-- Found LAPACK: /usr/include
-- Found CUDA: /usr (found version "7.5")
-- Boost version: 1.58.0
-- Found NVVM: /usr/include
-- /home/wspage/arrayfire/CMakeModules/cuda_compute_capability.cpp
-- CUDA Compute Detection Output: 52
-- CUDA Compute Detection Return: 0
-- CUDA Compute Detection Worked
-- Number of Computes Detected = 1
-- Setting Compute 52 to ON
-- CUDA cusolver library available in CUDA Version 7.5
-- LIBDEVICE not found on system. CUDA JIT may be slower
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version
"2.0")
-- Boost version: 1.58.0
-- BoostCompute...
--   getting https://github.com/boostorg/compute/archive/boost-1.61.0.tar.gz
-- [download 0% complete]
...
-- [download 99% complete]
-- [download 100% complete]
--   validating /home/wspage/arrayfire/build/third_party/compute-boost-1.61.
0.tar.gz
--   extracting /home/wspage/arrayfire/build/third_party/compute-boost-1.61.
0.tar.gz
-- /home/wspage/arrayfire/test/gtest
-- TESTS: CPU backend is ON.
-- Removing /home/wspage/arrayfire/test/gloh_nonfree.cpp from ctest
-- Removing /home/wspage/arrayfire/test/manual_memory_test.cpp from ctest
-- Removing /home/wspage/arrayfire/test/sift_nonfree.cpp from ctest
-- TESTS: CUDA backend is ON.
-- Removing /home/wspage/arrayfire/test/gloh_nonfree.cpp from ctest
-- Removing /home/wspage/arrayfire/test/manual_memory_test.cpp from ctest
-- Removing /home/wspage/arrayfire/test/sift_nonfree.cpp from ctest
-- TESTS: OPENCL backend is ON.
-- Removing /home/wspage/arrayfire/test/gloh_nonfree.cpp from ctest
-- Removing /home/wspage/arrayfire/test/manual_memory_test.cpp from ctest
-- Removing /home/wspage/arrayfire/test/sift_nonfree.cpp from ctest
-- TESTS: UNIFIED backend is ON.
-- EXAMPLES: CPU backend is ON.
-- EXAMPLES: UNIFIED backend is ON.
-- EXAMPLES: CUDA backend is ON.
-- EXAMPLES: OPENCL backend is ON.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wspage/arrayfire/build

(sage-sh) wspage@strix:build$ *make -j18*
...
[100%] Built target random_cuda
[100%] Built target unwrap_cuda
[100%] Linking CXX executable reorder_cuda
[100%] Built target reorder_cuda
[100%] Linking CXX executable rotate_linear_cuda
[100%] Built target rotate_linear_cuda

(sage-sh) wspage@strix:build$ *make test*
...
326/329 Test #326: Test_write_opencl ...................   Passed    0.89
sec
        Start 327: Test_ycbcr_rgb_opencl
327/329 Test #327: Test_ycbcr_rgb_opencl ...............   Passed    0.78
sec
        Start 328: Test_backend_unified
328/329 Test #328: Test_backend_unified ................   Passed    1.13
sec
        Start 329: Test_main_unified
329/329 Test #329: Test_main_unified ...................   Passed    0.00
sec

100% tests passed, 0 tests failed out of 329

Total Test time (real) = 1062.35 sec

(sage-sh) wspage@strix:build$ *cd ~*

(sage-sh) wspage@strix ~ $ *git clone
https://github.com/arrayfire/arrayfire-python.git
<https://github.com/arrayfire/arrayfire-python.git>*

(sage-sh) wspage@strix:build$
*cd ~/arrayfire-python*
(sage-sh) wspage@strix:arrayfire-python$ *python setup.py install*
running install
running bdist_egg
running egg_info
writing arrayfire.egg-info/PKG-INFO
writing top-level names to arrayfire.egg-info/top_level.txt
writing dependency_links to arrayfire.egg-info/dependency_links.txt
writing manifest file 'arrayfire.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/arrayfire
copying build/lib/arrayfire/__init__.py -> build/bdist.linux-x86_64/egg/
arrayfire
...
copying build/lib/arrayfire/tests/simple_tests.py ->
build/bdist.linux-x86_64/egg/arrayfire/tests
creating build/bdist.linux-x86_64/egg/arrayfire/tests/simple
copying build/lib/arrayfire/tests/simple/__init__.py ->
build/bdist.linux-x86_64/egg/arrayfire/tests/simple
...
copying build/lib/arrayfire/tests/simple/statistics.py ->
build/bdist.linux-x86_64/egg/arrayfire/tests/simple
byte-compiling build/bdist.linux-x86_64/egg/arrayfire/__init__.py to
__init__.pyc
...
byte-compiling build/bdist.linux-x86_64/egg/arrayfire/tests/simple/statistics.py
to statistics.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying arrayfire.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying arrayfire.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/
EGG-INFO
copying arrayfire.egg-info/dependency_links.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
copying arrayfire.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/
EGG-INFO
zip_safe flag not set; analyzing archive contents...
arrayfire.array: module MAY be using inspect.stack
creating 'dist/arrayfire-3.4.0-py2.7.egg' and adding
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing arrayfire-3.4.0-py2.7.egg
creating /home/wspage/SageMath/local/lib/python2.7/site-packages/
arrayfire-3.4.0-py2.7.egg
Extracting arrayfire-3.4.0-py2.7.egg to /home/wspage/SageMath/local/
lib/python2.7/site-packages
Adding arrayfire 3.4.0 to easy-install.pth file

Installed /home/wspage/SageMath/local/lib/python2.7/site-packages/
arrayfire-3.4.0-py2.7.egg
Processing dependencies for arrayfire==3.4.0
Finished processing dependencies for arrayfire==3.4.0

(sage-sh) wspage@strix:arrayfire-python$ *python*
Python 2.7.10 (default, Aug  6 2016, 03:57:07)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrayfire
>>>

(sage-sh) wspage@strix:afnumpy$ *exit*
exit
Exited Sage subshell.

wspage@strix ~/arrayfire $ *cd ~/SageMath*

wspage@strix ~/SageMath $ *./sage*
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.3, Release Date: 2016-08-04                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: import arrayfire
sage: exit
Exiting Sage (CPU time 0m0.70s, Wall time 63m27.87s).

wspage@strix ~/SageMath $ *./sage -sh*
Starting subshell with Sage environment variables set.  Don't forget
to exit when you are done.  Beware:
 * Do not do anything with other copies of Sage on your system.
 * Do not use this for installing Sage packages using "sage -i" or for
   running "make" at Sage's root directory.  These should be done
   outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/home/wspage/SageMath


(sage-sh) wspage@strix:SageMath$ *cd ~*

(sage-sh) wspage@strix ~ $ *https://github.com/FilipeMaia/afnumpy.git
<https://github.com/FilipeMaia/afnumpy.git>*

(sage-sh) wspage@strix ~ $
*cd ~/afnumpy*
(sage-sh) wspage@strix:afnumpy$ *pip install .*
Processing /home/wspage/afnumpy
Requirement already satisfied (use --upgrade to upgrade): arrayfire in
/home/wspage/SageMath/local/lib/python2.7/site-packages/arrayfire-3.4.0-py2.7.egg
(from afnumpy==1.0)
Requirement already satisfied (use --upgrade to upgrade): numpy in
/home/wspage/SageMath/local/lib/python2.7/site-packages (from afnumpy==1.0)
Installing collected packages: afnumpy
  Running setup.py install for afnumpy ... done
Successfully installed afnumpy-1.0

(sage-sh) wspage@strix:afnumpy$ *exit*
exit
Exited Sage subshell.

wspage@strix ~/SageMath $ *./sage*
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.3, Release Date: 2016-08-04                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: import afnumpy
sage: A=afnumpy.array([float(x) for x in range(10^6)])
sage: import numpy
sage: B=numpy.array([float(x) for x in range(10^6)])
sage: %%timeit A*A
....: A*A
....:
1000 loops, best of 3: 421 µs per loop
sage: %%timeit B*B
....: B*B
....:
1000 loops, best of 3: 715 µs per loop
sage: exit
Exiting Sage (CPU time 0m11.84s, Wall time 9m52.59s).


On 21 September 2016 at 11:37, Shehzan Mohammed <sheh...@arrayfire.com>
wrote:
> Hi Bill
>
> Unfortunately, I'm not aware of how SageMath packages its external
projects.
> If you can provide information about what you need from our end, I think
the
> problem will be easier to solve.
> Logging the errors here would be a start I guess.
>
> -Shehzan
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to