KlausT / ccminer

Software for mining various cryptocoins
GNU General Public License v3.0
403 stars 312 forks source link

Neoscrypt not compilable under linux/cuda 8 - working solution is remove SM30 #52

Closed Himan2001 closed 7 years ago

Himan2001 commented 7 years ago

Hi, i got this compiler-error under Ubuntu 14.04 with cuda8:

ptxas /tmp/tmpxft_00004acb_00000000-6_cuda_neoscrypt.compute_30.ptx, line 21682; error   : Instruction 'shf.r' requires .target sm_3        2 or higher
ptxas /tmp/tmpxft_00004acb_00000000-6_cuda_neoscrypt.compute_30.ptx, line 23999; error   : Instruction 'shf.r' requires .target sm_3        2 or higher
ptxas fatal   : Ptx assembly aborted due to errors
make[2]: *** [neoscrypt/cuda_neoscrypt.o] Error 255
make[2]: *** Waiting for unfinished jobs....

The fix for 8.13 and older versions is very simple:

Remove in the last line in makefile.am this part: -gencode=arch=compute_30,code=sm_30

After this fix, the latest 8.13 code compiles fine and is working good under ubuntu Linux

Please consider to remove neoscrypt for SM 3.0

blackjec69 commented 7 years ago

With sm_50 too :(

neoscrypt/neoscrypt.o: In function `scanhash_neoscrypt(bool, int, unsigned int*, unsigned int*, unsigned int, unsigned int*)':

tmpxft_00002e72_00000000-4_neoscrypt.compute_50.cudafe1.cpp:(.text+0x11c): undefined reference to `neoscrypt_setBlockTarget_tpruvot(unsigned int*, unsigned int*)'

tmpxft_00002e72_00000000-4_neoscrypt.compute_50.cudafe1.cpp:(.text+0x171): undefined reference to `neoscrypt_hash_tpruvot(int, unsigned int, unsigned int, unsigned int*, bool)'

tmpxft_00002e72_00000000-4_neoscrypt.compute_50.cudafe1.cpp:(.text+0x52b): undefined reference to `neoscrypt_init(int, unsigned int)'

collect2: error: ld returned 1 exit status

xUbuntu 16.04, CUDA 8.0

Himan2001 commented 7 years ago

The last 3 lines in the makefile.am have no \ at the end, localy i fixed this in 2 lines. The last lines includes some code for neoscrypt. Please check this quickfix.

SM50 must be working on ubuntu, maybe try to compile with gcc-4.8.x to verify.

KlausT commented 7 years ago

Oops. This sometimes happens because I'm not using Linux. The errors should be fixed now.

blackjec69 commented 7 years ago

SM50 must be working on ubuntu, maybe try to compile with gcc-4.8.x to verify.

But 8.11 compile without any errors (with current gcc 5.4.0)

blackjec69 commented 7 years ago

This sometimes happens because I'm not using Linux.

o_O

Yes, I delete folder with 8.13 and clone clear branch "windows" - and it compiled succesfull. Thanks You!

P.S. In file "Makefile.am" doubled lines with neoscrypt - both version (with SM30 and without) present

KlausT commented 7 years ago

Looks like you have bad luck :-) About a minute or two after you cloned the stuff I did a force push. I think I forgot to change the file name after the copy paste

Himan2001 commented 7 years ago

We still have problems with the last 2 lines in the makefile.am:

neoscrypt/cuda_neoscrypt.o:tmpxft_00001359_00000000-4_cuda_neoscrypt_tpruvot.compute_30.cudafe1.cpp:(.text+0xfa0): first defined here neoscrypt/neoscrypt.o: In function `scanhash_neoscrypt(bool, int, unsigned int*, unsigned int*, unsigned int, unsigned int*)': tmpxft_000012b1_00000000-4_neoscrypt.compute_30.cudafe1.cpp:(.text+0x2ec): undefined reference to `neoscrypt_cpu_hash_k4_2stream(bool, int, u nsigned int, unsigned int, unsigned int*)' tmpxft_000012b1_00000000-4_neoscrypt.compute_30.cudafe1.cpp:(.text+0x313): undefined reference to `neoscrypt_setBlockTarget(int, unsigned int *, void const*)' tmpxft_000012b1_00000000-4_neoscrypt.compute_30.cudafe1.cpp:(.text+0x4da): undefined reference to `neoscrypt_cpu_init_2stream(int, unsigned i nt)' collect2: error: ld returned 1 exit status make[2]: *** [ccminer] Error 1 make[2]: Leaving directory `/usr/src/ccminer-windows' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/ccminer-windows' make: *** [all] Error 2

@KlausT: Please check for a "copy & paste" error, again ;-) There is still the "SM30"-compile error on linux. 2 times "neoscrypt/cuda_neoscrypt.o:" makes no sense for me.