cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

daisuken
Journeyman III

OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Hello,

I'm trying to use OpenCL 1.2 on the following environment:

- DELL Workstation T7910

- AMD FirePro W4100

- Ubuntu 16.04.3 (upgraded from 16.04.2)

- amdgpu-pro driver 17.30-465504 for Ubuntu 16.04.3 (the latest one which fixed incompatibility issue between Ubuntu 16.04.3 and amdgpu-driver 17.30)

- AMD-APP-SDK-v3.0.130.136-GA-linux64

On this system, 'clinfo' shows 2 platforms 'Clover/Mesa' and 'AMD Accelerated Parallel Processing/Advanced Micro Devices, Inc.'.

A simple OpenCL program which just does clCreateCommandQueue() with the AMD GPU Pro platform fails with error code '-6' (out of host memory), while it succeeds with Clover.

The system has plenty of RAM (64GB), and it looks unlikely to be lacking host memory.

Is the latest AMD GPU PRO driver for Ubuntu successfully supporting the FirePro W4100 graphics board? (I have already confirmed the board is in the supported list of the driver, though)

Or, does something look wrong with any part of configuration or installation?

At least, I can use the Ubuntu's desktop without problem so far.

- The simple test program to reproduce the issue:

#include <stdio.h>

#include <stdlib.h>

#include <CL/cl.h>

static void print_device_info(cl_device_id device_id, cl_device_info info_name, const char* label);

static void print_platform_info(cl_platform_id platform_id, cl_platform_info info_name, const char* label);

int main(int argc, char** argv) {

    cl_platform_id *platform_ids = NULL;

    cl_device_id *device_ids = NULL;

    cl_context context = NULL;

    cl_command_queue command_queue = NULL;

    cl_uint ndevices;

    cl_uint nplatforms;

    cl_int ret;

    int i, j;

    if (clGetPlatformIDs(0, NULL, &nplatforms) != CL_SUCCESS) {

        fprintf(stderr, "failed to get platforms count\n");

        exit(1);

    }

    fprintf(stdout, "nplatforms=%d\n\n", nplatforms);

    platform_ids = (cl_platform_id *)malloc(nplatforms * sizeof(cl_platform_id));

    if (clGetPlatformIDs(nplatforms, platform_ids, NULL) != CL_SUCCESS) {

        fprintf(stderr, "failed to get platform ids\n");

        exit(1);

    }

    for (i = 0; i < nplatforms; i++) {

        fprintf(stdout, "Platform[%d]:\n", i);

        print_platform_info(platform_ids, CL_PLATFORM_NAME, "Platform Name");

        print_platform_info(platform_ids, CL_PLATFORM_PROFILE, "Platform Profile");

        print_platform_info(platform_ids, CL_PLATFORM_VERSION, "Platform Version");

        print_platform_info(platform_ids, CL_PLATFORM_VENDOR, "Platform Vendor");

        print_platform_info(platform_ids, CL_PLATFORM_EXTENSIONS, "Platform Extensions");

        if (clGetDeviceIDs(platform_ids, CL_DEVICE_TYPE_GPU, 0, NULL, &ndevices) != CL_SUCCESS) {

            fprintf(stderr, "failed to get devices count\n");

            continue;

        }

        fprintf(stdout, "ndevices=%d\n", ndevices);

        device_ids = (cl_device_id *)malloc(ndevices * sizeof(cl_device_id));

        if (clGetDeviceIDs(platform_ids, CL_DEVICE_TYPE_GPU, ndevices, device_ids, NULL) != CL_SUCCESS) {

            fprintf(stderr, "failed to get device ids\n");

            continue;

        }

        for (j = 0; j < ndevices; j++) {

            fprintf(stdout, "Device[%d]:\n", j);

            print_device_info(device_ids, CL_DEVICE_NAME, "Device Name");

            print_device_info(device_ids, CL_DEVICE_PROFILE, "Device Profile");

            print_device_info(device_ids, CL_DEVICE_VERSION, "Device Version");

            print_device_info(device_ids, CL_DRIVER_VERSION, "Driver Version");

            print_device_info(device_ids, CL_DEVICE_VENDOR, "Device Vendor");

            print_device_info(device_ids, CL_DEVICE_OPENCL_C_VERSION, "OpenCL C Version");

            print_device_info(device_ids, CL_DEVICE_EXTENSIONS, "Device Extensions");

            context = clCreateContext(NULL, 1, &device_ids, NULL, NULL, &ret);

            fprintf(stdout, "CreateContext: ret=%d\n", ret);

            command_queue = clCreateCommandQueue(context, device_ids, 0, &ret);

            fprintf(stdout, "CreateCommandQueue: ret=%d\n", ret);

            if (command_queue != NULL) {

                clReleaseCommandQueue(command_queue);

            }

            if (context != NULL) {

                clReleaseContext(context);

            }

        }

        if (device_ids != NULL) {

            free(device_ids);

        }

        fprintf(stdout, "\n");

    }

    if (platform_ids != NULL) {

        free(platform_ids);

    }

    return 0;

}

static void print_device_info(cl_device_id device_id, cl_device_info info_name, const char* label) {

    char* data;

    size_t datasize;

    clGetDeviceInfo(device_id, info_name, 0, NULL, &datasize);

    data = (char*)malloc(datasize);

    clGetDeviceInfo(device_id, info_name, datasize, data, NULL);

    fprintf(stdout, "%s: %s\n", label, data);

    free(data);

}

static void print_platform_info(cl_platform_id platform_id, cl_platform_info info_name, const char* label) {

    char* data;

    size_t datasize;

    clGetPlatformInfo(platform_id, info_name, 0, NULL, &datasize);

    data = (char*)malloc(datasize);

    clGetPlatformInfo(platform_id, info_name, datasize, data, NULL);

    fprintf(stdout, "%s: %s\n", label, data);

    free(data);

}

- How to build the simple test program:

gcc -I /opt/amdgpu-pro/include -L/opt/amdgpu-pro/lib/x86_64-linux-gnu -o cltest cltest.c -Wl,-rpath,/opt/amdgpu-pro/lib/x86_64-linux-gnu -lOpenCL

- Output of the simple test program:

nplatforms=2

Platform[0]:

Platform Name: Clover

Platform Profile: FULL_PROFILE

Platform Version: OpenCL 1.1 Mesa 17.0.7

Platform Vendor: Mesa

Platform Extensions: cl_khr_icd

ndevices=1

Device[0]:

Device Name: AMD CAPE VERDE (DRM 3.16.0 / 4.10.0-33-generic, LLVM 4.0.0)

Device Profile: FULL_PROFILE

Device Version: OpenCL 1.1 Mesa 17.0.7

Driver Version: 17.0.7

Device Vendor: AMD

OpenCL C Version: OpenCL C 1.1

Device Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp64

CreateContext: ret=0

CreateCommandQueue: ret=0

Platform[1]:

Platform Name: AMD Accelerated Parallel Processing

Platform Profile: FULL_PROFILE

Platform Version: OpenCL 2.0 AMD-APP (2442.7)

Platform Vendor: Advanced Micro Devices, Inc.

Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

ndevices=1

Device[0]:

Device Name: Capeverde

Device Profile: FULL_PROFILE

Device Version: OpenCL 1.2 AMD-APP (2442.7)

Driver Version: 2442.7

Device Vendor: Advanced Micro Devices, Inc.

OpenCL C Version: OpenCL C 1.2

Device Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event

CreateContext: ret=0

CreateCommandQueue: ret=-6

- 'ldd' output:

        linux-vdso.so.1 =>  (0x00007fffd06f8000)

        libOpenCL.so.1 => /opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1 (0x00007fe7fee52000)

        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe7fea6a000)

        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe7fe861000)

        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe7fe558000)

        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe7fe354000)

        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe7fe136000)

        /lib64/ld-linux-x86-64.so.2 (0x000055d0668e1000)

- Output of 'clinfo':

Number of platforms:                             2

  Platform Profile:                              FULL_PROFILE

  Platform Version:                              OpenCL 1.1 Mesa 17.0.7

  Platform Name:                                 Clover

  Platform Vendor:                               Mesa

  Platform Extensions:                           cl_khr_icd

  Platform Profile:                              FULL_PROFILE

  Platform Version:                              OpenCL 2.0 AMD-APP (2442.7)

  Platform Name:                                 AMD Accelerated Parallel Processing

  Platform Vendor:                               Advanced Micro Devices, Inc.

  Platform Extensions:                           cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

  Platform Name:                                 Clover

Number of devices:                               1

  Device Type:                                   CL_DEVICE_TYPE_GPU

  Vendor ID:                                     1002h

  Max compute units:                             8

  Max work items dimensions:                     3

    Max work items[0]:                           256

    Max work items[1]:                           256

    Max work items[2]:                           256

  Max work group size:                           256

  Preferred vector width char:                   16

  Preferred vector width short:                  8

  Preferred vector width int:                    4

  Preferred vector width long:                   2

  Preferred vector width float:                  4

  Preferred vector width double:                 2

  Native vector width char:                      16

  Native vector width short:                     8

  Native vector width int:                       4

  Native vector width long:                      2

  Native vector width float:                     4

  Native vector width double:                    2

  Max clock frequency:                           630Mhz

  Address bits:                                  64

  Max memory allocation:                         1918531584

  Image support:                                 No

  Max size of kernel argument:                   1024

  Alignment (bits) of base address:              1024

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     No

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               No

    Round to +ve and infinity:                   No

    IEEE754-2008 fused multiply-add:             No

  Cache type:                                    None

  Cache line size:                               0

  Cache size:                                    0

  Global memory size:                            3220066304

  Constant buffer size:                          1918531584

  Max number of constant args:                   16

  Local memory type:                             Scratchpad

  Local memory size:                             32768

  Kernel Preferred work group size multiple:     64

  Error correction support:                      0

  Unified memory for Host and Device:            1

  Profiling timer resolution:                    0

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     No

  Queue on Host properties:

    Out-of-Order:                                No

    Profiling :                                  Yes

  Platform ID:                                   0x7f6f0863ae40

  Name:                                          AMD CAPE VERDE (DRM 3.16.0 / 4.10.0-33-generic, LLVM 4.0.0)

  Vendor:                                        AMD

  Device OpenCL C version:                       OpenCL C 1.1

  Driver version:                                17.0.7

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 1.1 Mesa 17.0.7

  Extensions:                                    cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp64

  Platform Name:                                 AMD Accelerated Parallel Processing

Number of devices:                               1

  Device Type:                                   CL_DEVICE_TYPE_GPU

  Vendor ID:                                     1002h

  Board name:                                    AMD FirePro W4100

  Device Topology:                               PCI[ B#3, D#0, F#0 ]

  Max compute units:                             4

  Max work items dimensions:                     3

    Max work items[0]:                           256

    Max work items[1]:                           256

    Max work items[2]:                           256

  Max work group size:                           256

  Preferred vector width char:                   4

  Preferred vector width short:                  2

  Preferred vector width int:                    1

  Preferred vector width long:                   1

  Preferred vector width float:                  1

  Preferred vector width double:                 1

  Native vector width char:                      4

  Native vector width short:                     2

  Native vector width int:                       1

  Native vector width long:                      1

  Native vector width float:                     1

  Native vector width double:                    1

  Max clock frequency:                           630Mhz

  Address bits:                                  32

  Max memory allocation:                         1408942080

  Image support:                                 Yes

  Max number of images read arguments:           128

  Max number of images write arguments:          8

  Max image 2D width:                            16384

  Max image 2D height:                           16384

  Max image 3D width:                            2048

  Max image 3D height:                           2048

  Max image 3D depth:                            2048

  Max samplers within kernel:                    16

  Max size of kernel argument:                   1024

  Alignment (bits) of base address:              2048

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     No

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               Yes

    Round to +ve and infinity:                   Yes

    IEEE754-2008 fused multiply-add:             Yes

  Cache type:                                    Read/Write

  Cache line size:                               64

  Cache size:                                    16384

  Global memory size:                            2131243008

  Constant buffer size:                          65536

  Max number of constant args:                   8

  Local memory type:                             Scratchpad

  Local memory size:                             32768

  Max pipe arguments:                            0

  Max pipe active reservations:                  0

  Max pipe packet size:                          0

  Max global variable size:                      0

  Max global variable preferred total size:      0

  Max read/write image args:                     0

  Max on device events:                          0

  Queue on device max size:                      0

  Max on device queues:                          0

  Queue on device preferred size:                0

  SVM capabilities:

    Coarse grain buffer:                         No

    Fine grain buffer:                           No

    Fine grain system:                           No

    Atomics:                                     No

  Preferred platform atomic alignment:           0

  Preferred global atomic alignment:             0

  Preferred local atomic alignment:              0

  Kernel Preferred work group size multiple:     64

  Error correction support:                      0

  Unified memory for Host and Device:            0

  Profiling timer resolution:                    1

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     No

  Queue on Host properties:

    Out-of-Order:                                No

    Profiling :                                  Yes

  Queue on Device properties:

    Out-of-Order:                                No

    Profiling :                                  No

  Platform ID:                                   0x7f6ef66e7478

  Name:                                          Capeverde

  Vendor:                                        Advanced Micro Devices, Inc.

  Device OpenCL C version:                       OpenCL C 1.2

  Driver version:                                2442.7

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 1.2 AMD-APP (2442.7)

  Extensions:                                    cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event

- lshw -class display

  *-display

       description: VGA compatible controller

       product: Cape Verde GL [FirePro W4100]

       vendor: Advanced Micro Devices, Inc. [AMD/ATI]

       physical id: 0

       bus info: pci@0000:03:00.0

       version: 00

       width: 64 bits

       clock: 33MHz

       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom

       configuration: driver=amdgpu latency=0

       resources: irq:42 memory:e0000000-efffffff memory:f7e00000-f7e3ffff ioport:d000(size=256) memory:f7e40000-f7e5ffff

0 Likes
1 Solution

Accepted Solutions
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

I really don't know when the support may come. At least, I haven't heard about any such plan. Till then, surely you can use Mesa/Clover for those cards.

Regards,

View solution in original post

0 Likes
11 Replies
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Please try to run one or two sample(s) from APP SDK and see whether you observe the same issue or not.

0 Likes
daisuken
Journeyman III

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Thank you dipak,

I built a AMD APP SDK sample program (opencl/cl/1.x/HelloWorld), by cmake (cmake -DBITNESS=64 .).

It crashed with Segmentation Fault (coredump) in a call to clGetPlatformIDs().

So I ran it again with gdb:

hread 1 "HelloWorld" received signal SIGSEGV, Segmentation fault.

0x00000000007fa7d0 in ?? ()

(gdb) bt

#0  0x00000000007fa7d0 in ?? ()

#1  0x00007fffdefb5546 in ?? () from /opt/AMDAPPSDK-3.0/lib/x86_64/libamdocl12cl64.so

#2  0x00007fffdefb585d in ?? () from /opt/AMDAPPSDK-3.0/lib/x86_64/libamdocl12cl64.so

#3  0x00007fffdefb61ce in ?? () from /opt/AMDAPPSDK-3.0/lib/x86_64/libamdocl12cl64.so

#4  0x00007fffdf341805 in ?? () from /opt/AMDAPPSDK-3.0/lib/x86_64/libamdocl12cl64.so

#5  0x00007fffe17823ae in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#6  0x00007fffe175a5c6 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#7  0x00007fffe176ba74 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#8  0x00007fffe1756818 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#9  0x00007fffe178a29e in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#10 0x00007fffe178b427 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#11 0x00007fffe178b5b6 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#12 0x00007fffe1770457 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#13 0x00007fffe173d522 in clIcdGetPlatformIDsKHR () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so

#14 0x00007ffff7bd276e in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1

#15 0x00007ffff7bd4647 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1

#16 0x00007ffff694aa99 in __pthread_once_slow (once_control=0x7ffff7dd63d8, init_routine=0x7ffff7bd44a0) at pthread_once.c:116

#17 0x00007ffff7bd2d31 in clGetPlatformIDs () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1

#18 0x0000000000401b5b in main (argc=1, argv=0x7fffffffdd78) at /home/daisuke/work/opencl/samples/opencl/cl/1.x/HelloWorld/HelloWorld.cpp:73

This backtrace implies that libamdocl64.so (bundled in amdgpu-pro driver 17.30, not in AMD APP SDK 3.0) is calling libamdocl12cl64.so (in AMD APP SDK 3.0).

Is this an expected behavior/configuration?

I doubted that I should not have built it with CL/cl.h of AMD APP SDK, so rebuilt it with CL/cl.h of amdgpu-pro driver, with the following command line:

g++ -I /opt/amdgpu-pro/include -L/opt/amdgpu-pro/lib/x86_64-linux-gnu -o HelloWorld HelloWorld.cpp -Wl,-rpath,/opt/amdgpu-pro/lib/x86_64-linux-gnu -lOpenCL

Then, the crash problem was solved.

With the 1st platform being Clover/Mesa, which is naturally used when running HelloWorld, the sample program worked as expected (i.e., decoding a string to 'HelloWorld' worked).

However, if I changed the code to use the 2nd platform 'AMD Accelerated Parallel Processing', the decoding of string to 'HelloWorld' failed - the content of the output string is broken and is random at each invocation, so something is still wrong.

Now my doubt here is that I should not have installed AMD APP SDK 3.0 over amdgpu-pro 17.30 driver, because the AMD APP SDK 3.0 seems much older than amdgpu-pro 17.30 driver.

I downloaded the SDK from http://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/

The Linux 64 bit version was released on 3/23/2016 according to the page.

On the other hand, AMD GPU PRO driver 17.30 for Ubuntu 16.04.3 is the very latest one released on mid Aug 2017.

Shouldn't I use AMD APP SDK 3.0 anymore over the latest AMD GPU PRO driver?

Anyway I will try again after uninstalling the SDK, with only the PRO driver installed.

0 Likes
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Yes, you don't need those libraries and headers anymore from APP SDK . Sorry for the confusion.

Earlier you were getting error for clCreateCommandQueue. Can I assume that clCreateCommandQueue and other runtime APIs are working fine for this "HelloWorld" sample?

Please try out these couple of suggestions and share your observations:

1) Set the corresponding platform id during clCreateContext instead of NULL and then run

2) Remove the Clover/Mesa platform (may remove the ICD entry related to Clover so it doesn't get detected) and run the code on AMD platform only.

0 Likes
daisuken
Journeyman III

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Thanks,

I removed APP SDK (by its uninstall.sh), and it automatically removed Mesa/Clover ICD entry from /etc/OpenCL/vendors, so now the system has only AMD GPU PRO platform recognized.

clCreateCommandQueue() is still failing also in HelloWorld sample, with status code -6, which is the same issue as the initial report.

This time I also tested HelloWorld with some modifications to see if other Runtime APIs are working or not (by adding status code check, and also moving clCreateCommandQueue to location where it's is actually needed, to test other APIs before it).

I confirmed that (by checking status code) clGetPlatformIDs, clGetPlatformInfo, clGetDeviceIDs, clGetDeviceInfo, clCreateContext, clCreateBuffer, clCreateProgramWithSource, clBuildProgram, clCreateKernel, clSetKernelArg are successful, but after that, clCreateCommandQueue fails with -6.

As mentioned above, the issue persists even after Mesa/Clover ICD is disabled.

I also tested with platform_id of AMD GPU PRO explicitly specified in clCreateContext via cl_platform_properties* parameters, but the same result. (I also tested the same with clCreateContextFromType(..., CL_DEVICE_TYPE_GPU, ...) but the same result).

Also tested with display resolution changed from 1920 x 1200 to 800 x 600, but resulted in the same.

The issue persists with Ubuntu's GUI desktop and also via SSH (i.e., headless).

Is there anything else I can check/debug about the issue?

0 Likes
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Thanks for trying out all the suggestions.

From your description, it's really hard to point out why the runtime giving this error. I don't think that you could debug much either at your end. I'll check with appropriate team if they could provide any hint or suggestion. Meanwhile, please check whether you observe the same error for cpu device or not.

Regards,

0 Likes
daisuken
Journeyman III

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Thank you dipak for your support. I will wait for update if any.

On the same machine, I already confirmed that the same sample program works fine with Clover/Mesa driver as GPU target, while I cannot test with CPU target right now because the machine has Intel Xeon E5 v4 processors and there seems no good compatible CPU OpenCL driver from Intel for Ubuntu 16.04.3.

The same program also worked on another machine with Ubuntu 16.04.3 + NVIDIA GPU (a bit old GT 220, OpenCL 1.1 based on Cuda 6.5).

BTW, I found a very similar post on Stack Overflow which seems not resolved yet:

gpu - OpenCL clCreateCommandQueue CL_OUT_OF_HOST_MEMORY error - Stack Overflow

0 Likes
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Hi Daisuke,

As I've been informed, it looks like a compatibility issue as OCL under AMDGPU PRO does not support SI cards like capeverde. As a result, clCreateCommandQueue fails for those devices.

Regards,

0 Likes
daisuken
Journeyman III

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

Thank you dipak for the update, good to hear that it's a known issue.

Can I expect the issue will be fixed in the next or future versions? Or should I use Mesa/Clover driver for this board instead of AMD GPU PRO? It will not be a big issue if Mesa/Clover doesn't show severe performance degradation than PRO driver so far.

0 Likes
dipak
Staff
Staff

Re: OpenCL clCreateCommandQueue() fails with error -6(out of host memory) on Ubuntu 16.04.3 64 bit, AMDGPUPRO driver 17.30 465504

Jump to solution

I really don't know when the support may come. At least, I haven't heard about any such plan. Till then, surely you can use Mesa/Clover for those cards.

Regards,

View solution in original post

0 Likes