Using "AMD Radeon R9 200 Series"

Hi,

How to use pgi/fortran/openacc to create an executable for “AMD Radeon R9 200 Series”?

Compilerversion: 14.10; OS: Windows 8.1

I tried using

pgi -tp=p7 -ta=radeon simple.for

The executable crashes with

E:\hydroas>simple_radeon.exe
call to clEnqueueTask returned error -4: memory object allocation failure

Device-info:

C:\temp\pgi>pgaccelinfo.exe

OpenCL Platform:               AMD Accelerated Parallel Processing
OpenCL Vendor:                 Advanced Micro Devices, Inc.

Device Number:                 0
Device Name:                   Hawaii
Available:                     Yes
Compiler Available:            Yes
Board Name:                    AMD Radeon R9 200 Series
Device Version:                OpenCL 1.2 AMD-APP (1642.5)
Global Memory Size:            3221225472
Maximum Object Size:           2899102924
Global Cache Size:             16384
Free Memory:                   4158681000
Max Clock (MHz):               1000
Compute Units:                 44
SIMD Units:                    4
SIMD Width:                    16
GPU Cores:                     2816
Wavefront Width:               64
Constant Memory Size:          65536
Local Memory Size:             32768
Workgroup Size:                256
Address Bits:                  32
ECC Support:                   No

Best regards
Benedikt

Hi Benedikt,

Support for the “Hawaii” architecture which your Radeon uses was added in PGI 15.1 . Once you have updated compiler, you’ll then use the “-ta=radeon:hawaii” to target your device.

Hope this helps,
Mat

Hi Mat,

thanks for the quick reply. I still get the same error message even with Compilerversion 15.4 .

I tried:

pgf90.exe -tp=p7 -acc -ta=radeon:hawaii -Mbackslash -Minfo -Mpreprocess simple.for -o simplehawaii32.exe

Here is my code

!$acc data copy (SUMME)
!$acc kernels  
!$acc loop vector reduction(+:SUMME)
      DO 77 M=1,ANZ
          SUMME = SUMME + sin(REAL(M))**5
 77   CONTINUE

!$acc end kernels 
!$acc end data 
      TEST = SUMME

My compiler machine has no amd graphics installed. I am crosscompiling for a test system. Maybe a problem?

Any suggestions?

Best regards
Benedikt


x:\hydro\Hydro_AS\tests>…\pgi\pgaccelinfo.exe

OpenCL Platform: AMD Accelerated Parallel Processing
OpenCL Vendor: Advanced Micro Devices, Inc.

Device Number: 0
Device Name: Hawaii
Available: Yes
Compiler Available: Yes
Board Name: AMD Radeon R9 200 Series
Device Version: OpenCL 2.0 AMD-APP (1642.5)
Global Memory Size: 4294967296
Maximum Object Size: 3018326016
Global Cache Size: 16384
Free Memory: 4154442000
Max Clock (MHz): 1000
Compute Units: 44
SIMD Units: 4
SIMD Width: 16
GPU Cores: 2816
Wavefront Width: 64
Constant Memory Size: 65536
Local Memory Size: 32768
Workgroup Size: 256
Address Bits: 64
ECC Support: No
PGI Compiler Option: -ta=radeon:hawaii

My compiler machine has no amd graphics installed. I am crosscompiling for a test system. Maybe a problem?

Unfortunately the AMD OCL runtime library that was used to build the binary must be copied over to the other system. You don’t need to replace what’s installed, but just need to have the directory where the DLL is in your PATH environment.

The DLL can be found in: C:\Program Files\PGI\win64\2015\radeon\1310\lib\amdocl64.dll

Granted, I don’t know if this is actually the issue your encountering, but please give it a try.

Thanks,
Mat

Hi Mat,

thanks for the hints. Benedikt is happy and I have a maschine to test our application.

Brilliant.

Maybe I have to dig more deeper into the manuals.

Best Regards
Frank