bhamon / gpuPlotGenerator

GPU plot generator for Burst coin
Other
44 stars 27 forks source link

linux/ubuntu guide #14

Closed digital-mine closed 7 years ago

digital-mine commented 8 years ago

Hi

I really can not understand how to run the GPU ploter on ubuntu. Is there a step by step guide I can read?

Thank you

bhamon commented 8 years ago

Hi,

If you don't want to build it from sources (as I suppose), just download the latest release (https://github.com/bhamon/gpuPlotGenerator/releases/tag/v4.0.3) and run it. Make sure to choose the correct architecture (x86/x64).

As for the run part, it heavily depends on your graphic card. Follow the "How to use" on the home page of this repository, at least for the setup part. Once setup, it's just a matter of tuning parameters to achieve better performances. I can help for that part if you need to.

digital-mine commented 7 years ago

Hi thank you for for not have closed this issue as I asked you ;)

Well I got my GPU (msi AMD R9 380 4GB). I followed step by step what you wrote in the readme.txt file: I installed OpenCl via AMDAPPSDK-3.0 I installed Install the build-essential and g++ packets I installed opencl headers (I'm in ubuntu)

I run sudo run make dist command, but can not finish the process and I get this error:

Linking [bin/gpuPlotGenerator.exe]
/usr/bin/ld: saltato /home/ziomar/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so incompatible during the research of -lOpenCL
/usr/bin/ld: saltato /usr/lib/gcc/x86_64-linux-gnu/6/../../../libOpenCL.so incompatible during the research of -lOpenCL
/usr/bin/ld: saltato //usr/lib/libOpenCL.so incompatible during the research of -lOpenCL
/usr/bin/ld: impossible to find -lOpenCL
collect2: error: ld returned 1 exit status
Makefile:31: instructions set for "bin/gpuPlotGenerator.exe" not executed
make: *** [bin/gpuPlotGenerator.exe] Error 1

If I try to run the plotter with ./gpuPlotGenerator I get this error from the already build version you gave to me last time: Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertionneeded != NULL' failed! `

I really hope you can help me with this thank you

digital-mine commented 7 years ago

EDIT:

I solved the error from the already build version by downgrading the AMDAPPSDK-3.0 to AMDAPPSDK-2.9.1 Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertionneeded != NULL' failed! Now it works! But if I run ./gpuPlotGenerator listDevices It can see just my CPU

reply

digital-mine commented 7 years ago

EDIT 2: I have been able to finally start the program. installing amd-gpu-prodriver

but after setting up devices.txt and try to start plotting I get this error

[ERROR][-11][CL_BUILD_PROGRAM_FAILURE] Unable to build the OpenCL program AMDGPUMCInstLower::lower - Pseudo instruction doesn't have a target-specific version: 174

Please help

bhamon commented 7 years ago

First time I see this error, and there is no reference whatsoever on the official AMD community website (apart from this one which is unsolved). From what I understand, a pseudo instruction seems to be incompatible with your card or with the driver. As I can see, you run on the latest Ubuntu distribution (16.x) which requires the new AMD drivers : I think that's the cause.

As for the solution, I see two options :

To help with the second option, I'll create a new VM to build it from scratch and let you know when it's done.

bhamon commented 7 years ago

Done. You can download the new release here.

Hope it'll work.

digital-mine commented 7 years ago

thank you! I was checking around about the ubuntu distribution, maybe the best solution is version 14.04, because it's the last version AMD released the opencl 2.0 drivers. What do you think?

digital-mine commented 7 years ago

The new version gives the same -11 error :(

bhamon commented 7 years ago

The original AMD driver(Catalyst) won't be supported for long, so moving to AMDGPU would be the best solution (Ubuntu 16.x). But the driver is not very mature and switching from OpenCL 1.x to OpenCL 2.0 may be the root cause of this issue.

For now on, switch to Ubuntu 14.04 to solve your problem. When I find the time I'll review the kernel code to switch it to OpenCL 2.0.

digital-mine commented 7 years ago

I got this error now

[ERROR][-1001][CL_UNKNOWN] Unable to retrieve the OpenCL platforms number

I'm sorry to bother you like this but this is driving me crazy!!!

bhamon commented 7 years ago

Sounds like OpenCL is not detected on your system. Make sure the Catalyst driver has been properly installed, reboot your system and try again.

digital-mine commented 7 years ago

I think/hope that we are close by a solution I reinstall everything because I noticed that the AMDAPPSDK-3.0 should work together with AMDGPU-PRO drivers. I got a system error that I solved. now with your new build it can see the devices bot GPU and CPU and when I try to plot the error is this

GPU plot generator v4.0.3
-------------------------
Author:   Cryo
Bitcoin:  138gMBhCrNkbaiTCmUhP9HLU9xwn5QKZgD
Burst:    BURST-YA29-QCEW-QXC3-BKXDL
----
Loading platforms...
Loading devices...
Loading devices configurations...
Initializing generation devices...
    [0] Device: Tonga (OpenCL 1.2 AMD-APP (2117.10))
    [0] Device memory: 252MB
    [0] CPU memory: 252MB
Initializing generation contexts...

[ERROR] std::bad_alloc

I hope we are close by a solution.

bhamon commented 7 years ago

A std::bad_alloc means that you don't have enough CPU RAM for the generation you launched. How much RAM do you have? What's the command line you launched?

Also, 252MB seem rather low for a R9 380. You can increase the globalWorkSize as your card can go up to 4GB.

digital-mine commented 7 years ago

I can work with no issue untill these limits: 0 0 10000 480 8192 (devices.txt) _0_3815000_109000 (for 1tb)

What do you think? I have 16 gb ram

bhamon commented 7 years ago

globalWorkSize=10000 means 2.5GB GPU RAM, it's a good value. Most graphic cards doesn't allow more for a single block allocation.

You can test different values of localWorkSize to enhance the throughput. Higher values doesn't necessarily give better speed. Typical power of two usually give good results (128 or 256 most of the time).

About your staggerSize=109000, it requires 28.6GB of RAM. Try a lower value, like 57344 (14GB), so the noncesNumber should be 19173961 for 1TB (let's say 19000000 to round things up).

Don't forget to optimize your files afterwards (so noncesNumber=staggerSize) to reduce the mining process.

digital-mine commented 7 years ago

Thanks a lot for your work and your help!!

About optimizing it is possible to do it with your scrypt or I have to use anotherone?

bhamon commented 7 years ago

To optimize an already generated plots file, you'll need another tool.

Note that with my tool you can generate already optimized files via the generate command by specifying a direct generation strategy (in place of the default buffer one). However this strategy is really stressful for the disk and should be used with care (and a lot of tests). As it requires a lot of random access writes, plotting on an SSD (256GB or so) and moving the generated files to standard disks afterwards can be a solution.

Another thing you can do depending on your GPU power is to generate multiple files at once since the bottleneck part of the generation process is usually the writing speed to the disk. The strategy is then to use one card to generate nonces for two files on different disks. If you have more than one GPU you can use them all too to speed things up a bit more.

digital-mine commented 7 years ago

THank you a lot I'm writing a post about my experience on the burst forum so hopefully nobody will bother you as I did for the same issues!