Code Monkey home page Code Monkey logo

Comments (10)

anjaliagarwal8 avatar anjaliagarwal8 commented on May 28, 2024 1

Finally I was able to run cudamat in my system going through all the fixes mentioned in the issues. I wrote all the errors I got and the fixes I tried here https://github.com/anjaliagarwal8/Sleep-Scoring/blob/main/Cudamat%20Installation.pdf

from cudamat.

f0k avatar f0k commented on May 28, 2024

Then I also use the pip install http://github.com/f0k/cudamat/archive/simplify-compile.zip.

Thank you, that's what I would have asked!

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe -O -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include -c cudamat/cudamat.cu -o build\temp.win-amd64-3.6\Release\cudamat/cudamat.obj -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include
nvcc fatal : '-IC:\Users\Verfahrenstechnik\Anaconda3\include': expected a number

Hmm, this is interesting. The -O should have been followed by a number.
Investigating, this is something that was carried over from the original Makefile: https://github.com/cudamat/cudamat/blob/3803b3b4905403b9f00de742b98917389890cb00/Makefile
So it's still here: f0k@393e1ec#diff-2eeaed663bd0d25b7e608891384b7298R58

Can you download http://github.com/f0k/cudamat/archive/simplify-compile.zip, extract it, edit the file setup.py so it says -O3 instead of -O, and then open the directory in a terminal and run pip install .? I will try to figure out if this is something that has only changed in a recent version of nvcc, or something that should never have worked anyway.

from cudamat.

f0k avatar f0k commented on May 28, 2024

I will try to figure out if this is something that has only changed in a recent version of nvcc, or something that should never have worked anyway.

It seems that gcc allows -O without any optimization level, but maybe not others, or nvcc checks itself. I've added -O3 to the branch. Can you just try pip install https://github.com/f0k/cudamat/archive/simplify-compile.zip again? No need to download and adapt it.

from cudamat.

zerodrying avatar zerodrying commented on May 28, 2024

It doesnot support on the latest version.

PS>pip install https://github.com/f0k/cudamat/archive/simplify-compile.zip
Collecting https://github.com/f0k/cudamat/archive/simplify-compile.zip
  Downloading https://github.com/f0k/cudamat/archive/simplify-compile.zip
     / 532kB 1.6MB/s
Building wheels for collected packages: cudamat
  Building wheel for cudamat (setup.py) ... error
  Complete output from command C:\Users\Verfahrenstechnik\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\VERFAH~1\\AppData\\Local\\Temp\\pip-req-build-0gnbmjs9\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\VERFAH~1\AppData\Local\Temp\pip-wheel-iqh36abg --python-tag cp36:
  C:\Users\VERFAH~1\AppData\Local\Temp\pip-req-build-0gnbmjs9\setup.py:23: UserWarning: MSVC (cl.exe) not found on PATH. Compilation may fail. Either set PATH to include the path to MSVC, or set NVCCFLAGS=--compiler-bindir=... to define it. Possibly also set NVCCFLAGS=--cl-version=2010 to override nvcc's MSVC version detection.
    warnings.warn("MSVC (cl.exe) not found on PATH. Compilation may "
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\cudamat
  copying cudamat\cudamat.py -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\learn.py -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\__init__.py -> build\lib.win-amd64-3.6\cudamat
  running egg_info
  creating cudamat.egg-info
  writing cudamat.egg-info\PKG-INFO
  writing dependency_links to cudamat.egg-info\dependency_links.txt
  writing top-level names to cudamat.egg-info\top_level.txt
  writing manifest file 'cudamat.egg-info\SOURCES.txt'
  reading manifest file 'cudamat.egg-info\SOURCES.txt'
  writing manifest file 'cudamat.egg-info\SOURCES.txt'
  copying cudamat\cudamat.cu -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\cudamat_kernels.cu -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\learn.cu -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\learn_kernels.cu -> build\lib.win-amd64-3.6\cudamat
  copying cudamat\rnd_multipliers_32bit.txt -> build\lib.win-amd64-3.6\cudamat
  running build_ext
  building 'cudamat.libcudamat' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\cudamat
  C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe -O3 -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include -c cudamat/cudamat.cu -o build\temp.win-amd64-3.6\Release\cudamat/cudamat.obj -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include
  nvcc fatal   : Cannot find compiler 'cl.exe' in PATH
  error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\nvcc.exe' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cudamat
  Running setup.py clean for cudamat
Failed to build cudamat
Installing collected packages: cudamat
  Running setup.py install for cudamat ... error
    Complete output from command C:\Users\Verfahrenstechnik\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\VERFAH~1\\AppData\\Local\\Temp\\pip-req-build-0gnbmjs9\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\VERFAH~1\AppData\Local\Temp\pip-record-i8jdhm47\install-record.txt --single-version-externally-managed --compile:
    C:\Users\VERFAH~1\AppData\Local\Temp\pip-req-build-0gnbmjs9\setup.py:23: UserWarning: MSVC (cl.exe) not found on PATH. Compilation may fail. Either set PATH to include the path to MSVC, or set NVCCFLAGS=--compiler-bindir=... to define it. Possibly also set NVCCFLAGS=--cl-version=2010 to override nvcc's MSVC version detection.
      warnings.warn("MSVC (cl.exe) not found on PATH. Compilation may "
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\cudamat
    copying cudamat\cudamat.py -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\learn.py -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\__init__.py -> build\lib.win-amd64-3.6\cudamat
    running egg_info
    writing cudamat.egg-info\PKG-INFO
    writing dependency_links to cudamat.egg-info\dependency_links.txt
    writing top-level names to cudamat.egg-info\top_level.txt
    reading manifest file 'cudamat.egg-info\SOURCES.txt'
    writing manifest file 'cudamat.egg-info\SOURCES.txt'
    copying cudamat\cudamat.cu -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\cudamat_kernels.cu -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\learn.cu -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\learn_kernels.cu -> build\lib.win-amd64-3.6\cudamat
    copying cudamat\rnd_multipliers_32bit.txt -> build\lib.win-amd64-3.6\cudamat
    running build_ext
    building 'cudamat.libcudamat' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\cudamat
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe -O3 -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include -c cudamat/cudamat.cu -o build\temp.win-amd64-3.6\Release\cudamat/cudamat.obj -IC:\Users\Verfahrenstechnik\Anaconda3\include -IC:\Users\Verfahrenstechnik\Anaconda3\include
    nvcc fatal   : Cannot find compiler 'cl.exe' in PATH
    error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\nvcc.exe' failed with exit status 1

    ----------------------------------------
Command "C:\Users\Verfahrenstechnik\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\VERFAH~1\\AppData\\Local\\Temp\\pip-req-build-0gnbmjs9\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\VERFAH~1\AppData\Local\Temp\pip-record-i8jdhm47\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\VERFAH~1\AppData\Local\Temp\pip-req-build-0gnbmjs9\
(base) PS>

from cudamat.

f0k avatar f0k commented on May 28, 2024

Did you see the UserWarning?

UserWarning: MSVC (cl.exe) not found on PATH. Compilation may fail. Either set PATH to include the path to MSVC, or set NVCCFLAGS=--compiler-bindir=... to define it. Possibly also set NVCCFLAGS=--cl-version=2010 to override nvcc's MSVC version detection.

The shell you started this from does not have MSVC on its PATH. I think you will have to use the command prompt installed by MSVC, or follow the hints and update the PATH or NVCCFLAGS environment variable for this shell before running pip install. If you didn't install MSVC, then nvcc will not be able to compile anything at all. I've painfully figured out the steps for Windows 7 some time ago (https://github.com/Lasagne/Lasagne/wiki/From-Zero-to-Lasagne-on-Windows-7-(64-bit)#nvidia-gpu-support-cuda), this may help or not. Any guide for getting nvcc to run under Windows should work. Let me know if you can get it to work, and what was needed!

from cudamat.

anjaliagarwal8 avatar anjaliagarwal8 commented on May 28, 2024

Hi
I got the same error and tried cuda-simplify-compile setup. My earlier error was resolved but I am getting this other error now.

running install
F:/BCI/GenzelLab/mouseSleepAnalysis-master/cudamat-simplify-compile/cudamat-simplify-compile/setup.py:54: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
shared_lib_extension = sysconfig.get_config_var('SO')
running bdist_egg
running egg_info
creating cudamat.egg-info
writing cudamat.egg-info\PKG-INFO
writing dependency_links to cudamat.egg-info\dependency_links.txt
writing top-level names to cudamat.egg-info\top_level.txt
writing manifest file 'cudamat.egg-info\SOURCES.txt'
reading manifest file 'cudamat.egg-info\SOURCES.txt'
writing manifest file 'cudamat.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\cudamat
copying cudamat\cudamat.py -> build\lib.win-amd64-3.7\cudamat
copying cudamat\learn.py -> build\lib.win-amd64-3.7\cudamat
copying cudamat_init_.py -> build\lib.win-amd64-3.7\cudamat
copying cudamat\cudamat.cu -> build\lib.win-amd64-3.7\cudamat
copying cudamat\cudamat_kernels.cu -> build\lib.win-amd64-3.7\cudamat
copying cudamat\learn.cu -> build\lib.win-amd64-3.7\cudamat
copying cudamat\learn_kernels.cu -> build\lib.win-amd64-3.7\cudamat
copying cudamat\rnd_multipliers_32bit.txt -> build\lib.win-amd64-3.7\cudamat
running build_ext
building 'cudamat.libcudamat' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\cudamat
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe -O3 -IC:\Users\Anjali\Anaconda3\include -IC:\Users\Anjali\Anaconda3\include -c cudamat/cudamat.cu -o build\temp.win-amd64-3.7\Release\cudamat/cudamat.obj --compiler-bindir "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin" -IC:\Users\Anjali\Anaconda3\include -IC:\Users\Anjali\Anaconda3\include
An exception has occurred, use %tb to see the full traceback.

SystemExit: error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe' failed with exit status 1

Can you please help me resolve it?

from cudamat.

f0k avatar f0k commented on May 28, 2024

An exception has occurred, use %tb to see the full traceback.

Can you figure out how to get this traceback? That would probably help pinpoint the problem.

from cudamat.

anjaliagarwal8 avatar anjaliagarwal8 commented on May 28, 2024

This is the traceback:

Traceback (most recent call last):

File "", line 1, in
runfile('F:/BCI/GenzelLab/mouseSleepAnalysis-master/cudamat-simplify-compile/cudamat-simplify-compile/setup.py', args='install', wdir='F:/BCI/GenzelLab/mouseSleepAnalysis-master/cudamat-simplify-compile/cudamat-simplify-compile')

File "C:\Users\Anjali\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "C:\Users\Anjali\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "F:/BCI/GenzelLab/mouseSleepAnalysis-master/cudamat-simplify-compile/cudamat-simplify-compile/setup.py", line 100, in
url="https://github.com/cudamat/cudamat",

File "C:\Users\Anjali\Anaconda3\lib\site-packages\setuptools_init_.py", line 145, in setup
return distutils.core.setup(**attrs)

File "C:\Users\Anjali\Anaconda3\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))

SystemExit: error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe' failed with exit status 1

Thank you @f0k

from cudamat.

Createuniverse avatar Createuniverse commented on May 28, 2024

hello! Respondent, nice to ask a question here!
I‘ve experienced the same question like the first one above
I've updated the PATH to cl.exe
There're 4 pathes to cl.exe, and I added them all to th PATH
__D:\VisualStudio2019\VisualStudio2019IDE\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86
D:\VisualStudio2019\VisualStudio2019IDE\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x64
D:\VisualStudio2019\VisualStudio2019IDE\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86
D:\VisualStudio2019\VisualStudio2019IDE\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
And the pathes are correct.
But it doesn't work.
It couldn't install like before.

**nvcc -O3 -ID:\Python3.9\include -ID:\Python3.9\include -c cudamat/cudamat.cu -o build\temp.win-amd64-3.9\Release\cudamat/cudamat.obj -ID:\Python3.9\include -ID:\Python3.9\include
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\bin\nvcc.exe' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> cudamat**

Then how could I solve it......

from cudamat.

anjaliagarwal8 avatar anjaliagarwal8 commented on May 28, 2024

Could you check if the path you are adding does have cl.exe file inside? For me it was inside the bin folder.

from cudamat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.