JeanLucPons / Kangaroo

Pollard's kangaroo for SECPK1
GNU General Public License v3.0
246 stars 177 forks source link

GPU code not compiled, use -DWITHGPU when compiling. No CPU or GPU thread, exiting. #117

Open rage0920 opened 11 months ago

rage0920 commented 11 months ago

tried compiling it on my ubantu changed the changed the make to my versions

CXX        = g++
 43 CUDA       = /usr/local/cuda-12
 44 CXXCUDA    = /usr/bin/g++-11
 45 NVCC       = $(CUDA)/bin/nvcc

gives this

g++ obj/SECPK1/IntGroup.o obj/main.o obj/SECPK1/Random.o obj/Timer.o obj/SECPK1/Int.o obj/SECPK1/IntMod.o obj/SECPK1/Point.o obj/SECPK1/SECP256K1.o obj/Kangaroo.o obj/HashTable.o obj/Thread.o obj/Check.o obj/Backup.o obj/Network.o obj/Merge.o obj/PartMerge.o -lpthread -o kangaroo
root@a559fc7a93fd:/workspace/Kangaroo# make gpu=1 ccap=89 all
cd obj &&       mkdir -p SECPK1
cd obj && mkdir -p GPU
/usr/local/cuda-12/bin/nvcc -maxrregcount=0 --ptxas-options=-v --compile --compiler-options -fPIC -ccbin /usr/bin/g++-11 -m64 -O2 -I/usr/local/cuda-12/include -gencode=arch=compute_89,code=sm_89 -o obj/GPU/GPUEngine.o -c GPU/GPUEngine.cu
ptxas info    : 0 bytes gmem, 2560 bytes cmem[3]
ptxas info    : Compiling entry function '_Z14comp_kangaroosPmjPjm' for 'sm_89'
ptxas info    : Function properties for _Z14comp_kangaroosPmjPjm
    18560 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 98 registers, 384 bytes cmem[0]
ptxas info    : Function properties for _Z14_ModInvGroupedPA4_m
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Function properties for _Z7_ModInvPm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
Making Kangaroo...
g++ obj/SECPK1/IntGroup.o obj/main.o obj/SECPK1/Random.o obj/Timer.o obj/SECPK1/Int.o obj/SECPK1/IntMod.o obj/SECPK1/Point.o obj/SECPK1/SECP256K1.o obj/GPU/GPUEngine.o obj/Kangaroo.o obj/HashTable.o obj/Thread.o obj/Backup.o obj/Check.o obj/Network.o obj/Merge.o obj/PartMerge.o -lpthread -L/usr/local/cuda-12/lib64 -lcudart -o kangaroo

when i say make gpu=1 ccap=89 all how do i fix it anyone ?

Chail35 commented 8 months ago

If you just delete the version number after “Cuda” and after g++ it’ll automatically use the version installed on your system.

It should look like this:

CXX = g++ 43 CUDA = /usr/local/cuda 44 CXXCUDA = /usr/bin/g++ 45 NVCC = $(CUDA)/bin/nvcc

iateadonut commented 7 months ago

if you at first created a makefile incorrectly, try removing all the source code, clone, and then try again