I has some include and will compile the kernel-function. I do that with
// Language: Scala
val file = new File("opencl/main.cl")
val dir = new File("opencl/")
program = context.createProgram(new FileInputStream(file))
val cfg = program.prepare
cfg.withOption("-I "+ dir.getAbsolutePath)
program = cfg.build // boom --> error
Cann't build Program
Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidProgramExecutableException: unable to create Kernel with name: computeImage
CLDevice [id: 139942249771808 name: GeForce 9800 GT type: GPU profile: FULL_PROFILE] build log:
:38: error: 'constant.cl' file not found
:39: error: 'vector.cl' file not found
error: CL_INVALID_PROGRAM_EXECUTABLE (man page: http://www.khronos.org/opencl/sdk/1.1/docs/man/xhtml/errors.html)
:40: error: 'geometrie.cl' file not found
... and so on
It's possible to link opencl-files with jocl?
All files are in the opencl directory.
What does the underscore mean in your case? Path seperator or
I prefer using simple String concatenation to create programs since
it ensures best portability. I haven't used the include mechanism
yet. But it should work... its completely jocl independent, all IO
is done by the OpenCL implementation.
On 08/06/2010 06:36 PM, Siassei [via jogamp] wrote:
The path to the opencl directory was
works the opencl compiler. Is this a problem with the jocl
implementation or with the nvidia sdk?
whitespace is usually not a path seperator, thats why i asked. Usually
it is : or ; dependent on the OS.
On 08/06/2010 09:09 PM, Siassei [via jogamp] wrote:
> > But it should work... its completely jocl independent, all IO is
> done by the OpenCL implementation.
> Ok. With withespace the compiler doesn't found the include files.