I meant of course "failed to read OpenCL code file (solver.cl)".
On Wed, Mar 16, 2016 at 8:32 PM, Vasco Alexandre da Silva Costa <
vasco.co...@gmail.com> wrote:
> On Wed, Mar 16, 2016 at 8:26 PM, Vasco Alexandre da Silva Costa <
> vasco.co...@gmail.com> wrote:
>
>> On Wed, Mar 16, 2016 at 8:15 PM, Param Hanji <param.catchch...@gmail.com>
>> wrote:
>>
>>> Hi Vasco Costa,
>>>
>>> Yes -z 1 did it. :)
>>>
>>> Now fopen() throws an error! Function clt_read_code() in
>>> primitiive_util.c fopen() returns a NULL. I included <errno.h> and printed
>>> the error as described here
>>>
>>>
>>> http://stackoverflow.com/questions/8633909/what-is-the-reason-for-fopens-failure-to-open-a-file
>>>
>>> The error is 2 which means "No such file or directory" according to
>>>
>>> http://www.thegeekstuff.com/2010/10/linux-error-codes/
>>>
>>> This is rather puzzling because I can see solver.cl present in the same
>>> directory as primitive_util.c. Moreover, fopen() is a function that I've
>>> used time and time again and I haven't this kind of error before. I also
>>> verified that the file has read access.
>>>
>>> Thank you for your patience! I'm just running into issue after issue. I
>>> really appreciate your guidance.
>>>
>>
>> Yeah the OpenCL support is kind of experimental. More than half of the
>> trouble is getting OpenCL itself to be properly configured on your system.
>> I expect the distros to eventually get that right but it's sure taking a
>> while.
>>
>> I know what's the problem here. It's searching for the .cl files to
>> compile at run-time. The .cl files are supposed to be installed to some
>> directory in the current path.
>>
>> Just manually copy or link the .cl files to your current directory '.'.
>> The list of .cl files you need to copy or link to is:
>> solver.cl
>>
>> arb8_shot.cl
>> bot_shot.cl
>> ehy_shot.cl
>> ell_shot.cl
>> sph_shot.cl
>> rec_shot.cl
>> tgc_shot.cl
>> tor_shot.cl
>>
>> rt.cl
>>
>
>
>> The current paths should be something like librt/primitives/*.cl ,
>> librt/primitives/*/*_shot.cl
>> You should just place them all in the current directory.
>>
>
> PS: This should be improved with some kind of smart way to find the
> directory where the files are in, or at least by looking the directory up
> in an environment variable, but the current clt_init and clt_read_code
> aren't that smart. You should have got some output error message like
> "failed to read OpenCL code file (solver.c)".
>
>
>>
>>
>>> Best,
>>> Param
>>>
>>> On Thu, Mar 17, 2016 at 1:15 AM Vasco Alexandre da Silva Costa <
>>> vasco.co...@gmail.com> wrote:
>>>
>>>> On Wed, Mar 16, 2016 at 7:36 PM, Vasco Alexandre da Silva Costa <
>>>> vasco.co...@gmail.com> wrote:
>>>>
>>>>> On Wed, Mar 16, 2016 at 7:28 PM, Param Hanji <
>>>>> param.catchch...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Installing the AMD SDK gave me OpenCL 1.2 support. I managed to
>>>>>> configure cmake using cmake-gui and built successfully. But raytrace
>>>>>> still
>>>>>> doesn't happen on my GPU. By adding fprintf statements, I found out that
>>>>>> execution does indeed enter the #ifdef USE_OPENCL block at rt/main.c.
>>>>>> However the if following block (if (opencl_mode)) is not entered.
>>>>>>
>>>>>> opencl_mode is set at opt.c at case: 'z'. I still don't know why its
>>>>>> value doesn't change even if use -z option.
>>>>>>
>>>>>
>>>>> I think it is '-z 1'. The '-z' option currently requires a numeric
>>>>> argument.
>>>>> '1' to enable OpenCL mode and '0' to disable it.
>>>>>
>>>>
>>>> The code is like this (opt.c):
>>>>
>>>> case 'z':
>>>> opencl_mode = atoi( bu_optarg );
>>>> break;
>>>>
>>>> I did it this way because I added a toggle button in the MGED File ->
>>>> Raytrace panel where you can enable or disable OpenCL mode. The toggle is
>>>> either '0' or '1' depending on its status.
>>>>
>>>> --
>>>> Vasco Alexandre da Silva Costa
>>>> PhD in Computer Engineering (Computer Graphics)
>>>> Instituto Superior Técnico/University of Lisbon, Portugal
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Transform Data into Opportunity.
>>>> Accelerate data analysis in your applications with
>>>> Intel Data Analytics Acceleration Library.
>>>> Click to learn more.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
>>>> _______________________________________________
>>>> BRL-CAD Developer mailing list
>>>> brlcad-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Transform Data into Opportunity.
>>> Accelerate data analysis in your applications with
>>> Intel Data Analytics Acceleration Library.
>>> Click to learn more.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
>>> _______________________________________________
>>> BRL-CAD Developer mailing list
>>> brlcad-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>
>>>
>>
>>
>> --
>> Vasco Alexandre da Silva Costa
>> PhD in Computer Engineering (Computer Graphics)
>> Instituto Superior Técnico/University of Lisbon, Portugal
>>
>
>
>
> --
> Vasco Alexandre da Silva Costa
> PhD in Computer Engineering (Computer Graphics)
> Instituto Superior Técnico/University of Lisbon, Portugal
>
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel