vehre / neo-gpuminer

GPUminer for neoscrypt based coins like feathercoin, phoenixcoin,...
Other
6 stars 16 forks source link

Cuda 5.5 and run time error #9

Open andrewmilkowski opened 10 years ago

andrewmilkowski commented 10 years ago

Hi Vehre, neo-gpumine compiled successful with the following scrypt: (I am on Centos with Cuda 5.5 toolkit and GTX750 cards)

./autogen.sh # only needed if building from git repo

CFLAGS="-I/usr/local/cuda-5.5/include -O2 -Wall -march=native" LDFLAGS=-L/usr/cuda-5.5/lib64 ./configure --prefix=/opt/local/src/git/neo-gpuminer/dist

make make install

later on following exception occurs:

[2014-10-31 08:14:31] Started cgminer 3.7.7c

[2014-10-31 08:14:31] Started cgminer 3.7.7c [2014-10-31 08:14:31] Probing for an alive pool [2014-10-31 08:14:31] Pool 0 difficulty changed to 32 [2014-10-31 08:14:33] Error -11: Building Program (clBuildProgram) [2014-10-31 08:14:33] :647:16: error: attribute requires 1 argument(s) attribute((reqd_work_group_size(WORKGROUPSIZE, 1, 1))) ^ :666:22: error: use of undeclared identifier 'MAX_GLOBAL_THREADS' (get_global_id(0)% MAX_GLOBAL_THREADS)];

[2014-10-31 08:14:33] Failed to init GPU thread 0, disabling device 0 [2014-10-31 08:14:33] Restarting the GPU from the menu will not fix this. [2014-10-31 08:14:33] Try restarting cgminer.

vehre commented 10 years ago

Please make sure, that /usr/cuda-5.5/lib64 is first in the LD_LIBRARY_PATH env variable or the /etc/ld.so.conf so not to confuse the opencl libraries from nvidia and other vendors. To help figure that do a ldd cgminer and look for the opencl libraries used.

Also check that configure does not report any missing files/features.

If that did not help, reclone the git in a fresh directory to make sure everything is uptodate. The error-message you are seeing is from the current cl-kernel, so that should work very fine.

andrewmilkowski commented 10 years ago

Thanks Vehre.. did this

below shows OpenCL pointing in /usr/lib64

ldd cgminer | grep libOpenCL.so libOpenCL.so.1 => /usr/lib64/libOpenCL.so.1 (0x00007fb7bc94a000)

Note that Cuda lib64 folder does not contain libOpenCL

ls /usr/local/cuda-5.5/lib64 libcublas_device.a libcudart_static.a libcuinj64.so.5.5 libnppc.so libnpps.so.5.5.22 libcublas.so libcufft.so libcuinj64.so.5.5.22 libnppc.so.5.5 libnvToolsExt.so libcublas.so.5.5 libcufft.so.5.5 libcurand.so libnppc.so.5.5.22 libnvToolsExt.so.1 libcublas.so.5.5.22 libcufft.so.5.5.22 libcurand.so.5.5 libnppi.so libnvToolsExt.so.1.0.0 libcudadevrt.a libcufftw.so libcurand.so.5.5.22 libnppi.so.5.5 libcudart.so libcufftw.so.5.5 libcusparse.so libnppi.so.5.5.22 libcudart.so.5.5 libcufftw.so.5.5.22 libcusparse.so.5.5 libnpps.so libcudart.so.5.5.22 libcuinj64.so libcusparse.so.5.5.22 libnpps.so.5.5

then I put LD_LIBRARY_PATH (regardless as ldd show correct path)

CUDA_HOME=/usr/local/cuda-5.5 export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/lib:$LD_LIBRARY_PATH

and... same error...

so the question is libOpenCL.so.1 => /usr/lib64/libOpenCL.so.1 (0x00007fb7bc94a000) very likely contains incompatible opencl library which came with cuda 5.5 , do you know how to verify this ?

andrewmilkowski commented 10 years ago

However cuda 6.5 toolkit has libOpenCL.so in that folder, switching as we speak, will let you know!

/usr/local/cuda-6.5/lib64 [amilkowski@localhost lib64]$ ls libcublas_device.a libcufft.so libcuinj64.so.6.5.14 libnppc.so libnpps.so.6.5.14 libcublas.so libcufft.so.6.5 libculibos.a libnppc.so.6.5 libnpps_static.a libcublas.so.6.5 libcufft.so.6.5.14 libcurand.so libnppc.so.6.5.14 libnvblas.so libcublas.so.6.5.14 libcufft_static.a libcurand.so.6.5 libnppc_static.a libnvblas.so.6.5 libcublas_static.a libcufftw.so libcurand.so.6.5.14 libnppi.so libnvblas.so.6.5.14 libcudadevrt.a libcufftw.so.6.5 libcurand_static.a libnppi.so.6.5 libnvToolsExt.so libcudart.so libcufftw.so.6.5.14 libcusparse.so libnppi.so.6.5.14 libnvToolsExt.so.1 libcudart.so.6.5 libcufftw_static.a libcusparse.so.6.5 libnppi_static.a libnvToolsExt.so.1.0.0 libcudart.so.6.5.14 libcuinj64.so libcusparse.so.6.5.14 libnpps.so libOpenCL.so libcudart_static.a libcuinj64.so.6.5 libcusparse_static.a libnpps.so.6.5 stubs

andrewmilkowski commented 10 years ago

nope...

  1. fresh git clone
  2. compile

CUDA_HOME=/usr/local/cuda-6.5 export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/lib:$LD_LIBRARY_PATH

./autogen.sh # only needed if building from git repo

CFLAGS="-I/usr/local/cuda-6.5/include -O2 -Wall -march=native" LDFLAGS=-L/usr/local/cuda-6.5/lib64 ./configure --prefix=/opt/local/src/git/neo-gpuminer/dist

make make install

  1. ldd cgminer | grep Open libOpenCL.so.1 => not found
  2. run with LD_LIBRARY_PATH pointing to cuda 6.5

!/bin/sh

trap "kill -- -$$" EXIT

CUDA_HOME=/usr/local/cuda-6.5 export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/lib:$LD_LIBRARY_PATH

CGMINER_HOME=/opt/local/src/git/neo-gpuminer/dist/bin

export DISPLAY=:0 export GPU_MAX_ALLOC_PERCENT=100 export GPU_USE_SYNC_OBJECTS=1

export THREAD_CONCURRENCY=7680 export INTENSITY=12 export GPU_THREADS=2 export WORKSIZE=256 export LOOKUP_GAP=2

export GPU_ENGINE=1100 export GPU_MEMCLOCK=1600 export TEMP_TARGET=80

$CGMINER_HOME/cgminer -w 128 -l 15 -g 1 -I 17 -k neoscrypt --no-submit-stale -o ....

same error..

even opencl.so that comes with latest cuda 6.5 is incompatible.. it seems

vehre commented 10 years ago

-k neoscrypt is invalid. That needs to be --neoscrypt, but neoscrypt is selected by default, if you don't build with scrypt or other support.

andrewmilkowski commented 10 years ago

changing to --neoscrypt worked like a charm, software is mining

vehre commented 10 years ago

Ok.

Note to self: add check to prevent -k neoscrypt as a valid option.

wrapperband commented 10 years ago

a more inefficient check would be .not. (what it supposed to be) gives (are you sure?) error message (to debug log?)