Re: RFS: viennacl
On Thu 11 Aug 2011 01:08:32 PM CEST, Michael Wild wrote:
> On Thu 11 Aug 2011 01:02:18 PM CEST, Michael Tautschnig wrote:
>> Hi again,
>>
>> [...]
>>>> I've only got one concern left: all of the tests fail with
>>>>
>>>> terminate called after throwing an instance of 'viennacl::ocl::unknown_error'
>>>>
>> [...]
>>>
>>> What do you have in mind about the diagnostics? I could think of first
>>> checking whether the GPU supports OpenCL and only then run the tests.
>>> Otherwise it would print a message. I'll talk to upstream and see
>>> whether they have a suggestion on how to detect GPU programming support
>>> a priori.
>>>
>>
>> Detecting missing OpenCL support and not running the tests is probably the ideal
>> solution. When speaking of diagnostics, however, I primarily thought of some
>> specific error message that clearly tells that the test failed because of
>> missing hardware support - "unknown_error" doesn't sound like such a specific
>> error.
>>
>> Thanks a lot for your work,
>> Michael
>
> Defining VIENNACL_DEBUG_ALL should print some more info about where the
> error occurred (see viennacl/ocl/error.hpp).
>
> Michael
What does the following simple program print (link it against
libOpenCL)?
#include <viennacl/ocl/platform.hpp>
using namespace std;
int main()
{
vector<viennacl::ocl::device> devices =
viennacl::ocl::platform().devices();
vector<viennacl::ocl::device>::const_iterator f = devices.begin(),
e = devices.end();
for (; f!=e; ++f)
{
cout<< "Found device with id = " << f->id() << ". Info:\n"
<< f->info() << endl;
}
}
Michael
Reply to: