5 Replies Latest reply on Jun 15, 2014 2:26 PM by VincentSC

    LibreOffice 4.2 with OpenCL

    VincentSC

      Just turned on OpenCL in LibreOffice 4.2 on Linux with 14.1 drivers:

      LibreOffice-Calc-OpenCL.png

       

      Problem is that I get 0's when using the GPU (Auto-select off to choose the device). On the CPU the results are correct. What could be the problem?

       

      See the attached ODT, which computes the sin for a list of numbers. When I make the list 500 long, LibreOffice crashes. Oopsie.

        • Re: LibreOffice 4.2 with OpenCL
          VincentSC

          This was on the terminal:

           

          Dynamic formula compiler: OpenCL error: -34
          DeclRefArg: Allocate a new symbol:tmp0
          Program to be compiled =
          #pragma OPENCL EXTENSION cl_khr_fp64: enable
          int isNan(double a) { return isnan(a); }
          double fsum_count(double a, double b, __private int *p) {
              bool t = isNan(a);
              (*p) += t?0:1;
              return t?b:a+b;
          }
          double fsum(double a, double b) { return isNan(a)?b:a+b; }
          double legalize(double a, double b) { return isNan(a)?b:a;}
          double fsub(double a, double b) { return a-b; }
          double fdiv(double a, double b) { return a/b; }
          double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }
          double mcw_fmin(double a, double b) { return fmin(a, b); }
          double mcw_fmax(double a, double b) { return fmax(a, b); }

           

          double tmp0_0_Sin(__global double *tmp0_0_0)
          {
              int gid0=get_global_id(0);
              double arg0 = 0.0f;
              arg0 = (gid0 < 0?tmp0_0_0[gid0]:NAN);
              if(isNan((gid0 < 0?tmp0_0_0[gid0]:NAN))||(gid0>=0))
              { arg0 = 0.0f; }
              arg0 = arg0 * M_1_PI;
              return sinpi(arg0);
          }
          double tmp0_nop(__global double *tmp0_0_0) {
              double tmp = 0;
              int gid0 = get_global_id(0);
              double tmpBottom;
              tmp = tmp0_0_Sin(tmp0_0_0);
              return tmp;
          }
          __kernel void DynamicKernel_nop_Sin(__global double *result, __global double *tmp0_0_0) {
              int gid0 = get_global_id(0);
              result[gid0] = tmp0_nop(tmp0_0_0);
          }

            • Re: LibreOffice 4.2 with OpenCL
              pinform

              Hi Vincent,

               

              LibreOffice was tested on the 14.2 beta drivers on Ubuntu and found to work correctly.  Can you try with the latest driver and report back?

               

              --Prasad

                • Re: LibreOffice 4.2 with OpenCL
                  VincentSC

                  Just tried and got the same results: all 0's when using the dGPU.

                    • Re: LibreOffice 4.2 with OpenCL
                      sudarshan

                      Hi Vincent,

                                         Hope you are doing well.  Can you check whether you still get the problem with the latest driver 14.6?  Can you share configuration information from clinfo and also share your PC's configuration?

                       

                      thanks & Regards,

                      Suresh

                       

                      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                      The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied.

                        • Re: LibreOffice 4.2 with OpenCL
                          VincentSC

                          Just tested with FGLRX "14.200" (versioning of drivers is very bad, but this should be the 14.6 drivers).

                           

                          Result: it doesn't work for both CPU and GPU. It is all zeroes.

                           

                          When I switch between CPU and GPU, I get: "Dynamic formula compiler: OpenCL error: -34" (CL_INVALID_CONTEXT), so then I get correct results due to a fallback? This seems to be a real bug.

                           

                          What should be a good step to debug this? Understand I have little time at the moment, because the company needs al my attention.