CNugteren / CLBlast

Tuned OpenCL BLAS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to compile on OS X 10.6

barracuda156 opened this issue · comments

Build on 10.6.8 (x86_64) fails with GCC 12.2.0 with numerous errors (I quote examples, instances of these are many):

clblast_c.cpp:2222:51: error: no matching function for call to 'std::complex<double>::complex(<brace-enclosed initializer list>)'
 2222 |                     double2{alpha.s[0], alpha.s[1]},
      |                                                   ^

clblast_c.cpp:2692:34: error: request for member 's' in 'alpha', which is of non-class type 'const float*'
 2692 |                     float2{alpha.s[0], alpha.s[1]},
      |                                  ^

Thanks for reporting. I'll take a look within a week.

Could you maybe provide a bit more insight? I tried to reproduce this on a Docker image with Ubuntu 22.04 with GCC 12.1 but there it compiles fine, so I concluded it must be a GCC 12.2 issue, but that one is not available as a package.

So then I tried to produce a small stand-along example on Godbolt with GCC 12.2, but that one did compile properly: https://godbolt.org/z/sacz8MWes. But maybe this example is not capturing the essence of the issue.

About the compilation errors that you see: did you copy-paste the first ones? It is often important to look at the first issue that shows up. Also, since it says that s is not available in alpha, it might be an issue with OpenCL instead of with the compiler: alpha is of cl_float2 data-type, and that is defined by the OpenCL standard. Since you said 10.6.8, I guess you mean you are on macOS? If so, are you using Apple OpenCL or some other implementation? And does everything work if you use (Apple)Clang instead of GCC?

Closing this due to inactivity: the issue could not be reproduced.

Closing this due to inactivity: the issue could not be reproduced.

@CNugteren Sorry, I somehow missed your earlier reply.

I will try the build again today and update you on the status.

P. S. There is no support for OpenCL on OS level on PowerPC.

@CNugteren Judging by port health, CLBlast is broken on macOS <= 10.7: https://ports.macports.org/port/clblast/details
Macports buildbots use Clang, while locally I use GCC. So it is something to do about interaction with system headers, I guess, not just the compiler itself.

I do not have 10.7 setup, but here is the log from 10.6 (fails both on x86_64 and ppc):

clblas_10.6.8_rosetta.txt

P. S. If it absolutely requires OpenCL, this may not be fixable, and then we need to set a known_fail for 10.7 and earlier.

OK thanks for the information. I'll investigate.

OK thanks for the information. I'll investigate.

Thank you!

CLBlast requires OpenCL 1.1 or newer, and it turns out OS X 10.6 only supports OpenCL 1.0, see e.g. https://stackoverflow.com/questions/3049726/how-to-utilize-opencl-1-1-on-mac-os-x-10-6. So that answers your original question I believe. The readme states that CLBlast requires OpenCL 1.1 or newer.

On top of that, there is also certain hardware that only supports up to 1.0, irrespective of the OS X version: https://stackoverflow.com/questions/3049726/how-to-utilize-opencl-1-1-on-mac-os-x-10-6. I'm not sure why the 10.7 builds also fail in https://ports.macports.org/port/clblast/details, but since I don't have more info I can't help any further there. Likely it is also limited to OpenCL 1.0, either by OS, drivers, or hardware.

I'm closing this issue.

@CNugteren Thank you for clarifying!