Opened 11 years ago

Closed 8 years ago

#485 closed defect (fixed)

Random RasQL output

Reported by: Piero Campalani Owned by: Dimitar Misev
Priority: major Milestone: Future
Component: undecided Version: 8.5
Keywords: Cc: Dimitar Misev
Complexity: Hard

Description

WCPS systemtest query n.31 (Discrete_Fourier) apparently revealed a deviation in the RasQL output depending on the running machine.

The test query is:

for c in (rgb) return 
  encode(
    coverage DFT
    over $xx x(65:70),
         $xy y(65:70)
    values
        condense + 
        over $ux x(65:70),
             $uy y(65:70)
        using c[x($ux),y($uy)] * 
              cos((-2 * (22.0/7.0) ) *
                 (( (double) ($ux*$xx) / (70 - 65 + 1) ) + 
                 ( (double) ($uy*$xy) / (70 - 65 + 1) ))), 
    "png")

which translated to the RasQL equivalent:

select encode(marray i_i in [65:70, 65:70] values condense + over i_j in [65:70, 65:70] using (((c) [i_j[0],i_j[1]])*(cos((((-2)*((22.0)/(7.0)))*((((double)(((i_j[0])*(i_i[0]))/(((70)-(65))+(1))))+((double)(((i_j[1])*(i_i[1]))/(((70)-(65))+(1)))))))))), "PNG", "") from rgb AS c

Some cells returned from this query differ depending on the machine it runs on.

For instance, running the RasQL command in:

=== MACHINE 1 (Dimitar) =====================
  Distributor ID:    Ubuntu
  Description:    Ubuntu 12.10
  Release:    12.10
  Codename:    quantal
  arch: x86_64
  gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) 
=== MACHINE 2 (Piero) =======================
  Distributor ID:	Ubuntu
  Description:	Ubuntu 12.04.3 LTS
  Release:	12.04
  Codename:	precise
  arch: i386
  gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
=============================================

produce different output: see pics in attachment.
For more detailed analysis, the hexadecimal diff can be seen in the attachment query31.bundle. Follow the instructions to see the difference:

$ mkdir tmp
$ cd tmp
$ git init
$ git fetch /path/to/query31.bundle master:query31
$ git checkout query31
$ git log --oneline 
a69abe3 Piero RasQL output for WCPS test #31.
c44c683 Dimitar RasQL output for WCPS test #31.
$ git show --color-words
...

}}}

Attachments (5)

query31.bundle (824 bytes ) - added by Piero Campalani 11 years ago.
git bundle for numerical evidence of the difference
31-Discrete_Fourier.test.oracle (131 bytes ) - added by Piero Campalani 11 years ago.
PNG visualization (systemtest oracle)
31-Discrete_Fourier.test.out (131 bytes ) - added by Piero Campalani 11 years ago.
PNG visualization (my output)
rasql_1.csv (990 bytes ) - added by Dimitar Misev 11 years ago.
rasql_1_PIERO.csv (990 bytes ) - added by Piero Campalani 11 years ago.
CSV output in my machine (@96)

Download all attachments as: .zip

Change History (11)

by Piero Campalani, 11 years ago

Attachment: query31.bundle added

git bundle for numerical evidence of the difference

by Piero Campalani, 11 years ago

PNG visualization (systemtest oracle)

by Piero Campalani, 11 years ago

PNG visualization (my output)

comment:1 by Dimitar Misev, 11 years ago

Ok let's compare with CSV output, attached is my output from query

rasql -q 'select csv(marray i_i in [65:70, 65:70] values condense + over i_j in [65:70, 65:70] using (((c) [i_j[0],i_j[1]])*(cos((((-2)*((22.0)/(7.0)))*((((double)(((i_j[0])*(i_i[0]))/(((70)-(65))+(1))))+((double)(((i_j[1])*(i_i[1]))/(((70)-(65))+(1))))))))))) from rgb AS c' --out file

by Dimitar Misev, 11 years ago

Attachment: rasql_1.csv added

comment:2 by Piero Campalani, 11 years ago

And here is mine (attached).

I ran a diff on the single tuples (in vim :%s/"}\?,{\?"/\r/g then diff the files in the shell):

$ diff rasql_1.csv rasql_1_PIERO.csv 
3c3
< 2.70319 4.72491 11.5895
---
> 2.70319 4.72491 5.63355

So there is only a difference in the single BLUE value of the third cell.

by Piero Campalani, 11 years ago

Attachment: rasql_1_PIERO.csv added

CSV output in my machine (@96)

comment:3 by Dimitar Misev, 11 years ago

I think it is important to take a look at this, queries should return same results irrelevant of the environment.

Best way to tackle it is to try and simplify the query as much as possible, until it doesn't produce different result anymore.

Veranika, please run the query test on your machine and compare the csv output to find out which one it matches.

comment:4 by Dimitar Misev, 11 years ago

The output is random actually, and the problematic byte changes on every query run. So no need to compare actually, it's easily reproducible.

comment:5 by Dimitar Misev, 10 years ago

Summary: Different RasQL output depending on platformsRandom RasQL output

comment:6 by Dimitar Misev, 8 years ago

Resolution: fixed
Status: newclosed

Cannot reproduce it anymore, seems like we have fixed it. I submitted a patch to remove this query from known_fails.

Note: See TracTickets for help on using tickets.