Unable to open a very high precision OASIS file

Hi Matthias,

Recently we got a special OASIS file with very high precision(200000), and
it could not be opened by any klayout version(even 0.25.8), when we try to
open this file, it shows the following error messages:

ERROR: Unsigned integer value overflow (position=605544, cell=cell_2289)

Is it OASIS file format issue or the precision(200000) over the spec of klayout ?
Is there any way to fix this problem and open it with klayout ?

Really appreciate your kindly help~

Best Regards,

chhung

Comments

  • Hi chhung,

    I guess that the coordinate space of this file exceeds the 32bit precision KLayout is built with by default. You can enable 64bit coordinate support, but you'll have to build KLayout yourself or ask someone to do it. As 64 bit coordinate support is experimental, I don't supply a pre-built binary.

    But frankly, a resolution of 200000 corresponds to 5 picometers. That's 1/20 of one atom (which is about 100 pm). This is weird. OASIS is made for physical mask data and accuracy does not have to be better than one atomic diameter.

    Matthias

  • Hi Matthias,

    I tried to build a version with "-with-64bit-coord" option but failed, however the same environment is ok to build without "-with-64bit-coord" option, did I miss something?

    The partial error messages:

    klayout/source/klayout-0.24.10/src/dbLayer.h:201: error: 'int' is not a class, struct, or union type
    klayout/source/klayout-0.24.10/src/dbLayer.h:221: error: 'int' is not a class, struct, or union type
    
    klayout/source/klayout-0.24.10/src/dbShapes.h:336: error: array bound is not an integer constant
    klayout/source/klayout-0.24.10/src/dbShapes.h:337: error: array bound is not an integer constant
    
    klayout/source/klayout-0.24.10/src/dbVector.h:54: error: no type named 'distance_type' in 'struct db::coord_traits<long int>'
    klayout/source/klayout-0.24.10/src/dbVector.h:55: error: no type named 'area_type' in 'struct db::coord_traits<long int>'
    
    klayout/source/klayout-0.24.10/src/dbPoint.h:301: error: 'rounded' is not a member of 'db::coord_traits<long int>'
    klayout/source/klayout-0.24.10/src/dbPoint.h:301: error: 'rounded' is not a member of 'db::coord_traits<long int>'
    

    It's a CentOS6 with gcc 4.4.6 or gcc 4.4.7.

    Really thanks for your kindly response~ :smile:

    Best Regards,

    chhung

  • Hi chhung,

    -with-64bit-coord is the right option.

    But please try to build 0.25.x or the master branch of GitHub. 0.24.10 is not tested for 64bit builds and is pretty outdated now.

    Kind regards,

    Matthias

  • edited April 2019

    Hi Matthias,

    I tried to build 0.25.8 with CentOS6(gcc 4.4.6 or 4.4.7), and got many error messages. It's ok to build before adding "-with-64bit-coord" option, could you please help for that ?

    ../../../src/tl/tl/tlVariant.h:1482: error: '__int128' does not name a type
    ../../../src/tl/tl/tlVariant.h:1520: error: expected initializer before 'Variant'
    ../../../src/tl/tl/tlVariant.h:1543: error: '__int128' was not declared in this scope
    ../../../src/tl/tl/tlVariant.h:1543: error: template-id 'is<<expression error> >' for 'bool tl::Variant::is() const' does not match any template declaration
    

    and

    ../../../src/tl/tl/tlString.h:275: error: ISO C++ forbids declaration of '__int128' with no type
    ../../../src/tl/tl/tlString.h:275: error: expected ',' or '...' before '&' token
    ../../../src/tl/tl/tlString.h:275: error: template-id 'to_string<>' for 'std::string tl::to_string(int)' does not match any template declaration
    ../../../src/tl/tl/tlString.h:276: error: expected ',' or '...' before '&' token
    ../../../src/tl/tl/tlString.h:276: error: template-id 'to_string<>' for 'std::string tl::to_string(unsigned int)' does not match any template declaration
    

    Best Regards,

    chhung

  • Hi chhung,

    looks like __int128 is lacking. This is essential for 64bit coordinate support, so you cannot skip this.

    __int128 is present on gcc >= 4.6. According to the documentation on gcc >= 4.1, you can substitute "__int128" by "__int128_t" when you "#include <stdint.h>". But I have not tried this myself.

    You can also try the master branch from GitHub (https://github.com/KLayout/klayout.git). I have generalized the int128 type there to support MSVC.

    But as I'm saying, 64bit coordinate support is experimental.

    Matthias

  • Hi Matthias,

    Sorry to reply so late.

    I download the master branch from GitHub, and get the same compile error when enabling 64bit coordinate support. Tried to modify the relative .h and .cc from __int128 to __int128_t , the __int128 errors were gone, however the following errors were there.

    ../../../src/tl/tl/tlString.h:280: error: expected ',' or '...' before '&' token
    ../../../src/tl/tl/tlString.h:280: error: template-id 'to_string<>' for 'std::string tl::to_string(unsigned int)' does not match any template declaration
    

    I'll try with later gcc version to confirm if gcc version is too old.

    Best Regards,

    chhung

Sign In or Register to comment.