Unpack error: Mismatched coordinates


#1

Hi,

I am trying to unpack a 3-dimensional array defined as:
AFL% show(Th88_94);
{i} schema
{0} ‘Th88_94<cntid:uint64 NULL DEFAULT null,cntid_2:uint64 NULL DEFAULT null,percent:double NULL DEFAULT null> [hid=999999:99999999,10000,0,hid_2=999999:99999999,10000,0,hid_2_2=999999:99999999,10000,0]’

When I unpack, I get the following error:

AFL% unpack(Th88_94,x);

SystemException in file: src/query/Operator.cpp function: getNumChunks line: 435
Error id: scidb::SCIDB_SE_INTERNAL::SCIDB_LE_MISMATCHED_COORDINATES_IN_PHYSICAL_BOUNDARIES
Error description: Internal SciDB error. Mismatched coordinates in physical boundaries.
Failed query id: 1100940343201

Any help in determining why such an error is coming, will be greatly appreciated.

Thanks in advance.


#2

Man …

I tried this[1]. It worked perfectly in 14.3.

I smell a bug.

Can you please:

  1. Give us some more details about Th88_94? Something like:
show ( Th88_94 );
dimensions ( Th88_94 );
  1. Can you give us a look at the way the chunks are allocated and mapped to the instance(s)? Something like this?
aggregate (
  filter (
    cross_join (
      filter (
        list ('arrays'),
        name = 'Th88_94'
      ) AS A,
      list('chunk map') AS C
    ),
    A.id = C.uaid
  ),
  count(*) AS num_chunks,
  sum ( C.nelem ) AS num_cells,
  min ( C.nelem ) AS min_cells_per_chunk,
  max ( C.nelem) AS max_cells_per_chunk,
  avg ( C.nelem ) AS avg_cells_per_chunk,
  C.inst
);

I’m buggering about in the offending function w/ my repro case to see if anything leaps out at me.

[1] - This is the repro script I’m using.

#!/bin/sh
#
#   File:   Unpack.sh
#
#  About: 
#
#   An attempt to repro the bug or problem in unpack(...) reported 
#  at http://www.scidb.org/forum/viewtopic.php?f=11&t=1346
#
#   Basically, with a large array that:
#
#  1. Has very big logical chunk sizes (10,000 x 10,000 x 10,000) ... 
#
#  2. ... has large fixed lower and upper bounds per dimension 
#         [ 999999:99999999 ... ] 
#
#  3. the unpack ( array, x ) seems to blow up in src/query/Operator.cpp
#     at the cellnum check. 
#
#
#   The purpose of this script is to try to construct a smaller, and simpler
#  repro of the OP. 
#
#------------------------------------------------------------------------------
#
#  Useful shell script functions. 
#
exec_afl_query () {
    echo "Query: ${1}"
    /usr/bin/time -f "Elapsed Time: %E" iquery -o dcsv ${2} -aq "${1};"
};
#
exec_aql_query () {
    echo "Query: ${1}"
    /usr/bin/time -f "Elapsed Time: %E" iquery -o dcsv ${2} -q "${1};"
};
#
#------------------------------------------------------------------------------
# 
# Hygiene ... 
CMD_HYGIENE="remove ( Th88_94 )"
exec_afl_query "${CMD_HYGIENE}"
#
# Create 
CMD_CREATE="
CREATE ARRAY Th88_94 
< 
  cntid:uint64 NULL DEFAULT null,
  cntid_2:uint64 NULL DEFAULT null,
  percent:double NULL DEFAULT null
> 
[ hid=999999:99999999,10000,0, 
  hid_2=999999:99999999,10000,0,
  hid_2_2=999999:99999999,10000,0]
"
exec_afl_query "${CMD_CREATE}"
#
#  1: Basic test of empty array. 
CMD_UNPACK="
unpack ( Th88_94, I )
"
exec_afl_query "${CMD_UNPACK}"
#
#  {I} hid,hid_2,hid_2_2,cntid,cntid_2,percent
#  Elapsed Time: 0:00.12
#
#  2: Add some data. 
#
CMD_CREATE_DATA="
redimension ( 
  apply ( 
    build ( < hid : int64 > [ R=0:9900, 100000, 0 ], 999999 + (R*10000) ),
    hid_2, 999999 + (R * 10000), hid_2_2, 999999 + (R * 10000), 
    cntid, uint64(999999 + (R * 10000)), cntid_2, uint64(R),
    percent, double(random()%10000)/10000.0 
  ),
  Th88_94
)
"
#
#  3. Check that the data looks like what we want it to look like ... 
CMD_CHECK_COUNT="
aggregate ( 
  ${CMD_CREATE_DATA},
  count(*) AS C,
  min ( cntid ) AS start_hid,
  max ( cntid ) AS end_hid
)
"
exec_afl_query "${CMD_CHECK_COUNT}"
#
#  {i} C,start_hid,end_hid
#  {0} 9901,999999,99999999
#  Elapsed Time: 0:02.06
#
#  NOTE: cntid = hid = hid_2 = hid_2_2 
#
#  4. Populate the target array ... 
CMD_POPULATE_DATA="
store ( 
  ${CMD_CREATE_DATA},
  Th88_94
)
"
exec_afl_query "${CMD_POPULATE_DATA}" -n 
#
#  Query was executed successfully
#
# 5. Check that the target array was correctly populated ... 
CMD_COUNT="SELECT COUNT(*) FROM Th88_94"
exec_aql_query "${CMD_COUNT}"
#
# {i} COUNT
# {0} 99001
#  Elapsed Time: 0:00.31
#
# 6. Try that unpack(...) query ... 
CMD_UNPACK="
unpack ( 
  Th88_94,
  I
)
"
exec_afl_query "${CMD_UNPACK}" 
#
#  Worked fine. 
#
#------------------------------------------------------------------------------

#3

Apologize for the slow response. We upgraded to 14.3 recently and this error has been taken care of.