OpenCL (Open Coumputer Language) for FreeBASIC .
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
You are right it must be "size_t" fixed in the zip file.
In test02.bas change line 84:
dim as size_t nChars
Joshy
In test02.bas change line 84:
dim as size_t nChars
Joshy
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
hi dj !
can you please post cl.bi on dropbox or another website , your alice website is marked as "malware" , this is also true for your other stuff ...
thanks
can you please post cl.bi on dropbox or another website , your alice website is marked as "malware" , this is also true for your other stuff ...
thanks
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
Because of malware on alice-dsl.net domain I moved all content to my new shiny3d.de server.
Joshy
Joshy
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
there must be a problem , now my browser tells me the file is infected ...
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
the content of the *.zip file are only: *.bi *.bas *.txt and *.pdfchung wrote:there must be a problem , now my browser tells me the file is infected ...
This stuff isn't infected (trust me) :-)
Joshy
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
New version uploaded and tested on 32/64-bit successful.
On my WINDOWS10 64-bit box are this two *.dlls
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL64.dll
only #inclib "OpenCL64" works here !
May be OpenCL64.dll loads internal OpenCL.dll also or OpenCL.dll are for 32-bit binaries (I don't know)
I created for WIN64 a new import library.
/FreeBASIC/lib/lib32/libOpenCL.dll.d
/FreeBASIC/lib/lib64/libOpenCL.dll.d
/FreeBASIC/lib/lib64/libOpenCL64.dll.d <-it's new
Joshy
the changes in file: cl.bi
On my WINDOWS10 64-bit box are this two *.dlls
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL64.dll
only #inclib "OpenCL64" works here !
May be OpenCL64.dll loads internal OpenCL.dll also or OpenCL.dll are for 32-bit binaries (I don't know)
I created for WIN64 a new import library.
/FreeBASIC/lib/lib32/libOpenCL.dll.d
/FreeBASIC/lib/lib64/libOpenCL.dll.d
/FreeBASIC/lib/lib64/libOpenCL64.dll.d <-it's new
Joshy
the changes in file: cl.bi
Code: Select all
...
#ifdef __FB_WIN32__
extern "Windows-MS"
#ifdef __FB_64BIT__
#inclib "OpenCL64"
#else
#inclib "OpenCL"
#endif
#else
extern "C"
#inclib "OpenCL"
#endif
...
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
Okay, followed the fairly simple and straightforward instructions in the readme. Running on win10 64 bit. Get the error "The program can't start because OpenCL64.dll is missing from your computer." Am I supposed to download this file from somewhere, or do I rename one of the files in opencl.zip file? Despite years of programming, these dll errors effortlessly wins the first place when it comes to frustrating problems - and there's a looong way down to second place.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
@h4tt3n same here I made a copy from C:\Program Files\NVIDIA Corporation\OpenCL to d:\fbExamples\OpenCL
Don't download it from anywhere it's a part of your gfxcard driver !
If your videocard support OpenCL than the folder with OpenCL.dll or OpenCL64.dll isn't in the environment var 'PATH'
search for OpenCL*.dll in your C: partition (where your windows are installed) and copy it to the folder where your *.exe is.
Let me know if you have only OpenCL.dll and not OpenCL64.dll !
Joshy
Don't download it from anywhere it's a part of your gfxcard driver !
If your videocard support OpenCL than the folder with OpenCL.dll or OpenCL64.dll isn't in the environment var 'PATH'
search for OpenCL*.dll in your C: partition (where your windows are installed) and copy it to the folder where your *.exe is.
Let me know if you have only OpenCL.dll and not OpenCL64.dll !
Joshy
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
Hi Joshy,
Searching my pc for anything opencl related gave no result, so there's a start. This might be explained by my laptop having a radeon graphics card, but according to the opencl website it should be supported by AMD too.
Searching my pc for anything opencl related gave no result, so there's a start. This might be explained by my laptop having a radeon graphics card, but according to the opencl website it should be supported by AMD too.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
In thi s case download and install the AMD OpenCL SDK
(AMD OpenCL V2.0 is only for windows >=8.1 64-bit so far I know)
search for the AMD OpenCL V1 or V1.1 for your Readon chipset.
http://developer.amd.com/resources/arti ... -sdk-v2-4/
Joshy
(AMD OpenCL V2.0 is only for windows >=8.1 64-bit so far I know)
search for the AMD OpenCL V1 or V1.1 for your Readon chipset.
http://developer.amd.com/resources/arti ... -sdk-v2-4/
Joshy
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
Hi, Joshy
I use Linux:
Lubuntu 16-04 x86_64
GeForce GTX 560 Ti
CUDA Cores: 384
NVIDIA Driver Version: 375.66
clinfo reports my card is present, etc. : 2.1 capability
A previous post suggested these object files could be used with Linux, also. True?
added to test01.bas:
#libpath "/rdkl/FB/OpenCL/OpenCL/lib/win64/"
changed cl.bi:
from:
#else
extern "C"
#inclib "OpenCLl"
#endif
to:
#else
extern "C"
#inclib "OpenCL64.dll"
#endif
Successful compile:
fbc test01.bas == segfault
recompile:
fbc -exx -g test01.bas
gdb say:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000405e88 in clGetPlatformIDs ()
(tried with other library - also successful compile - same result gdb message)
Am I using a wrong library? Does there need to be a different compiled library for Linux/Linux64?
Any other idea where I should look?
By the way, I would like to thank you for so much work keeping so many valuable libraries available to the FB community.
David
I use Linux:
Lubuntu 16-04 x86_64
GeForce GTX 560 Ti
CUDA Cores: 384
NVIDIA Driver Version: 375.66
clinfo reports my card is present, etc. : 2.1 capability
A previous post suggested these object files could be used with Linux, also. True?
added to test01.bas:
#libpath "/rdkl/FB/OpenCL/OpenCL/lib/win64/"
changed cl.bi:
from:
#else
extern "C"
#inclib "OpenCLl"
#endif
to:
#else
extern "C"
#inclib "OpenCL64.dll"
#endif
Successful compile:
fbc test01.bas == segfault
recompile:
fbc -exx -g test01.bas
gdb say:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000405e88 in clGetPlatformIDs ()
(tried with other library - also successful compile - same result gdb message)
Am I using a wrong library? Does there need to be a different compiled library for Linux/Linux64?
Any other idea where I should look?
By the way, I would like to thank you for so much work keeping so many valuable libraries available to the FB community.
David
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
@speedfixer the import libs OpenCL.dll.a and OpenCL64.dll.a are only used on Windows OS not Linux.
on linux #inclib "OpenCL" are linked to libOpenCL.so
I tested it on Ubuntu and Slackware.
may be you need the path to libOpenCl.so
fbc -p Path_to_OpenCL_on_your_box test01.bas
Joshy
on linux #inclib "OpenCL" are linked to libOpenCL.so
I tested it on Ubuntu and Slackware.
may be you need the path to libOpenCl.so
fbc -p Path_to_OpenCL_on_your_box test01.bas
Joshy
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
OK. I will play a bit and see how to do it all.
Thanks
Thanks
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
Simply needed to install the dev packages, that's all.
(removed all my edits - did NOT need the -p ... path add to the compile command)
So:
Linux 4.10.35 - Lubuntu 16.04
Processor : 6x AMD FX(tm)-6100 Six-Core Processor: 3300.00MHz
Memory : 8142MB (1818MB used)
GeForce GTX 560 Ti
test01: 1470+ frames
( but ... without -g -exx options --- 50 frames slower !!!)
test02: 3300-3700 fps - twitches way too fast
Thanks
David
(removed all my edits - did NOT need the -p ... path add to the compile command)
So:
Linux 4.10.35 - Lubuntu 16.04
Processor : 6x AMD FX(tm)-6100 Six-Core Processor: 3300.00MHz
Memory : 8142MB (1818MB used)
GeForce GTX 560 Ti
test01: 1470+ frames
( but ... without -g -exx options --- 50 frames slower !!!)
test02: 3300-3700 fps - twitches way too fast
Thanks
David
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: OpenCL (Open Coumputer Language) for FreeBASIC .
For the demo in the first post, line 46 produced a warning: wrong type - parameter 6.
I simply remarked it out, since it looked like a corrected line was in line 49.
Is that correct?
I simply remarked it out, since it looked like a corrected line was in line 49.
Is that correct?