From: Karl R. <ru...@iu...> - 2012-02-08 12:18:43
|
Hi Tobias, your mac with two GPUs and one CPU is a bit challenging ;-) I assume that the problem is due to one of the GPUs being disabled. As a remedy, configure ViennaCL to use only one device within the context. This is achieved with the following two steps: Step 1: Change viennacl::ocl::context.hpp, line 126: Replace '!= devices_.end()' by '== devices_.end()'. This is a bugfix for version 1.2.0 and will be fixed in 1.2.1. Step 2: In your application (i.e. each of the examples), add std::vector<cl_device_id> context_devices(1); context_devices[0] = viennacl::ocl::platform().devices(CL_DEVICE_TYPE_ALL)[0].id(); viennacl::ocl::setup_context(0, context_devices); prior to instantiating any ViennaCL types (e.g. at the very beginning of main()). In this way only the first device (Geforce 9400M) is used. You can switch through the devices by using a different device index for the array of devices returned from the platform. Depending on the currently active GPU, you may have to use the Geforce 9600M (index 2). Please let me know whether this works for you. Thanks and best regards, Karli On 02/08/2012 12:36 PM, T Public wrote: > Hello Karl, > > below is the output of viennacl-info. > > Thanks for your quick reply and sorry for the "no subject". > > Regards, > Tobias > > > # > # ViennaCL uses the OpenCL platform from Apple: OpenCL 1.0 (Aug 22 2010 > 18:08:16) on this machine. > # > # Available Devices: > # ========================================= > ----------------------------------------- No.: 0 > Name: GeForce 9400M > Compute Units: 2 > Workgroup Size: 512 > Global Memory: 256 MB > Local Memory: 16 KB > Max-alloc Memory: 128 MB > Double Support: 0 > Driver Version: CLH 1.0 > ----------------------------------------- > ----------------------------------------- > No.: 1 Name: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz > Compute Units: 2 > Workgroup Size: 1 > Global Memory: 6144 MB > Local Memory: 16 KB > Max-alloc Memory: 1536 MB > Double Support: 1 Driver Version: 1.0 > ----------------------------------------- > ----------------------------------------- > No.: 2 Name: GeForce 9600M GT > Compute Units: 4 Workgroup Size: 512 > Global Memory: 256 MB > Local Memory: 16 KB > Max-alloc Memory: 128 MB > Double Support: 0 > Driver Version: CLH 1.0 > ----------------------------------------- > # ========================================= > > > > 2012/2/8 Karl Rupp <ru...@iu... <mailto:ru...@iu...>> > > Hi Tobias, > > could you please report the output of examples/tutorial/viennacl-info? > > Thanks and best regards, > Karli > > > > On 02/08/2012 12:05 PM, T Public wrote: > > Hi, > > I'd like to evaluate the ViennaCL library, but always run into > the same > error. The cmake and make scripts finish without complaining > anything, > but when I run any compiled example I get the following error > message: > > terminate called after throwing an instance of > 'viennacl::ocl::device_not_available' > what(): ViennaCL: FATAL ERROR: CL_DEVICE_NOT_AVAILABLE > ViennaCL could not use the compute device because it is not > available. > If you think that this is a bug in ViennaCL, please report it at > vie...@li... > <mailto:vie...@li...> > <mailto:vie...@li... > <mailto:vie...@li...>> and supply at > least the > following information: > * Operating System > *Which OpenCL implementation (AMD, NVIDIA, etc.) > * ViennaCL version Many thanks in advance! Abort trap > > > I'm testing on a MacBook Pro (Mac OS X 10.6.6 with a 2.66 GHZ > Intel Core > 2 Duo Processor). > > > Any idea how to fix that? > > Thanks > Tobias > > > > > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft > developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, > CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > > > > _______________________________________________ > ViennaCL-support mailing list > Vie...@li... > <mailto:Vie...@li...> > https://lists.sourceforge.net/lists/listinfo/viennacl-support > > > |