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)
Change History (11)
by , 11 years ago
Attachment: | query31.bundle added |
---|
by , 11 years ago
Attachment: | 31-Discrete_Fourier.test.oracle added |
---|
PNG visualization (systemtest oracle)
comment:1 by , 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 , 11 years ago
Attachment: | rasql_1.csv added |
---|
comment:2 by , 11 years ago
comment:3 by , 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 , 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 , 10 years ago
Summary: | Different RasQL output depending on platforms → Random RasQL output |
---|
comment:6 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Cannot reproduce it anymore, seems like we have fixed it. I submitted a patch to remove this query from known_fails.
git bundle for numerical evidence of the difference