7 Replies Latest reply on Feb 21, 2011 6:10 PM by Tasp

    std::out_of_range thrown by opencl?



      I have a program that runs fine on a Cypress based card but fails on a RV770 card. I narrowed it down to an enqueueNDRangeKernel call:

      Program stops with

      terminate called after throwing an instance of 'std:: out_of_range'

        what():  basic_string::substr


      Any ideas what this could be?

        • std::out_of_range thrown by opencl?

          please Specify your system configuration and provide more details of what you were doing.

          Providing the kernel can enable us to quickly identify the issue and fix it.

            • std::out_of_range thrown by opencl?

              Thanks for your reply.

              System is Ubuntu 10.4 64 bit, ATI Stream SDK 2.3 and Catalyst 10.12. Card is Raedon HD4850 (RV770). 

              I don't want to post the whole kernel but as soon as I have the time I will uncomment it line by line to see where the error happens. I will post the result.

              In the meantime: Is it even possible that the OpenCl C++ wrapper throws std:: out_of_range ? If yes could you give me a guess what it could mean.

              The kernel worked with previous SDKs (pre 2.3) but I will check this again with SDK 2.2. 

                • std::out_of_range thrown by opencl?


                  std:ut_of_range is a standard C++ error. Not a part of OpenCL C++ Wrapper.Here is link which might be helpful



                    • std::out_of_range thrown by opencl?



                      Reduced the kernel to an emtpy kernel (no code, no parameter). The exception happens only when I enqueue this emtpy kernel.

                      Catalyst 11.1, SDK 2.3, Ubuntu 10.4 64bit, Radeon HD4850

                      gdb backtrace:

                      terminate called after throwing an instance of 'std::out_of_range'
                        what():  basic_string::substr

                      Program received signal SIGABRT, Aborted.
                      [Switching to Thread 0x7fffe5ee4700 (LWP 8154)]
                      0x00007ffff344ba75 in *__GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
                      64    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
                          in ../nptl/sysdeps/unix/sysv/linux/raise.c
                      (gdb) bt
                      #0  0x00007ffff344ba75 in *__GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
                      #1  0x00007ffff344f5c0 in *__GI_abort () at abort.c:92
                      #2  0x00007ffff3f01f5d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
                      #3  0x00007ffff3f001a6 in ?? () from /usr/lib/libstdc++.so.6
                      #4  0x00007ffff3f001d3 in std::terminate() () from /usr/lib/libstdc++.so.6
                      #5  0x00007ffff3f002de in __cxa_throw () from /usr/lib/libstdc++.so.6
                      #6  0x00007ffff3eaac2e in std::__throw_out_of_range(char const*) () from /usr/lib/libstdc++.so.6
                      #7  0x00007fffe7c82b21 in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #8  0x00007fffe7c867c5 in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #9  0x00007fffe7c87228 in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #10 0x00007fffe7cad28e in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #11 0x00007fffe7caec50 in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #12 0x00007fffe7cb4c2c in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #13 0x00007fffe7cb2edd in ?? () from /opt/ati-stream-sdk/lib/x86_64/libatiocl64.so
                      #14 0x00007ffff694d9ca in start_thread (arg=) at pthread_create.c:300
                      #15 0x00007ffff34fe70d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
                      #16 0x0000000000000000 in ?? ()

                      It is working on a HD5850 and with the CPU (And it has worked previously with RV770 but I will check on that again...)