# OpenCL clGetPlatformIDs returns zero platforms

**URL:** <https://forums.developer.nvidia.com/t/opencl-clgetplatformids-returns-zero-platforms/13813>\
**Category:** CUDA Programming and Performance\
**Created:** [December 15, 2009, 4:53pm UTC](https://forums.developer.nvidia.com/t/opencl-clgetplatformids-returns-zero-platforms/13813 "2009-12-15T16:53:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![coleb](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@coleb](https://forums.developer.nvidia.com/u/coleb)\
**Post date:** [December 15, 2009, 4:53pm UTC](https://forums.developer.nvidia.com/t/opencl-clgetplatformids-returns-zero-platforms/13813/1 "2009-12-15T16:53:53Z")

</div>

clGetPlatformIDs(0, NULL, &n) is returning zero for ‘n’. I just installed this driver: cudadriver\_3.0-beta1\_linux\_64\_195.17-beta.run

I’m on a CentOS 5.3 machine. There is a tesla card for compute and a quadro for the video card. It appears the lspci recognizes that the devices are there:

```auto
coleb@tesla/scr/coleb/oecl$ /sbin/lspci 

00:00.0 Host bridge: Intel Corporation 5400 Chipset Memory Controller Hub (rev 20)

00:01.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 1 (rev 20)

00:05.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 5 (rev 20)

00:09.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 9 (rev 20)

00:10.0 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.1 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.2 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.3 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:10.4 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)

00:11.0 Host bridge: Intel Corporation 5400 Chipset CE/SF Registers (rev 20)

00:15.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:15.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:16.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:16.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)

00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09)

00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)

00:1d.0 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)

00:1d.1 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)

00:1d.2 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)

00:1d.3 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)

00:1d.7 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)

00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)

00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)

00:1f.2 SATA controller: Intel Corporation 631xESB/632xESB SATA AHCI Controller (rev 09)

00:1f.3 SMBus: Intel Corporation 631xESB/632xESB/3100 Chipset SMBus Controller (rev 09)

01:00.0 3D controller: nVidia Corporation Unknown device 05e7 (rev a1)

05:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 290 (rev a1)

09:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)

09:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)

0a:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)

0a:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)

0a:02.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E3 (rev 01)

0f:00.0 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

0f:00.1 Ethernet controller: Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper) (rev 01)

1f:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 04)

20:05.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

```

Any hints to getting the NVidia OpenCL recognize there’s a platform?

---

<div class="post-metadata">

**Author:** ![coleb](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@coleb](https://forums.developer.nvidia.com/u/coleb)\
**Post date:** [December 15, 2009, 5:54pm UTC](https://forums.developer.nvidia.com/t/opencl-clgetplatformids-returns-zero-platforms/13813/2 "2009-12-15T17:54:46Z")

</div>

Strange, I’ve tracked the problem down to being logged in as root. If I log in as root, everything works fine, logged in as a regular user I get zero platforms back. So how do I run things not as root?
