brktrksvr / pyrit

Automatically exported from code.google.com/p/pyrit
0 stars 0 forks source link

Does pyrit svn r308 support cuda-6.0 ? #450

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Installing cuda-6.0

Distro Debian 7.1 x86
Nvidia 304.117

Have instaled cuda 6 in /usr/local/cuda-6.0 and have simlink /usr/local/cuda/
What version of the product are you using? On what operating system?
I tried both pyrit-0.4.0 and pyrit_svn

Please provide any additional information below.
First I make simlink to /usr/local/cuda-6.0/lib/libcudart.so.6.0.37 > 
/usr/lib/libcuda.so
and to /usr/local/cuda-6.0/lib/libcudadevrt.a /usr/lib/libcuda.a

Soo when I build it it seam that there is error -> option 'host-compilation' 
has been deprecated and is ignored

pyrit_svn/cpyrit_cuda$ python setup.py build
running build
running build_ext
Compiling CUDA module using nvcc 6.0, V6.0.1...
Executing '/usr/local/cuda/bin/nvcc -m32 --host-compilation C -Xcompiler 
"-fPIC" --ptx ./_cpyrit_cudakernel.cu'
nvcc warning : option 'host-compilation' has been deprecated and is ignored
nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and 
may be removed in a future release.
Building modules...
building 'cpyrit._cpyrit_cuda' extension
creating build
creating build/temp.linux-i686-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -I/usr/local/cuda/include -I/usr/include/python2.7 -c 
_cpyrit_cuda.c -o build/temp.linux-i686-2.7/_cpyrit_cuda.o -Wall 
-fno-strict-aliasing -DVERSION="0.4.1-dev (svn r308)"
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/cpyrit
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro 
build/temp.linux-i686-2.7/_cpyrit_cuda.o -lcrypto -lcuda -lz -o 
build/lib.linux-i686-2.7/cpyrit/_cpyrit_cuda.so

So pyrit does not detect my GPU 8800GT so I run

python -c 'from cpyrit import _cpyrit_cuda'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/dist-packages/cpyrit/_cpyrit_cuda.so: 
undefined symbol: cuMemcpyHtoD_v2

Any sugestion that could help ? Cheers 

Original issue reported on code.google.com by vidovic....@gmail.com on 27 May 2014 at 2:07

GoogleCodeExporter commented 8 years ago
change the PATH= and add these lines to the end (after the last fi) so it looks 
like this:
try it...

add lines in /root/.bashrc:

PATH=$PATH:/usr/local/cuda/bin
CUDA_INSTALL_PATH="/usr/local/cuda"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib
export PATH
export CUDA_INSTALL_PATH
export LD_LIBRARY_PATH

exit nano and save changes.

source /root/.bashrc
ldconfig

Then follow :

Check NVIDIA compiler:

root@bt:~# which nvcc
/usr/local/cuda/bin/nvcc
root@bt:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Thu_May_12_11:09:45_PDT_2011
Cuda compilation tools, release 4.0, V0.2.1221

Setup pyrit

Setup pyrit dependent packages:

root@bt:~# apt-get install libssl-dev
root@bt:~# apt-get install scapy
root@bt:~# apt-get install python-dev

Check out Pyrit SVN trunk:

root@bt:~# svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit

Build Pyrit:

root@bt:~# cd pyrit/pyrit/
root@bt:~/pyrit/pyrit# python setup.py build
root@bt:~/pyrit/pyrit# python setup.py install

Test Pyrit:

root@bt:~/pyrit/pyrit# pyrit list_cores
Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

The following cores seem available...
#1: 'CPU-Core (SSE2)'
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'
#5: 'CPU-Core (SSE2)'
#6: 'CPU-Core (SSE2)'

#7: 'CPU-Core (SSE2)'
#8: 'CPU-Core (SSE2)'

Setup CUDA for Pyrit

Build CUDA for Pyrit:

root@bt:~/pyrit/pyrit# cd ../cpyrit_cuda/
root@bt:~/pyrit/cpyrit_cuda# python setup.py build
root@bt:~/pyrit/cpyrit_cuda# python setup.py install

Original comment by deltomaf...@gmail.com on 28 May 2014 at 12:45