JuliaAttic / CUDArt.jl

Julia wrapper for CUDA runtime API
Other
79 stars 29 forks source link

CUDArt should not rely on `nvidia-smi` or `nvml` on Mac OSX #83

Closed dlfivefifty closed 7 years ago

dlfivefifty commented 7 years ago

This is on master for CUDArt:

julia> versioninfo()
Julia Version 0.6.0-pre.beta.437
Commit 552626cc97 (2017-04-30 05:06 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.5.0)
  CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
  WORD_SIZE: 64
  BLAS: libgfortblas
  LAPACK: liblapack
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)

julia> Pkg.build("CUDArt")
INFO: Building CUDAdrv
INFO: CUDAdrv.jl has already been built for this CUDA library, no need to rebuild.
INFO: Building CUDArt
WARNING: NVML not found, resorting to nvidia-smi
===============================[ ERROR: CUDArt ]================================

LoadError: could not spawn `nvidia-smi`: no such file or directory (ENOENT)
while loading /Users/solver/.julia/v0.6/CUDArt/deps/build.jl, in expression starting on line 366

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: CUDArt had build errors.

 - packages with build errors remain installed in /Users/solver/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("CUDArt")`
 - build a single package by running its `deps/build.jl` script

================================================================================
musm commented 7 years ago

Is this master CUDArt? Try checking out master and deleting "ext.jl"

dlfivefifty commented 7 years ago

Where's ext.jl?

musm commented 7 years ago

Pkg.dir("CUDArt") and then in the "deps" folder

dlfivefifty commented 7 years ago

There is no “ext.jl” file there. I tried deleting and re-adding CUDArt without success

On 5 May 2017, at 8:42 am, Mus M notifications@github.com wrote:

Pkg.dir("CUDArt") and then in the "deps" folder

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaGPU/CUDArt.jl/issues/83#issuecomment-299329339, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLDqZnEu2K1nBPZGQr7-MQ-4Lr8JMF3ks5r2lRCgaJpZM4NQdt6.

musm commented 7 years ago

are you on master? Pkg.checkout("CUDArt")?

dlfivefifty commented 7 years ago

yes

On 5 May 2017, at 9:11 am, Mus M notifications@github.com wrote:

are you on master? Pkg.checkout("CUDArt")?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaGPU/CUDArt.jl/issues/83#issuecomment-299334015, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLDqU35mbeWIx9RcGYMUODM69TlW9Vhks5r2lsTgaJpZM4NQdt6.

musm commented 7 years ago

I think line 166 needs to be instead

    try
        success(`$nvidiasmi`)
    catch
        nvidiasmi = ""
        warn("nvidia-smi failure")
    end
musm commented 7 years ago

https://github.com/JuliaGPU/CUDArt.jl/pull/84 should fix this

dlfivefifty commented 7 years ago

I checked out #84 but still get an error:

julia> Pkg.build("CUDArt")
INFO: Building CUDAdrv
INFO: Building CUDArt
WARNING: NVML not found, resorting to nvidia-smi
WARNING: nvidia-smi failure
===============================[ ERROR: CUDArt ]================================

LoadError: NVML nor nvidia-smi can be found.
while loading /Users/solver/.julia/v0.6/CUDArt/deps/build.jl, in expression starting on line 368

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: CUDArt had build errors.

 - packages with build errors remain installed in /Users/solver/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("CUDArt")`
 - build a single package by running its `deps/build.jl` script

================================================================================
musm commented 7 years ago

84 fixes the spawn error. Do u have the cuda drivers and library installed

musm commented 7 years ago

https://developer.nvidia.com/cuda-downloads

dlfivefifty commented 7 years ago

Yes:

[Macintosh-3:~] solver% find /usr/local/cuda
/usr/local/cuda
/usr/local/cuda/bin
/usr/local/cuda/CUDA_Toolkit_Release_Notes.txt
/usr/local/cuda/doc
/usr/local/cuda/EULA.txt
/usr/local/cuda/extras
/usr/local/cuda/include
/usr/local/cuda/jre
/usr/local/cuda/lib
/usr/local/cuda/lib/libcublas.8.0.dylib
/usr/local/cuda/lib/libcublas.dylib
/usr/local/cuda/lib/libcublas_device.a
/usr/local/cuda/lib/libcublas_static.a
/usr/local/cuda/lib/libcuda.dylib
/usr/local/cuda/lib/libcudadevrt.a
/usr/local/cuda/lib/libcudart.8.0.dylib
/usr/local/cuda/lib/libcudart.dylib
/usr/local/cuda/lib/libcudart_static.a
/usr/local/cuda/lib/libcufft.8.0.dylib
/usr/local/cuda/lib/libcufft.dylib
/usr/local/cuda/lib/libcufft_static.a
/usr/local/cuda/lib/libcufftw.8.0.dylib
/usr/local/cuda/lib/libcufftw.dylib
/usr/local/cuda/lib/libcufftw_static.a
/usr/local/cuda/lib/libcuinj.8.0.dylib
/usr/local/cuda/lib/libcuinj.dylib
/usr/local/cuda/lib/libculibos.a
/usr/local/cuda/lib/libcurand.8.0.dylib
/usr/local/cuda/lib/libcurand.dylib
/usr/local/cuda/lib/libcurand_static.a
/usr/local/cuda/lib/libcusolver.8.0.dylib
/usr/local/cuda/lib/libcusolver.dylib
/usr/local/cuda/lib/libcusolver_static.a
/usr/local/cuda/lib/libcusparse.8.0.dylib
/usr/local/cuda/lib/libcusparse.dylib
/usr/local/cuda/lib/libcusparse_static.a
/usr/local/cuda/lib/libnppc.8.0.dylib
/usr/local/cuda/lib/libnppc.dylib
/usr/local/cuda/lib/libnppc_static.a
/usr/local/cuda/lib/libnppi.8.0.dylib
/usr/local/cuda/lib/libnppi.dylib
/usr/local/cuda/lib/libnppi_static.a
/usr/local/cuda/lib/libnppial.8.0.dylib
/usr/local/cuda/lib/libnppial.dylib
/usr/local/cuda/lib/libnppial_static.a
/usr/local/cuda/lib/libnppicc.8.0.dylib
/usr/local/cuda/lib/libnppicc.dylib
/usr/local/cuda/lib/libnppicc_static.a
/usr/local/cuda/lib/libnppicom.8.0.dylib
/usr/local/cuda/lib/libnppicom.dylib
/usr/local/cuda/lib/libnppicom_static.a
/usr/local/cuda/lib/libnppidei.8.0.dylib
/usr/local/cuda/lib/libnppidei.dylib
/usr/local/cuda/lib/libnppidei_static.a
/usr/local/cuda/lib/libnppif.8.0.dylib
/usr/local/cuda/lib/libnppif.dylib
/usr/local/cuda/lib/libnppif_static.a
/usr/local/cuda/lib/libnppig.8.0.dylib
/usr/local/cuda/lib/libnppig.dylib
/usr/local/cuda/lib/libnppig_static.a
/usr/local/cuda/lib/libnppim.8.0.dylib
/usr/local/cuda/lib/libnppim.dylib
/usr/local/cuda/lib/libnppim_static.a
/usr/local/cuda/lib/libnppist.8.0.dylib
/usr/local/cuda/lib/libnppist.dylib
/usr/local/cuda/lib/libnppist_static.a
/usr/local/cuda/lib/libnppisu.8.0.dylib
/usr/local/cuda/lib/libnppisu.dylib
/usr/local/cuda/lib/libnppisu_static.a
/usr/local/cuda/lib/libnppitc.8.0.dylib
/usr/local/cuda/lib/libnppitc.dylib
/usr/local/cuda/lib/libnppitc_static.a
/usr/local/cuda/lib/libnpps.8.0.dylib
/usr/local/cuda/lib/libnpps.dylib
/usr/local/cuda/lib/libnpps_static.a
/usr/local/cuda/lib/libnvblas.8.0.dylib
/usr/local/cuda/lib/libnvblas.dylib
/usr/local/cuda/lib/libnvgraph.8.0.dylib
/usr/local/cuda/lib/libnvgraph.dylib
/usr/local/cuda/lib/libnvgraph_static.a
/usr/local/cuda/lib/libnvrtc-builtins.8.0.dylib
/usr/local/cuda/lib/libnvrtc-builtins.dylib
/usr/local/cuda/lib/libnvrtc.8.0.dylib
/usr/local/cuda/lib/libnvrtc.dylib
/usr/local/cuda/lib/libnvToolsExt.1.dylib
/usr/local/cuda/lib/libnvToolsExt.dylib
/usr/local/cuda/lib/stubs
/usr/local/cuda/libnsight
/usr/local/cuda/libnvvp
/usr/local/cuda/nvvm
/usr/local/cuda/samples
/usr/local/cuda/src
/usr/local/cuda/tools
/usr/local/cuda/version.txt
[Macintosh-3:~] solver% 
musm commented 7 years ago

And I suppose typing nvidia-smi in the terminal gives nothing?

dlfivefifty commented 7 years ago

yes. I'm trying to reinstall from the link you sent. Maybe the brew cask install cuda didn't install everything?

musm commented 7 years ago

We really need to find where the lib Libnvidia-ml resides

musm commented 7 years ago

Check ls /usr/lib/nvidia-370 or nvidia-### where the last three are numbers

dlfivefifty commented 7 years ago

Nothing there at the moment, but I'm still waiting for the re-install to finish.

I'm a bit perplexed at the CUDA installer. What's the point of an installer that doesn't state what's installed, in a location that's also not stated?

dlfivefifty commented 7 years ago

I'm beginning to suspect that GPU's don't actually exist, and this whole "Computing on the GPU" thing is a massive fraud 😛

dlfivefifty commented 7 years ago

OK the installation finished, I don't see any files you've mentioned but there's a new install location:

[Macintosh-3:/Developer/NVIDIA/CUDA-8.0] solver% find /Developer/NVIDIA/CUDA-8.0/lib
/Developer/NVIDIA/CUDA-8.0/lib
/Developer/NVIDIA/CUDA-8.0/lib/libcublas.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcublas.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcublas_device.a
/Developer/NVIDIA/CUDA-8.0/lib/libcublas_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcudadevrt.a
/Developer/NVIDIA/CUDA-8.0/lib/libcudart.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcudart.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcudart_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcufft.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcufft.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcufft_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcufftw.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcufftw.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcufftw_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcuinj.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcuinj.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libculibos.a
/Developer/NVIDIA/CUDA-8.0/lib/libcurand.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcurand.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcurand_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcusolver.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcusolver.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcusolver_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libcusparse.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcusparse.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libcusparse_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppc.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppc.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppc_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppi.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppi.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppi_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppial.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppial.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppial_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppicc.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppicc.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppicc_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppicom.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppicom.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppicom_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppidei.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppidei.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppidei_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppif.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppif.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppif_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppig.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppig.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppig_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppim.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppim.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppim_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppist.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppist.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppist_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppisu.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppisu.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppisu_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnppitc.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppitc.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnppitc_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnpps.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnpps.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnpps_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnvblas.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvblas.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvgraph.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvgraph.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvgraph_static.a
/Developer/NVIDIA/CUDA-8.0/lib/libnvrtc-builtins.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvrtc-builtins.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvrtc.8.0.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvrtc.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvToolsExt.1.dylib
/Developer/NVIDIA/CUDA-8.0/lib/libnvToolsExt.dylib
/Developer/NVIDIA/CUDA-8.0/lib/stubs
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/CUDA
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Headers
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/CUDA
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/Headers
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/Headers/cuda.h
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/Headers/cudadebugger.h
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/Headers/cudaGL.h
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/A/Headers/cudaProfiler.h
/Developer/NVIDIA/CUDA-8.0/lib/stubs/CUDA.framework/Versions/Current
musm commented 7 years ago

nvidia-smi and libnvidia-ml should actually come with the nvidia drivers

musm commented 7 years ago

Are your drivers updated ? I searched and some people said updating drivers, fixed the problem : http://www.nvidia.com/Download/index.aspx?lang=en-us you can also try find /usr/ -name libnvidia-ml.* to try and check the folders in usr recursively

dlfivefifty commented 7 years ago

That website doesn't give drivers for OS X...

musm commented 7 years ago

Unfortunately I don't know what else to try, since I'm not familiar with MacOs, hopefully someone else can chime in and suggest a fix

dlfivefifty commented 7 years ago

Thanks anyways. Having just realized that the new MacBook Pro's (which I'll probably purchase soon) are AMD chips, I guess I might give up on this.

musm commented 7 years ago

Have you tried CUDAdrv ?

dlfivefifty commented 7 years ago

CUDAdrv builds fine.

vchuravy commented 7 years ago

I am also not to familiar with Mac's, but musm is right. nvidia-smi is a tool that comes with your driver installation, at least on Windows and Linux... From a cursory google search it seems that nvidia is maybe simply not providing it on Mac... (which would be typical for both Mac and Nvidia).

dlfivefifty commented 7 years ago

I'm confused then why the README says that it's been tested on Mac.

Maybe my machine (2012) is too old though...

vchuravy commented 7 years ago

It is near impossible to setup continuous integration testing for Mac because we depend on special hardware. Some recent PRs slipped through that introduced NVML and nvidia-smi as dependencies.

The problem is that Nvidia Mac support is not the greatest (most modern Macs use AMD).

dlfivefifty commented 7 years ago

Maybe NVML and nvidia-ski should be optional dependencies?

Sent from my iPhone

On 8 May 2017, at 15:32, Valentin Churavy notifications@github.com wrote:

It is near impossible to setup continuous integration testing for Mac because we depend on special hardware. Some recent PRs slipped through that introduced NVML and nvidia-smi as dependencies.

The problem is that Nvidia Mac support is not the greatest (most modern Macs use AMD).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

vchuravy commented 7 years ago

Interestingly enough nvidia-smi is a dependency for the last two years. I guess we have just become better at checking that it actually exist.