-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fixes for compiler warnings, more support for amdgpu-pro #19
base: master
Are you sure you want to change the base?
Conversation
…compiler warnings.
…CL1.2 command syntax.
@@ -1,5 +1,7 @@ | |||
#ifndef MINER_H | |||
#define MINER_H | |||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS | |||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems enough to put that here.. only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. You are, of course, correct. I'll update accordingly. Thanks for the heads up (and the work on however many miners, too.)
I recall how this happened, worth mention in passing though could well have been user error. The default with 5.5.4 of using OpenCL from /usr/local/lib (AMDAPPSDK-3.0 here) didn't seem to pick up the defs as I expected and I started throwing them around before changing the default to amdgpu-pro, which was known to work for me.
@@ -70,7 +70,7 @@ typedef struct { | |||
sph_whirlpool_context whirlpool1; | |||
} Xhash_context_holder; | |||
|
|||
static Xhash_context_holder base_contexts; | |||
extern Xhash_context_holder base_contexts; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its not the correct way to fix that... because this local type is used in different algos.
Will push a sample commit to fix these warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for your help and patience. As you will have gathered, I'm pretty new at this.
This oddly caused HW errors for me on XMR - I compiled only with --disable-git-version. |
Patch in skeincoin implementation from miningpoolhub
Fixed some of the more obvious compiler warnings, i.e. incompatible pointers and suchlike. Commented out the define GIT_VERSION, let the declared version win. Compiles fairly cleanly on GCC5.4.0 with Ubuntu 16.04.1 if you don't go asking for extra warnings.
Adds a couple of tests to configure.ac to check whether we have the amdgpu-pro driver installed in addition to the AMDAPPSDK. If so, uses libOpenCL.so from amdgpu-pro with headers from the SDK; if we have the SDK but not amdgpu-pro, use the libraries from the SDK. Less to specify at build time, after git and autoreconf I can simply build and install it with:
CFLAGS="-Os -march=native" ./configure && make clean && make -j5 install
NB. These three commits squash a few easy compile warnings, but there's plenty left. Static analysis (with scan-build from clang-4.0 throws up another 80 bugs from dead assignments to logic errors to possible memory leaks, most of which I haven't begun to understand).