OpenCL clGetPlatformIDs returns zero platforms

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:

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?

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?