Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oclvanitygen / miner broken in Catalyst 13 #19

Open
shadowmite opened this issue Jan 24, 2013 · 65 comments
Open

oclvanitygen / miner broken in Catalyst 13 #19

shadowmite opened this issue Jan 24, 2013 · 65 comments

Comments

@shadowmite
Copy link

I'm new to this and might be missing something but I can't get this to compile the kernel and run from Windows or Ubuntu Linux with my MSI R7970 (Tahiti) GPU running Catalyst 13 drivers. I can try to downgrade this weekend but I believe this is a real issue due to changes in their OpenCL?

C:\Users\shadowmite\Desktop\guiminer\vanitygen-0.22-win>oclvanitygen.exe -d 0 1Test123
Difficulty: 51529903411245
Compiling kernel, can take minutes...LLVM ERROR: Cannot select: 0x4953460: i8 =
setcc 0x494b288, 0x4953c58, 0x494af58 [ID=80]
0x494b288: i32 = AMDILISD::ADD 0x4953c58, 0x4953928 [ID=63]
0x4953c58: i32,ch = CopyFromReg 0x49fd2e8, 0x4953ac0 [ORD=179] [ID=51]
0x4953ac0: i32 = Register %vreg40 [ORD=179] [ID=14]
0x4953928: i32,ch = load 0x49fd2e8, 0x4953bd0, 0x4941568<LD4[getelementptr i
nbounds ([8 x i32] addrspace(2)* @Modulus, i32 0, i32 7)]> [ORD=178] [ID=55]
0x4953bd0: i32 = Constant<28> [ID=39]
0x4941568: i32 = undef [ORD=150] [ID=2]
0x4953c58: i32,ch = CopyFromReg 0x49fd2e8, 0x4953ac0 [ORD=179] [ID=51]
0x4953ac0: i32 = Register %vreg40 [ORD=179] [ID=14]

C:\Users\shadowmite\Desktop\guiminer\vanitygen-0.22-win>

Same basic error in linux.

@shadowmite
Copy link
Author

I see at the forums others are all having the same issue with Catalyst 13, it's broke. :(

@tuxayo
Copy link

tuxayo commented Feb 11, 2013

Same problem with catalyst 13.2 beta on archlinux 64bit :-(

@wartron
Copy link

wartron commented Feb 15, 2013

Broke on windows aswell

@nullEuro
Copy link

+1 :(

@julfo
Copy link

julfo commented Feb 18, 2013

Yup :(

@shadowmite
Copy link
Author

From a little bit of research on this error I found:


"The type of the pointee must be an integer type whose bit width is a
power of two greater than or equal to eight and less than or equal to a
target-specific size limit"

I did atomic store/loads without conversion and this lead to the LLVM
ERROR that I originally posted. Issuing a bitcast after the load and
before the store resolved it.


I'm not familiar with GPU / OpenCL programming so it would be great if someone else can make the required fix but if not I'll slowly figure it out, gotta learn this someday.

@nullEuro
Copy link

After doing some more researches I think it is a bug on AMDs side because the clBuildProgram function does not return an errorcode but simply crashes. Maybe there is a workaround but i think we will have to wait for AMD to release a fix (there might be a bug in the oclvanitygen code that provokes the crash and has to be fixed too).

Bug reports on AMD Dev Forums:
http://devgurus.amd.com/message/1286923 (new)
http://devgurus.amd.com/message/1285326 (older)

btw: Does it still occur with newest AMD Beta drivers? Has someone tested this?

@tuxayo
Copy link

tuxayo commented Feb 19, 2013

I just tested with beta 6 and it fails the same way :-(

@Anenome
Copy link

Anenome commented Mar 18, 2013

Can't wait for this to be fixed.

@jacky4566
Copy link

Update:
Still broken with Catalyst 13.3 Beta 3

@lifeboat
Copy link

With my ATI Radeon HD 5570, Catalyst 13.1 and Catalyst 11.11 failed. (I tried Catalyst 11.11 based on other forum recommendations.) It did work with Catalyst 12.10.

@lifeboat
Copy link

Also note that I was considering getting an NVIDIA card as a solution to this problem but didn't due to https://en.bitcoin.it/wiki/Why_a_GPU_mines_faster_than_a_CPU#Why_are_AMD_GPUs_faster_than_Nvidia_GPUs.3F

@clarkminor
Copy link

@lifeboat I can't get it to work using Catalyst 12.10 (on arch linux).

@lifeboat
Copy link

lifeboat commented Apr 7, 2013

"@lifeboat I can't get it to work using Catalyst 12.10 (on arch linux)."

I am using Windows 7.

@dikidera
Copy link

dikidera commented Apr 7, 2013

I used the AMD cleanup utility when I was on 13.2 beta5 to remove the drivers and installed 13.1 as I was getting the error as well, BUT I keep getting even now on 13.1.

So Catalyst 13 must be broken :(

@DougTanner
Copy link

@lifeboat I un-installed my old catalyst version and installed 12.10 but it doesn't appear to be working. I'm on Windows 7.

@lifeboat
Copy link

Downgrading is not as easy as upgrading.

Here is a quote for a way to do it:

"restart the PC, load on safe mode, use driver sweeper and uninstall the graphic driver (it supports either ATI or Nvidia) and then load onto windows and install the new driver. this is the universal method !"

You can find Driver Sweeper at http://www.guru3d.com/content_page/guru3d_driver_sweeper.html

Here is a batch file you can also try:

cd C:\Windows\System32
del SlotMaximizerAg.dll
del SlotMaximizerBe.dll
del amdocl64.dll
del OpenCL.dll
del OpenVideo64.dll
del OVDecode64.dll

cd C:\Windows\SysWOW64
del SlotMaximizerAg.dll
del SlotMaximizerBe.dll
del amdocl.dll
del OpenCL.dll
del OpenVideo.dll
del OVDecode.dll

rmdir C:\ProgramData\AMD\KDB /S /Q

That batch file is from http://forums.guru3d.com/showthread.php?t=359883

@DougTanner
Copy link

Thanks! I eventually got it to work with 11.11 and a whole bunch of cleans/reboots (12.10 didn't). I think the trick was to also un-install and manually clean the APP SDK.

(I have a Radeon 5850 on Windows 7 64-bit)

@lifeboat
Copy link

@clarkminor Try Catalyst 11.11, it works for some people.

@tuxayo
Copy link

tuxayo commented Apr 20, 2013

@DougTanner What are the folders you cleaned manually for the APP SDK ?

@lifeboat
Copy link

I finally ran oclvanitygen long enough on my Sapphire Radeon HD 7950 3GB DDR5 HDMI / DVI-I / Dual Mini DP with Boost PCI-Express Graphics Card long enough to get a result for 1Lifeboat, unfortunately the program gave the error:

Match idx: 1
CPU hash: 09e91e4c4c3476ef963879a2230ef66cabe0c3f3
GPU hash: d84bb4cee4339681cee94dbd0dad5a7326bc13fd
Found delta: 576297 Start delta: 58720257

I looked into this and this means the CPU and GPU results differ so you just get this error and the program continues to search for a result. Further testing showed that oclvanitygen failed like this pretty consistently for smaller tests such as searching for 1Li (there was an occasional success when I did tests on 1L just to drive me crazy).

Further research showed that my VisionTek Radeon 7850 2GB DDR5 PCI Express Graphics Card failed in the same way. Additional research showed that the 2GB DDR3 ATI Radeon HD 5570 that came with my computer does not fail. (I thought that had worked.)

It is pretty doubtful that my other two cards are defective in any way as my testing shows that oclvanitygen is pretty cranky. (I could go on and on as to all my test results.)

Ideas?

@lifeboat
Copy link

Using the -S option solves the problem but then oclvanitygen runs pretty slow.

@lifeboat
Copy link

Note that with the -S option trying to find 1L usually fails, but anything longer, even 1Lifebo works with no problem.

@tuxayo
Copy link

tuxayo commented Apr 22, 2013

I finally managed to run it on Linux Mint 13 64bits (Ubuntu 12.04 should also work(I dont know if 32 bit makes a difference))
-Starting with a fresh and updated install I added proprietary drivers (the stable version: fglrx)

-Then I installed the required packages to build :
opencl-headers
libssl-dev
libpcre++-dev

-Then lauching "make oclvanitygen" worked flawlessly

Now I'm computing at 15Mkey/s with a AMD HD5770

@lifeboat
Copy link

"Now I'm computing at 15Mkey/s with a AMD HD5770"

Have you tested it with something short like 1Life to make sure it is actually working?

@tuxayo
Copy link

tuxayo commented Apr 22, 2013

I generated 1youLoStLAFTyy6jcijLR8pqdjDzLTYz3
And it works :-D
http://blockchain.info/address/1youLoStLAFTyy6jcijLR8pqdjDzLTYz3

@lifeboat
Copy link

"I generated 1youLoStLAFTyy6jcijLR8pqdjDzLTYz3 :-D"

Impressive. Are you also on LinkedIn or is your bio available anywhere?

@tuxayo
Copy link

tuxayo commented Apr 22, 2013

@lifeboat No I haven’t yet a LinkedIn account nor a bio, why?

@lifeboat
Copy link

"No I haven’t yet a LinkedIn account nor a bio, why?"

We are always looking for potential board members at the Lifeboat Foundation.

@lifeboat
Copy link

lifeboat commented May 2, 2013

As an alternative to AMD parts and drivers, I would be curious what type of results people are getting with say the GeForce GTX670.

@brianonn
Copy link

brianonn commented Aug 6, 2013

you're right, hashes don't match for me either... I missed that part where you posted it already " it compiles fine, but, does not work properly, as hashes do not match" ... I think I was overconfident because it was the first time I even had it compile correctly.

So now the question remains.. is this a bug in the compiler, or a logic bug in the software? I presume it used to work fine, which might rule out a logic bug, but there could still be a software bug that just didn't show up in earlier compilers but shows up now...

I'm going to start tracing the code and try to see whats going on inside the kernels.

@n4ru
Copy link

n4ru commented Aug 6, 2013

I am currently also having issues with hash mismatching and delta errors. If anyone finds a way to get it to work please post.

@mnmnm
Copy link

mnmnm commented Aug 7, 2013

well....so - anybody tried Windows + 13.x drivers + 7xxx card ?
https://github.com/downloads/samr7/vanitygen/vanitygen-0.22-win.zip
oclvanitygen -v -i -d9 1Lostx
###select proper GPU
oclvanitygen -v -i -d0 1Lostx
###wait 15 seconds

@brianonn
Copy link

I got it to work tonight on Linux... This combination below seems to work with a small code change.. ..mnmnm , please give it a try.

I used the latest Catalyst 13.8 Beta and downgraded my AMDAPP SDK to 2.7 from 2.8.1. This was not enough, though.. I also had to make a code change in oclengine.c, to remove the -DAMD_BFI_INT compiler flag.

Removing the compiler flag did not make it work on AMDAPP 2.8.1, I had to go down to 2.7. AMDAPP2.8.1 with Catalyst 13.8 beta just does not work at all, with or without the AMD_BFI_INT compiler flag

I was able to hash at about 20Mkeys/sec and find a successful key.

change line 457 in oclengine.c
from: return quirks;
to: return quirks & ~VG_OCL_AMD_BFI_INT;

Remember to delete the existing *.oclbin files that might be laying around.

This is just a hack that seems to work, a proper solution possibly just turns on that flag only for specific models, or something like that.

So if anyone finds this was helpful to get your oclvanitygen running again, please thank me with a small donation to my newly generated vanity address :) I've just started mining this month and I joined a pool with my 1 GPU so every little bit helps 👍

1BrianXvA6hcVgFzc3c855Gc1zDmtR8Cc6

1BrianXvA6hcVgFzc3c855Gc1zDmtR8Cc6

@mnmnm
Copy link

mnmnm commented Aug 30, 2013

I can confirm,was working for me with latest fedora and 13.8 beta1,I had to overwrite all ocl* libs in system dirs with those from amd.app.sdk2.7.tar.gz (was bitching a bit about the problem at AMD forums, so .. maybe ;)
little patch for 'quirks' here:
https://gist.github.com/mnmnm/6387453

support is welcome :) 12jNbMzoBGLcKa7qY45gbcDfG4ms8jRWyf

@lifeboat
Copy link

"downgraded my AMDAPP SDK to 2.7 from 2.8.1"

I find it troubling that the latest AMD drivers don't work with oclvanitygen. Anyway, I finally solved my problem by getting an ASUS GeForce GTX770 2GB which is generating about 28 Mkey/s and managed to generate 1Lifeboat for me in about a week. Of course, my HP Pavilion Elite HPE-570t just had to be incompatible with GTX770 cards (I tried two different brands) so for $250 I got an old HP xw400 workstation which runs the card fine.

@br0x
Copy link

br0x commented Sep 18, 2013

Brian, thanks, donation sent)

@brianonn
Copy link

thanks br0x, appreciated...I take requests too :) if you or anyone else wants something custom let me know.. I've now got a pretty good understanding of the code flow inside vanitygen...

@br0x
Copy link

br0x commented Sep 19, 2013

I'm developer myself, but have very little time to dive in someones code...
What I really dream of now, is if some kind and wise man ported p2pool code
to C...

@jerrycross
Copy link

HAT THE FUCK

On 9/19/13, br0x notifications@github.com wrote:

I'm developer myself, but have very little time to dive in someones code...
What I really dream of now, is if some kind and wise man ported p2pool code
to C...

2013/9/19 Brian Onn notifications@github.com

thanks br0x, appreciated...I take requests too :) if you or anyone else
wants something custom let me know.. I've now got a pretty good
understanding of the code flow inside vanitygen...


Reply to this email directly or view it on
GitHubhttps://github.com//issues/19#issuecomment-24713021
.


Reply to this email directly or view it on GitHub:
#19 (comment)

@lifeboat
Copy link

"So if anyone finds this was helpful to get your oclvanitygen running again, please thank me with a small donation to my newly generated vanity address :)"

You'd have to pry bitcoins from the Lifeboat Foundation out of our cold dead hands (at least until we finish matching the Brian Cartmell pledge of 500 bitcoins at https://lifeboat.com/ex/bitcoins), but we are willing to send you money via any other method, including PayPal.

We were able to use your fix to get Catalyst 13.9 running under Windows 7. For those who have any trouble compiling it in Windows, note that we had to change the following in Makefile.Win32:

CFLAGS_BASE = /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /I$(OPENSSL_DIR)\inc32 /I$(PTHREADS_DIR) /I$(PCRE_DIR) /Ox /Zi
to
CFLAGS_BASE = /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /I$(OPENSSL_DIR)\include /I$(PTHREADS_DIR) /I$(PCRE_DIR) /Ox /Zi

This change was likely because the version of OpenSSL that we used was different than the older version originally used to compile it.

You can get our compiled version at http://lifeboat.com/oclvanitygen.exe

To get it running in Catalyst 13.9, we are using the AMD APP SDK Runtime from Catalyst 12.10. Testing our system under 3DMark 11 gets much better results than before so we are clearly running under Catalyst 13.9 and not Catalyst 12.10.

We are now getting 22Mkey/s from our AMD card and 28Mkey/s from our NVIDIA card for a combined total of 40Mkey/s.

@lifeboat
Copy link

Thanks to input by others at https://bitcointalk.org/index.php?topic=301068.0 we have improved our program so it runs on a wider variety of machines. You can get the latest version at http://lifeboat.com/oclvanitygen It has so far been tested under Windows 7 and Windows 8.

@mnmnm
Copy link

mnmnm commented Oct 29, 2013

Hi, if somebody wants to help AMD make there drivers better - here is the thread : http://devgurus.amd.com/message/1300655#1300655

@mcdee
Copy link

mcdee commented Nov 18, 2013

For those of you concerned about having to downgrade your AMD SDK you don't need to install it, you just need the libraries. I carried out the following steps to make oclvanitygen work on Ubuntu 13.10 with a Radeon HD7900:

  • download the 2.7 version of the AMD APP SDK (search for AMD APP SDK download archive)
  • make a suitable location for the SDK (I used mkdir ~/vanitygen; cd ~/vanitygen)
  • untar it with tar xf ~/Downloads/AMD-APP-SDK-v2.7-lnx64.tar (your location might vary depending on your download settings)
  • untar the resultant tar file with tar zxf AMD-APP-SDK-v2.7-RC-lnx64.tgz
  • add the libraries to your search path with export LD_LIBRARY_PATH=~/vanitygen/AMD-APP-SDK-v2.7-RC-lnx64/lib/x86_64:$LD_LIBRARY_PATH (you will need to change the ~/vanitygen piece if you chose a different location)

At which point you should be able to run oclvanitygen without changing any of the system files. If you reboot and want to run it again you just need to rerun the last line above.

@mikeschuld
Copy link

Tried the latest 2.9 APP SDK and 13.12 drivers today and they do not fix the issue.

@mandb
Copy link

mandb commented Dec 23, 2013

lifeboat - still crashes. gets gpu hash and cpu hash mismatch on a 7970 with 13.11 drivers

Compiling kernel, can take minutes...done!
[25.41 Mkey/s][total 629145600][Prob 90.8%][95% in 6.4s] Match idx: 0
CPU hash: 549df0fd57655773ba918b48286b2a5a8e892f58
GPU hash: ec860d5c45daaef3d4675f51386d6db56c905c73
Found delta: 3028197 Start delta: 8388609
[25.35 Mkey/s][total 889192448][Prob 96.6%] Match idx: 0
CPU hash: d1910ee48ee4fbbc97aa8e154c310691653b6464
GPU hash: ec860d6953570ef610325547c124c7853f56c64e
Found delta: 4078887 Start delta: 41943041
[23.93 Mkey/s][total 1023410176][Prob 97.9%] Match idx: 0
CPU hash: 9ee42c4c3e0480c59d7f12c5a84a169cf51e86ae
GPU hash: ec860d636b8f42c561e001a42130ea2931f9cca6
Found delta: 5826913 Start delta: 33554433

Just keeps going and going never finding.

GPU hash: ec860d64eb0c7fb3029b78c63d8752c6e821b30f
Found delta: 1282273 Start delta: 58720257
[25.64 Mkey/s][total 1459617792][Prob 99.6%]

@lifeboat
Copy link

"lifeboat - still crashes. gets gpu hash and cpu hash mismatch on a 7970 with 13.11 drivers"

Our version at http://lifeboat.com/oclvanitygen only solves the problem of being able to use a 7970 without having to use the slow option. It doesn't solve the problem with the latest drivers. So uninstall your drivers, install the AMD APP SDK Runtime from Catalyst 12.10 at http://developer.amd.com/amd-license-agreement/?f=AMD-APP-SDK-v2.7-Windows-641.exe, and then reinstall the latest drivers, making sure you don't reinstall the latest AMD APP SDK Runtime. Alternatively, you could just try downloading http://lifeboat.com/opencl.dll and put it in the same directory as oclvanitygen. (This opencl.dll is for 64-bit versions of Windows.)

Note that it can be helpful after you have uninstalled the drivers, to run this batch file:

cd C:\Windows\System32
del SlotMaximizerAg.dll
del SlotMaximizerBe.dll
del amdocl64.dll
del OpenCL.dll
del OpenVideo64.dll
del OVDecode64.dll

cd C:\Windows\SysWOW64
del SlotMaximizerAg.dll
del SlotMaximizerBe.dll
del amdocl.dll
del OpenCL.dll
del OpenVideo.dll
del OVDecode.dll

rmdir C:\ProgramData\AMD\KDB /S /Q

@tigew
Copy link

tigew commented Dec 26, 2013

Tried all of what you just posted, still nothing =/

@buzzdave
Copy link

buzzdave commented May 9, 2014

Brianonn or mnmnm please contact me for some work around this codebase. I've got a project I need some help with. Thanks! dave -at - megabigpower -dot- c_o_m

@mably
Copy link

mably commented May 14, 2014

Works for me after updating from 13.1 to Catalyst 14.4

@lifeboatpres
Copy link

It does seem to work with Catalyst 14.12.

@Tectract
Copy link

can't get oclvanitygen working for the life of me. libGL.so / GL headers / catalyst version seems hard to get right, it just goes into the infinite loop for me. I'm on linux mint 20 for this machine, with an amd hd5850:

fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 5800 Series
OpenGL version string: 4.3.12798 Compatibility Profile Context 13.35.1005

I tried updating to 14.12 but ran into dependency issues. Specifically, running "sudo ./amd-driver-installer-14.501.1003-x86.x86_64.run" seemed to run ok, but then failed finding libGL.so.1. It was on the system, but had a 32-bit version. So I played around with libgl-mesa-glx:i386 versus libgl-mesa-glx:amd64 for a while, ended up trying to hardcode /usr/lib/libGL.so.1 with a symbolic link to /usr/lib64/libGL.so.1, and after restarting, got a black screen. Is there a list of specific libs and the versions I need to get oclvanitygen working, somewhere?

@Tectract
Copy link

Been playing with this for a while but still no luck:
ldd oclvanitygen
linux-vdso.so.1 => (0x00007fff289f1000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f064d77b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f064d475000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f064d256000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f064ce7b000)
libOpenCL.so.1 => /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 (0x00007f064cc72000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f064c8ab000)
/lib64/ld-linux-x86-64.so.2 (0x00007f064d9ea000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f064c6a7000)

I'm guessing there is some conflict between the implementation of libOpenCS and libcrypto here...

@Tectract
Copy link

Ok finally was able to run oclvanitygen by doing the following:
git clone https://github.com/WyseNynja/vanitygen.git $D
cd $D
mkdir build
cd build
cmake ..
ccmake ..
toggle to advanced options with "t"
change OPENCL_LIBRARIES option to point to:
/path_to/amdapp_2.7/AMD-APP-SDK-v2.7-RC-lnx64/lib/x86_64/libOpenCL.so
change _OPENCL_CPP_INCLUDE_DIRS option to point to:
/path_to/amdapp_2.7/AMD-APP-SDK-v2.7-RC-lnx64/include
"c" to configure, "g" to generate
make all
./oclvanitygen -d 0 -v 1Love
now finishes almost instantaneously :D
I'm looking at about 20 Mkey/s with this HD5850 now, yay.

@lifeboatpres
Copy link

"./oclvanitygen -d 0 -v 1Love
now finishes almost instantaneously :D"

It was a good idea to test it on a simple example to make sure it really works.

@rusvo
Copy link

rusvo commented Aug 11, 2019

AMD RX470
Driver Adrenaline 18.6.1
Win 8.1 64bit

oclvanitygen.exe -d 0 -v -o finish.txt 1something
pause
van1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests