cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

yurtesen
Miniboss

Re: Linux 290x OpenCL ?

Hi Oliver,

I think this may help you. When I couldnt make it work in the Ubuntu 12.04, I have started upgrading the box to newer versions, 12.10, 13.04 and then to 13.10 and it still didnt work.

What I did was to remove the AMD APP-SDK and Catalyst drivers, then install latest catalyst beta drivers from scratch. (I didnt test if installing APPSDK breaks it or not at this point, so please let me know if you test that). Then it started working all of a sudden. I have seen this before. Catalyst sometimes does not update OpenCL if APP-SDK is installed or APP-SDK does not update it if Catalyst is installed. Since the latest drivers are in Catalyst beta, I think it may be so that it didnt install some OpenCL stuff when it saw older APP-SDK and this caused 290x to not appear.

Please let me know if this helps you also (so I would know that I didnt have some random luck)

Thanks,

Evren

0 Likes
himanshu_gautam
Grandmaster

Re: Linux 290x OpenCL ?

Could you please check the same behaviour with latest driver 13.11 and  AMD APP SDK 2.9. In case of any issue i request you to report.

Thanks for your support.

0 Likes
dukeleto
Adept I

Re: Linux 290x OpenCL ?

Thanks for your responses, Yurtesen and Himanshu.

Following Yurtesen's suggestion, I removed everything and tried first installing just the drivers.

On 13.10 it does indeed work: the GPU is correctly detected by clinfo and cl binaries run properly.

Simply installing the AMD-APP sdk then inhibits the GPU detection by default.

However, I now know the reason and can manually correct it: the wrong version (i.e. the AMD-APP version)

of libOpenCL is found by the dynamic linker.

For example, running  'ldd /usr/bin/clinfo' gets me ' libOpenCL.so.1 => /opt/AMDAPP/lib/x68_64/libOpenCL.so.1

instead of the fglrx-provided library. If I correct this by hand for example by exporting

LD_LIBRARY_PATH=/usr/lib/fglrx/:$LD_LIBRARY_PATH, it works properly.

I have not yet tried looking at the install script to find the culprit line, but I imagine this should not be too hard to

correct in the sdk?

Cheers,

Olivier

yurtesen
Miniboss

Re: Linux 290x OpenCL ?

Himanshu, it appears that when APP SDK is installed, the Catalyst is not installing some files so we are forced to use some old OpenCL library which doesnt support 290x cards and that caused my problem. Perhaps you should make the installer check if the installed version is newer or not and overwrite if it is older. I have been bitten by this several times already.

0 Likes
bherren
Journeyman III

Re: Linux 290x OpenCL ?

I have reproduced on a fresh install of Ubuntu Saucy, latest Catalyst 3.11 beta and SDK 2.9

What happens is that the SDK install modifies /etc/profile and adds these lines:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/opt/AMDAPP/lib/x86_64":"/opt/AMDAPP/lib/x86"

export LD_LIBRARY_PATH

(among others)

This has the effect of overriding system libraries with whatever is in there, which is:

benh@plonk:~/grabbag/cgminer$ ls -l /opt/AMDAPP/lib/x86_64/

total 37604

-rw-r--r-- 1 501 502 37294832 Oct 30 21:38 libamdocl64.so

-rw-r--r-- 1 501 502   428135 Oct 30 21:38 libGLEW.so

-rw-r--r-- 1 501 502   753434 Oct 30 21:38 libglut.so

lrwxrwxrwx 1 501 502       14 Oct 30 21:52 libOpenCL.so -> libOpenCL.so.1

-rw-r--r-- 1 501 502    23720 Oct 30 21:38 libOpenCL.so.1

So out libamddocl64.so and libOpenCL.so.1 from fglrx are being overriden by the ones in

the SDK which aren't functional.

I've for now removed the LD_LIBRARY_PATH override from my /etc/profile

0 Likes
bherren
Journeyman III

Re: Linux 290x OpenCL ?

So it appears that this isn't sufficient.

The SDK installer also adds a pair of scripts to /etc/ld.so.conf.d which add the SDK to the system library

path as well (why both approaches ?). So I had to remove these and an ldconfig later, things are now working.

0 Likes
retrogradeorbit
Journeyman III

Re: Linux 290x OpenCL ?

I had the same issue and my investigations concluded that OpenCL on linux using R290 does not work with the latest drivers.

I replaced my R290 with an R280 and everything immediately started working.

See my thread here: http://devgurus.amd.com/thread/167930

0 Likes
pinform
Staff
Staff

Re: Linux 290x OpenCL ?

Thanks, all, for your inputs.

I have reported this issue to the SDK development team.

0 Likes
aleshka
Journeyman III

Re: Linux 290x OpenCL ?

Almost same problem with Ubuntu 13.04, 3.8.0-19-generic, amd-catalyst-13.11-beta V9.4

After few minutes of workin'g I'm see this message in dmesg:

[ 1810.519789] divide error: 0000 [#1] SMP
[ 1810.519793] Modules linked in: vesafb(F) bnep rfcomm bluetooth ppdev(F) parport_pc(F) snd_hda_codec_hdmi mac_hid wmi snd_hda_codec_realtek snd_hda_intel kvm_amd snd_hda_codec snd_hwdep(F) kvm snd_pcm(F) snd_seq_midi(F) snd_seq_midi_event(F) snd_page_alloc(F) snd_rawmidi(F) fglrx(POF) snd_seq(F) snd_seq_device(F) snd_timer(F) psmouse(F) k10temp serio_raw(F) amd_iommu_v2 edac_core sp5100_tco snd(F) edac_mce_amd i2c_piix4 lp(F) parport(F) microcode(F) soundcore(F) usb_storage(F) firewire_ohci firewire_core crc_itu_t(F) floppy(F) pata_acpi r8169 pata_atiixp ahci(F) libahci(F)
[ 1810.519813] CPU 3
[ 1810.519817] Pid: 1495, comm: Xorg Tainted: PF          O 3.8.0-19-generic #29-Ubuntu Gigabyte Technology Co., Ltd. GA-MA785GT-UD3H/GA-MA785GT-UD3H
[ 1810.519819] RIP: 0010:[<ffffffffa033ba81>]  [<ffffffffa033ba81>] CIslands_FanCtrl_SetFanSpeedRPM+0x71/0x160 [fglrx]
[ 1810.519912] RSP: 0018:ffff880256839ce0  EFLAGS: 00010246
[ 1810.519914] RAX: 00000000608f3d00 RBX: ffff8802568ed028 RCX: 0000000000000000
[ 1810.519915] RDX: 0000000000000000 RSI: 0000000000000080 RDI: ffff8802568ed00c
[ 1810.519916] RBP: ffff8802568ed00c R08: 00000000c05001a0 R09: ffff880260b82008
[ 1810.519917] R10: ffff880260b82008 R11: ffffffffa017529e R12: 0000000000000000
[ 1810.519918] R13: 0000000000000001 R14: 00007fffaa2c7330 R15: 0000000000000000
[ 1810.519920] FS:  00007f4bd802e940(0000) GS:ffff88026fd80000(0000) knlGS:0000000000000000
[ 1810.519921] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1810.519922] CR2: 00007f488eceeff0 CR3: 0000000255d60000 CR4: 00000000000007e0
[ 1810.519923] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1810.519925] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1810.519926] Process Xorg (pid: 1495, threadinfo ffff880256838000, task ffff880255d68000)
[ 1810.519927] Stack:
[ 1810.519928]  ffff88025599380c ffffffffa02bf600 0000000000000000 ffffffffa02bf612
[ 1810.519931]  0000000000000000 ffffffffa02dfff9 ffff88024d2d3c90 ffff880256839d90
[ 1810.519933]  ffff88024d2d3c90 0000000000000000 ffff8802617c0000 ffffffffa02d5c0b
[ 1810.519934] Call Trace:
[ 1810.520000]  [<ffffffffa02bf600>] ? PHM_SetFanSpeedPercent+0x50/0x50 [fglrx]
[ 1810.520061]  [<ffffffffa02bf612>] ? PHM_SetFanSpeedRPM+0x12/0x50 [fglrx]
[ 1810.520122]  [<ffffffffa02dfff9>] ? PEM_SetFanSpeed+0x79/0xa0 [fglrx]
[ 1810.520184]  [<ffffffffa02d5c0b>] ? PEM_CWDDEPM_OD6_SetFanSpeed+0xcb/0x1c0 [fglrx]
[ 1810.520215]  [<ffffffffa0175253>] ? KCL_MEM_SmallBufferAlloc+0x13/0x20 [fglrx]
[ 1810.520276]  [<ffffffffa02d1ee9>] ? PP_Cwdde+0x109/0x180 [fglrx]
[ 1810.520312]  [<ffffffffa01b12d0>] ? firegl_pplib_cwddepm_call+0x1e0/0x250 [fglrx]
[ 1810.520349]  [<ffffffffa01b10f0>] ? firegl_pplib_iri_call+0x2f0/0x2f0 [fglrx]
[ 1810.520381]  [<ffffffffa018420d>] ? firegl_ioctl+0x1ed/0x250 [fglrx]
[ 1810.520412]  [<ffffffffa017355e>] ? ip_firegl_unlocked_ioctl+0xe/0x20 [fglrx]
[ 1810.520415]  [<ffffffff811a5919>] ? do_vfs_ioctl+0x99/0x570
[ 1810.520417]  [<ffffffff811a5e81>] ? sys_ioctl+0x91/0xb0
[ 1810.520420]  [<ffffffff81194372>] ? sys_read+0x52/0xa0
[ 1810.520423]  [<ffffffff816d379d>] ? system_call_fastpath+0x1a/0x1f
[ 1810.520424] Code: 00 00 00 48 89 ef 48 8d 5d 1c e8 7b 7a ff ff 48 89 ef 31 d2 89 c6 42 8d 0c e5 00 00 00 00 69 f6 c0 27 09 00 89 f0 be 80 00 00 00 <f7> f1 ba 70 00 30 c0 41 89 c4 e8 60 e6 f8 ff 48 89 ef 83 e0 07
[ 1810.520442] RIP  [<ffffffffa033ba81>] CIslands_FanCtrl_SetFanSpeedRPM+0x71/0x160 [fglrx]
[ 1810.520498]  RSP <ffff880256839ce0>
[ 1810.520500] ---[ end trace 37b7ba659289f656 ]---

0 Likes
bherren
Journeyman III

Re: Linux 290x OpenCL ?

Thanks !

You may also want to report the issue aleshka just posted, it's a common one. It appears that passing incorrect

parameters to any of the Fan control ioctls causes that Oops (some division by 0 in the kernel apparently) which

in turns kills X.

The kernel driver should definitely do a bit of sanity checking of the arguments passed to it.

One common cause of that one is "cgminer" which has a bug in the fan control code causing this to happen

when you quit it. (For those interested, veox maintains a fork for GPU scrypt mining only in which he applied

a fix I sent him for this problem at https://github.com/veox/cgminer).

Cheers,

Ben.

0 Likes