Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-12

OpenCL

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lourival Mendes

Dear All,

Speaking with a friend about parallel programming he told me something about OpenCL as been the "future" of massively parallel computing, mainly because of the standards and the access to GPU cores. I read something about on the web and If I understood right, there is a way to compile the same program in C to use in CPU and/or GPU. Also I found that there is someone working on to bring it to FPC/Lazarus. Is there a project on it? Is there some thing working on Parallel programming on FPC? As far as I remember there is a package that allow us to use the MPICH2 on Lazarus
(http://wiki.freepascal.org/MPICH)

Thanks a lot,

Lourival J. Mendes Neto

Reply by email

Michalis Kamburelis
to Lourival Mendes
Lourival Mendes wrote
FPC/Lazarus. Is there a project on it? Is there some thing working on Parallel programming on FPC?

There are OpenCL bindings submitted to mantis,
http://mantis.freepascal.org/view.php?id=15297, by Dmitry Boyarintsev. I didn't test them, as I don't have capable GPU (yet) :) But I'm waiting with anticipation for them to be applied :) (I was playing with CUDA some time ago, which had basically the same goal, although was NVidia-only.)

Michalis

Reply by email

Lourival Mendes
to Michalis Kamburelis

I found that URL, actually I'm on the same situation... I'm waiting for them to be applied...

please correct me if I'm wrong, CUDA work only for NVidia and OpenCL should work for all GPU, right?
and if I got the idea the OpenCL bindings submitted works only for Mac. Can I get and try it on Windows?

Lourival

2009/12/22 Michalis Kamburelis :

Show quoted text 16 lines
Lourival Mendes wrote: > FPC/Lazarus. Is there a project on it? Is there some thing working on > Parallel programming on FPC? There are OpenCL bindings submitted to mantis, http://mantis.freepascal.org/view.php?id=15297, by Dmitry Boyarintsev. I didn't test them, as I don't have capable GPU (yet) :) But I'm waiting with anticipation for them to be applied :) (I was playing with CUDA some time ago, which had basically the same goal, although was NVidia-only.) Michalis _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Lourival J. Mendes Neto

Reply by email

dmitry boyarintsev
to Lourival Mendes
Lourival Mendes wrote
please correct me if I'm wrong, CUDA work only for NVidia and OpenCL should work for all GPU, right?  and if I got the idea the OpenCL bindings submitted works only for Mac. Can I get and try it on Windows?

There some changes required at the header to be 's OpenCL implementation is available as .dll

I've also tried to launch the Mac's "hello world" example, it did compile fine, but failed with the error. (something was wrong with OpenCL program, not pascal code... so much for being cross-platform lib)...

Also, OpenCL is designed to be hardware independent layer, so, in theory, it's NOT necessary to have powerful GPU card. If there's none OpenCL lib would use CPU for processing. It would be slow, but still should work.
I've tried Mac "hello world" sample on MacBook with slow Intel integrated video, and the sample failed if GPU flag is set, but did work for CPU mode.

thanks,
dmitry

Reply by email

Lourival Mendes
to dmitry boyarintsev

Thanks a lot for your answer Dmitry,

Sorry for my dummy questions, but if I got the idea, the OpenCL implementation, from NVidia for Windows, is available as .dll. and the Pascal binding should be adapted to work with it. Also, there is some troubles with the OpenCL and if I understood correctly, for while, OpenCL is not available in a spread way to work in Windows, Mac and so on, but probably CUDA is, but we don't have bindings for Pascal code yet.

Hugs

Lourival

2009/12/28 dmitry boyarintsev :

Show quoted text 29 lines
On Tue, Dec 22, 2009 at 2:26 PM, Lourival Mendes wrote: > please correct me if I'm wrong, CUDA work only for NVidia and OpenCL > should work for all GPU, right? >  and if I got the idea the OpenCL bindings submitted works only for > Mac. Can I get and try it on Windows? There some changes required at the header to be useful at Windows. NVidia's OpenCL implementation is available as .dll I've also tried to launch the Mac's "hello world" example, it did compile fine, but failed with the error. (something was wrong with OpenCL program, not pascal code... so much for being cross-platform lib)... Also, OpenCL is designed to be hardware independent layer, so, in theory, it's NOT necessary to have powerful GPU card. If there's none OpenCL lib would use CPU for processing. It would be slow, but still should work. I've tried Mac "hello world" sample on MacBook with slow Intel integrated video, and the sample failed if GPU flag is set, but did work for CPU mode. thanks, dmitry _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Lourival J. Mendes Neto

Reply by email

dmitry boyarintsev
to Lourival Mendes
Lourival Mendes wrote
  Sorry for my dummy questions, but if I got the idea, the OpenCL implementation, from NVidia for Windows, is available as .dll. and the Pascal binding should be adapted to work with it.

You're right.
I've updated and uploaded the header to use both OSX framework and/or windows .dll

You can find updated header at: http://mantis.freepascal.org/view.php?id=15297 There also was a bug in the example test, that was ignored at OSX, but caused run-time error for Windows. It's now fixed and the test works for NVidia.

If you have a proper GPU you can test it.

thanks,
dmitry

Reply by email

Lourival Mendes
to dmitry boyarintsev

Dear dmitry, unfortunatelly I don't have yet the proper GPU because I'm waiting for the new year's sales with something off, in the meanwhile I would like to know if you can give some tips about some good GPU that can runs with OpenCL on windows.

Thanks,

Lourival

2009/12/29 dmitry boyarintsev :

Show quoted text 22 lines
On Tue, Dec 29, 2009 at 3:36 PM, Lourival Mendes wrote: >   Sorry for my dummy questions, but if I got the idea, the OpenCL > implementation, from NVidia for Windows, is available as .dll. and the > Pascal binding should be adapted to work with it. You're right. I've updated and uploaded the header to use both OSX framework and/or windows .dll You can find updated header at: http://mantis.freepascal.org/view.php?id=15297 There also was a bug in the example test, that was ignored at OSX, but caused run-time error for Windows. It's now fixed and the test works for NVidia. If you have a proper GPU you can test it. thanks, dmitry _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Lourival J. Mendes Neto

Reply by email

dmitry boyarintsev
to Lourival Mendes
Lourival Mendes wrote
if you can give some tips about some good GPU that can runs with OpenCL on windows.

Sorry, i'm not hardware expert. You'd better read NVidia's site about the hardware info. But I'm quite happy with my 8600 GTS.

thanks,
dmitry

Reply by email