Pyrit icon indicating copy to clipboard operation
Pyrit copied to clipboard

Can't do setup.py build in modules/cpyrit-cuda help to solve

Open Andiansyah23 opened this issue 8 years ago • 3 comments

root@0mount:~/Unduhan/pyrit-v0.5.0/modules/cpyrit_cuda# python2 setup.py build
running build
running build_ext
Compiling CUDA module using nvcc 8.0, V8.0.61...
Executing '/usr/local/cuda/bin/nvcc -m64 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
ERROR: No supported gcc/g++ host compiler found, but clang-3.8 is available.
       Use 'nvcc -ccbin clang-3.8' to use that instead.
Traceback (most recent call last):
  File "setup.py", line 169, in <module>
    setup(**setup_args)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 92, in run
    subprocess.check_call(nvcc_cmd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/usr/local/cuda/bin/nvcc -m64 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu' returned non-zero exit status 1

And if i try benchmark test

root@0mount:~/Unduhan/pyrit-v0.5.0/modules/cpyrit_cuda# pyrit benchmark
Pyrit 0.5.0 (C) 2008-2011 Lukas Lueg - 2015 John Mora
https://github.com/JPaulMora/Pyrit
This code is distributed under the GNU General Public License v3+

Running benchmark (1984.4 PMKs/s)... - 

Computed 1984.43 PMKs/s total.
#1: 'CPU-Core (SSE2/AES)': 547.7 PMKs/s (RTT 3.2)
#2: 'CPU-Core (SSE2/AES)': 540.3 PMKs/s (RTT 3.0)
#3: 'CPU-Core (SSE2/AES)': 541.0 PMKs/s (RTT 3.0)
#4: 'CPU-Core (SSE2/AES)': 548.8 PMKs/s (RTT 3.1)
CUDA:
OpenCL:

it is not shown any result for cuda i am using optimus and cannot run optirun pyrit Help me please

Andiansyah23 avatar Nov 23 '17 14:11 Andiansyah23

Hi:

I found the best solution to do it works: Install ubuntu server 17.X, Install pyrit and pyrit-opencl and ubuntu-driver-common apt-get install pyrit pyrit-opencl ubuntu-driver-common Install nvidia-cuda* apt-get install nvidia-cuda* It worked for a lot of nvidia cards except gtx 295. If you want that it works you must install nvidia-340*: apt-get install nvidia 340*

After, reboot, everything work fine : D

Regars Perico

DaniLuMa avatar Nov 26 '17 20:11 DaniLuMa

Hi my friend, I have the same probleme whe I tried to install the pyrit 0.5.1, I don't know why happend this, sorry. Perhaps it is a cause of the old library...

ERROR: No supported gcc/g++ host compiler found, but clang-3.8 is available.

Regards Perico

DaniLuMa avatar Nov 26 '17 20:11 DaniLuMa

Hello @Andiansyah23, try changing the line 88 of Pyrit/modules/cpyrit_cuda/setup.py, specifically replace clang with clang-3.8 and tell me if it works.

The modified line should look like this:

            nvcc_cmd = NVCC + bit_flag + ' -ccbin clang-3.8 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'

JPaulMora avatar Nov 26 '17 22:11 JPaulMora