Hi,

 > I’ve just installed viennacl from the Ubuntu package management system
> which installed the OpenCL librairies.

If I remember correctly, the OpenCL libraries pulled in via the package 
manager are just stub files.

> As I want to run OpenCl only on
> the CPU, do I need to install any driver? By the way, it was an instance
> on Amazon Web Services.

I see two simple options to get this going:
  a) use the CPU backend of ViennaCL, in which case you don't need to 
worry about OpenCL at all.
  b) Install either AMD's APP SDK, Intel's OpenCL SDK or any other 
freely available OpenCL implementation for the CPU.

You may also want to try the latest 1.6.2 release of ViennaCL rather 
than the older releases included in the package manager, as performance 
was improved over time and new features were added.

Best regards,
Karli


>
> François Fayard
> Founder & Consultant - Inside Loop
> Web: www.insideloop.io <http://www.insideloop.io>
> Twitter: @insideloop_io
>
>> On 13 May 2015, at 20:25, Karl Rupp <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi François,
>>
>> this looks a lot like the OpenCL driver does not work. Are you able to
>> run any OpenCL samples at all? Did you install the respective vendor
>> driver?
>>
>> Best regards,
>> Karli
>>
>>
>> On 05/13/2015 07:02 PM, François Fayard wrote:
>>> Thanks Karl.
>>>
>>> I have moved to Ubuntu 12.04 LTS with ViennaCL from the distribution.
>>> Now, the same program (with the line uncommented) gives me:
>>>
>>> ubuntu@ip-172-31-12-135:~$ g++ -std=c++11 -Ofast vienna-main.cpp -o main
>>> -lOpenCL
>>> ubuntu@ip-172-31-12-135:~$ ./main
>>> terminate called after throwing an instance of
>>> 'viennacl::ocl::unknown_error'
>>>   what():  ViennaCL: FATAL ERROR: ViennaCL encountered an unknown
>>> OpenCL error. In some cases, this might be due to an invalid global work
>>> size, but it can also be due to several compilation errors.
>>> If you think that this is a bug in ViennaCL, please report it at
>>> [email protected]
>>> <mailto:[email protected]>
>>> <mailto:[email protected]> and supply at least the
>>> following information:
>>>  * Operating System
>>>  * Which OpenCL implementation (AMD, NVIDIA, etc.)
>>>  * ViennaCL version
>>> Many thanks in advance!
>>> Aborted (core dumped)
>>>
>>> François Fayard
>>> Founder & Consultant - Inside Loop
>>> Tel: +33 (0)6 01 44 06 93 <tel:+33%206%2001%2044%2006%2093>
>>> Web:www.insideloop.io
>>> <http://www.insideloop.io/><http://www.insideloop.io
>>> <http://www.insideloop.io/>>
>>> Twitter: @insideloop_io
>>>
>>>> On 13 May 2015, at 13:57, Karl Rupp <[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]>> wrote:
>>>>
>>>> Hi François,
>>>>
>>>> this is an issue we have observed recently: The OpenCL SDK on MacOS
>>>> now requires local work group sizes of 1, whereas some of our kernels
>>>> currently require higher local work sizes. Thus, for the time being I
>>>> can only recommend to only use the GPU on MacOS. We aim to fix this in
>>>> an upcoming release, but unfortunately this is not easy to solve.
>>>>
>>>> Best regards,
>>>> Karli
>>>>
>>>>
>>>> On 05/13/2015 11:49 AM, François Fayard wrote:
>>>>> Hi,
>>>>>
>>>>> I would like to use ViennaCL in order to use the block-ILU0
>>>>> preconditioner to solve iteratively my linear system using the 4 cores
>>>>> of my Macbook Pro. I am using Mac OSX 10.10.3 and ViennalCL 1.6.2.
>>>>>
>>>>> I have no problem running the following program on what I think is
>>>>> the GPU.
>>>>>
>>>>> #include <iostream>
>>>>> #include <vector>
>>>>>
>>>>> #define VIENNACL_WITH_OPENCL
>>>>> #include <viennacl/scalar.hpp>
>>>>> #include <viennacl/vector.hpp>
>>>>> #include <viennacl/compressed_matrix.hpp>
>>>>> #include <viennacl/linalg/bicgstab.hpp>
>>>>> #include <viennacl/linalg/ilu.hpp>
>>>>>
>>>>> int main(int argc, const char *argv[])
>>>>> {
>>>>>    //viennacl::ocl::set_context_device_type(0,
>>>>> viennacl::ocl::cpu_tag());
>>>>>    auto n = std::size_t{1000};
>>>>>
>>>>>    auto cpu_sparse_matrix = std::vector<std::map<unsigned int,
>>>>> float>>(n);
>>>>>    for (std::size_t i = 0; i < n; i++) {
>>>>>        cpu_sparse_matrix[i][i] = 1.0;
>>>>>    }
>>>>>    auto vcl_matrix = viennacl::compressed_matrix<float>(n, n);
>>>>>    viennacl::copy(cpu_sparse_matrix, vcl_matrix);
>>>>>
>>>>>
>>>>>    auto vcl_rhs = viennacl::vector<float>(n);
>>>>>    for (std::size_t i = 0; i < n; i++) {
>>>>>        vcl_rhs[i] = 1.0;
>>>>>    }
>>>>>
>>>>>    auto vcl_block_ilu0 = viennacl::linalg::block_ilu_precond<
>>>>>        viennacl::compressed_matrix<float>, viennacl::linalg::ilu0_tag>(
>>>>>        vcl_matrix, viennacl::linalg::ilu0_tag());
>>>>>
>>>>>    auto vcl_result = viennacl::linalg::solve(vcl_matrix, vcl_rhs,
>>>>>        viennacl::linalg::bicgstab_tag(), vcl_block_ilu0);
>>>>>
>>>>>    std::cout << vcl_result[0] << std::endl;
>>>>>    std::cout << vcl_result[n - 1] << std::endl;
>>>>>
>>>>>
>>>>>    return 0;
>>>>> }
>>>>>
>>>>> The bad news come when I want to use the CPU, and I uncomment the first
>>>>> line of the program. I get the following message:
>>>>>
>>>>> clang++ -std=c++11 -I/usr/local/viennacl/include -framework OpenCL
>>>>> vienna-main.cpp -o main
>>>>> ./main
>>>>>
>>>>> ViennaCL: FATAL ERROR: Kernel start failed for '_norm_2_0'.
>>>>> ViennaCL: Smaller work sizes could not solve the problem.
>>>>> libc++abi.dylib: terminating with uncaught exception of type
>>>>> viennacl::ocl::invalid_work_group_size: ViennaCL: FATAL ERROR:
>>>>> CL_INVALID_WORK_GROUP_SIZE
>>>>> The supplied work group size is invalid. If you have set this value
>>>>> manually, please reconsider your choice.
>>>>> If you think that this is a bug in ViennaCL, please report it at
>>>>> [email protected]
>>>>> <mailto:[email protected]>
>>>>> <mailto:[email protected]>
>>>>> <mailto:[email protected]> and supply at least the
>>>>> following information:
>>>>> * Operating System
>>>>> * Which OpenCL implementation (AMD, NVIDIA, etc.)
>>>>> * ViennaCL version
>>>>> Many thanks in advance!
>>>>> Abort trap: 6
>>>>>
>>>>> Is there something I have not done correctly ?
>>>>>
>>>>> François Fayard
>>>>> Founder & Consultant - Inside Loop
>>>>> Tel: +33 (0)6 01 44 06 93 <tel:+33%206%2001%2044%2006%2093>
>>>>> Web:www.insideloop.io
>>>>> <http://www.insideloop.io/><http://www.insideloop.io
>>>>> <http://www.insideloop.io/>
>>>>> <http://www.insideloop.io/>>
>>>>> Twitter: @insideloop_io
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> One dashboard for servers and applications across
>>>>> Physical-Virtual-Cloud
>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>> Performance metrics, stats and reports that give you Actionable
>>>>> Insights
>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ViennaCL-support mailing list
>>>>> [email protected]
>>>>> <mailto:[email protected]>
>>>>> <mailto:[email protected]>
>>>>> https://lists.sourceforge.net/lists/listinfo/viennacl-support
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>
>>>
>>>
>>> _______________________________________________
>>> ViennaCL-support mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/viennacl-support
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>
>
>
> _______________________________________________
> ViennaCL-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/viennacl-support
>


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
ViennaCL-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-support

Reply via email to