Re: OpenCL deprecation in MacOS 10.14

2019-09-01 Thread Joshua Root
vincent habchi wrote:
> Folks,
> 
> I’m currently upgrading the GDAL port to 3.0.1 and… the OpenCL code doesn’t 
> work anymore. No way I can find the file OpenCL.h anywhere in the system. I 
> suppose this is part of Apple policy of deprecating OpenCL, so that no one 
> can build new software based on it. 
> 
> Could you confirm that OpenCL.h has also disappeared from the 
> /System/Library/Framework on your machines (as of 10.14.6)? In which case, 
> I’m going to pull out the +opencl variant from the new Portfile.

All headers have disappeared from /System/Library/Frameworks, along with
/usr/include. Apple only provides them in the SDK now.

Like Richard, I do have
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/opencl.h
on my system with Xcode 10.3.

- Josh


Re: OpenCL deprecation in MacOS 10.14

2019-09-01 Thread Richard L. Hamilton
On my 10.14.6 2017 MacBook Pro, output of "locate -i opencl.h" includes

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/opencl.h

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/opencl.h

/System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/opencl.h

(the first two because I have Xcode and command line compiler tools installed)

OTOH, that system was upgraded from prior OS releases.  Another (2018 Mac Mini) 
that I think started out on 10.14.x (x < 6, but it's on 10.14.6 now)  does not 
have the file in /System/Library/Frameworks, although the rest of 
/System/Library/Frameworks/OpenCL.framework is there. Both have Xcode 10.3 
(10G8).

On either system, I can compile the demo in 
https://developer.apple.com/library/archive/samplecode/OpenCL_Hello_World_Example/Introduction/Intro.html
 

 with Xcode, so it is finding a usable version of opencl.h somewhere. On 
either, it gets a bunch of deprecation warnings for functions with names 
beginning with "cl", not surprising.  The program runs on either, apparently 
successfully.

Of course, since matters may further deteriorate on Catalina (I don't know, not 
having signed up for the beta for it as yet), even if OpenCL is still usable 
and buildable (under the right conditions) on 10.14, you might want to pull the 
plug on support for it now, unless the performance advantage it offers is truly 
massive.


> On Sep 1, 2019, at 06:15, Vincent Habchi  wrote:
> 
> Folks,
> 
> I’m currently upgrading the GDAL port to 3.0.1 and… the OpenCL code doesn’t 
> work anymore. No way I can find the file OpenCL.h anywhere in the system. I 
> suppose this is part of Apple policy of deprecating OpenCL, so that no one 
> can build new software based on it. 
> 
> Could you confirm that OpenCL.h has also disappeared from the 
> /System/Library/Framework on your machines (as of 10.14.6)? In which case, 
> I’m going to pull out the +opencl variant from the new Portfile.
> 
> Thanks a bunch,
> Vincent
> 
> 



Re: OpenCL deprecation in MacOS 10.14

2019-09-01 Thread Vincent Habchi
> On 1 Sep 2019, at 12:26, Mojca Miklavec  wrote:
> 
> I have 10.13, but it should be present in 10.14. Maybe it disappeared with 
> 10.15. Even on 10.13 I could not make fft work with gpu using my own program 
> though (but the headers were there), it only worked with cpu.

Apparently, 10.14.6 ditched it. I had no problem compiling the previous version 
of GDAL with OpenCL, but right now, it’s gone.
What you say to me rings a bell as to why some utilities build on GDAL used to 
crash. I’m taking your word for it, and I think the best way is indeed to put 
out that +opencl variant to pasture.

Thanks a bunch Mojca!

Vincent



OpenCL deprecation in MacOS 10.14

2019-09-01 Thread Vincent Habchi
Folks,

I’m currently upgrading the GDAL port to 3.0.1 and… the OpenCL code doesn’t 
work anymore. No way I can find the file OpenCL.h anywhere in the system. I 
suppose this is part of Apple policy of deprecating OpenCL, so that no one can 
build new software based on it. 

Could you confirm that OpenCL.h has also disappeared from the 
/System/Library/Framework on your machines (as of 10.14.6)? In which case, I’m 
going to pull out the +opencl variant from the new Portfile.

Thanks a bunch,
Vincent