Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble using on AWS #57

Closed
dela3499 opened this issue Dec 24, 2015 · 10 comments
Closed

Having trouble using on AWS #57

dela3499 opened this issue Dec 24, 2015 · 10 comments

Comments

@dela3499
Copy link
Contributor

I've installed the ArrayFire libraries, pip-installed the python wrapper, and followed the directions on the wiki, but I haven't been able to run any code yet.

When I run af.info(), I get the following:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/arrayfire/device.py", line 32, in info
    safe_call(backend.get().af_info())
  File "/usr/local/lib/python2.7/site-packages/arrayfire/util.py", line 75, in safe_call
    raise RuntimeError(to_str(err_str), af_error)
RuntimeError: ('', 501)

I'm on an AWS g2.2xlarge, with the NVIDIA/Amazon Linux image.

Any debugging advice?

@pavanky
Copy link
Member

pavanky commented Dec 24, 2015

Did you go through this link as part of Post install instructions ? You need to set LD_LIBRARY_PATH to /usr/local/cuda/lib64:/usr/local/cuda/nvvm/lib64

@pavanky pavanky closed this as completed Dec 24, 2015
@dela3499
Copy link
Contributor Author

I did. Perhaps I've just made some dumb mistake like a typographical error. Has anyone else had any trouble?

On Dec 23, 2015, at 7:31 PM, Pavan Yalamanchili notifications@github.com wrote:

Did you go through this link as part of Post install instructions ? You need to set LD_LIBRARY_PATH to /usr/local/cuda/lib64:/usr/local/cuda/nvvm/lib64


Reply to this email directly or view it on GitHub.

@pavanky
Copy link
Member

pavanky commented Dec 24, 2015

@dela3499 Can you echo $LD_LIBRARY_PATH and verify ?

@dela3499
Copy link
Contributor Author

Sure thing. I'll do it first thing tomorrow morning.

On Dec 23, 2015, at 7:44 PM, Pavan Yalamanchili notifications@github.com wrote:

@dela3499 Can you echo $LD_LIBRARY_PATH and verify ?


Reply to this email directly or view it on GitHub.

@dela3499
Copy link
Contributor Author

So, here's what I've got in my bashrc file:

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific aliases and functions
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/nvvm/lib64:/home/ec2-user/arrayfire-3/lib:$LD_LIBRARY_PATH

# without symlink, still doesn't work
# export LD_LIBRARY_PATH=/opt/nvidia/cuda/lib64:/opt/nvidia/cuda/nvvm/lib64:/home/ec2-user/arrayfire-3/lib:$LD_LIBRARY_PATH

My CUDA libraries are in /opt/nvidia/cuda, rather than /usr/local/cuda, so I've put a symbolic link in place with

sudo ln -s /opt/nvidia/cuda /usr/local/cuda

@pavanky
Copy link
Member

pavanky commented Dec 24, 2015

@dela3499 Can you tell me what the output of ldd libafcuda.so from arrayfire-3/lib ?

@dela3499
Copy link
Contributor Author

It looks like I've got the CUDA 6.5 toolkit, and AF needs 7.5. I suppose I just need to install the latest CUDA toolkit?

[ec2-user@ip-172-31-14-119 lib]$ ldd libafcuda.so
    linux-vdso.so.1 =>  (0x00007ffc63592000)
    libcudart.so.7.5 => not found
    libcublas.so.7.5 => not found
    libcusolver.so.7.5 => not found
    libcufft.so.7.5 => not found
    libnvvm.so.3 => not found
    libcuda.so.1 => /usr/lib64/libcuda.so.1 (0x00007fc1fc36a000)
    libforge.so => /home/ec2-user/arrayfire-3/lib/libforge.so (0x00007fc1fc0bd000)
    libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fc1fbd70000)
    libGLU.so.1 => not found
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fc1fba6b000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fc1fb768000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc1fb552000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fc1fb190000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fc1faf8b000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc1fad6f000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fc1fab67000)
    libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fc1fa931000)
    libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fc1fa695000)
    /lib64/ld-linux-x86-64.so.2 (0x0000559111836000)
    libglfw.so.3 => not found
    libnvidia-tls.so.340.32 => /usr/lib64/tls/libnvidia-tls.so.340.32 (0x00007fc1fa491000)
    libnvidia-glcore.so.340.32 => /usr/lib64/libnvidia-glcore.so.340.32 (0x00007fc1f787e000)
    libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fc1f7543000)
    libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fc1f7330000)
    libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fc1f7107000)
    libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fc1f6ee9000)
    libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fc1f6ce6000)
[ec2-user@ip-172-31-14-119 lib64]$ pwd
/opt/nvidia/cuda/lib64
[ec2-user@ip-172-31-14-119 lib64]$ ls
be                   libcudart.so.6.5.14  libcuinj64.so.6.5      libnppc.so         libnpps_static.a
gfec                 libcudart_static.a   libcuinj64.so.6.5.14   libnppc.so.6.5     libnvblas.so
inline               libcufft.so          libculibos.a           libnppc.so.6.5.14  libnvblas.so.6.5
libcublas_device.a   libcufft.so.6.5      libcurand.so           libnppc_static.a   libnvblas.so.6.5.14
libcublas.so         libcufft.so.6.5.14   libcurand.so.6.5       libnppi.so         libnvToolsExt.so
libcublas.so.6.5     libcufft_static.a    libcurand.so.6.5.14    libnppi.so.6.5     libnvToolsExt.so.1
libcublas.so.6.5.14  libcufftw.so         libcurand_static.a     libnppi.so.6.5.14  libnvToolsExt.so.1.0.0
libcublas_static.a   libcufftw.so.6.5     libcusparse.so         libnppi_static.a   libOpenCL.so
libcudadevrt.a       libcufftw.so.6.5.14  libcusparse.so.6.5     libnpps.so         libOpenCL.so.1
libcudart.so         libcufftw_static.a   libcusparse.so.6.5.14  libnpps.so.6.5     stubs
libcudart.so.6.5     libcuinj64.so        libcusparse_static.a   libnpps.so.6.5.14

@pavanky
Copy link
Member

pavanky commented Dec 25, 2015

@dela3499 you can build arrayfire with 6.5 if you cant upgrade cuda.

Additionally, you will also need to set AF_PATH to /opt/arrayfire-3 to get it to pick up the libraries.

I fixed the issue in the python wrapper to not require the path, but it looks like the upstream libraries seem to require it.

@dela3499
Copy link
Contributor Author

Thanks for the help!

@pavanky
Copy link
Member

pavanky commented Dec 25, 2015

@dela3499 btw I am going to update the package in an hour or so that should fix some of the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants