Bad allocation error?

edited October 2012 in General
Hi Matthias,

I tried opening 2 large gds files today in Klayout and ran into "bad allocation" both times during loading. One was ~6gb, the other ~100mb. Both were created using commercial tools and opened fine in them.

I wonder what this could be due to. I am curious to know if this may be related to the file size.

I would appreciate any hints or comments.

Thank you.

-Ken

Comments

  • edited October 2012

    Hi Ken,

    are you using the 64bit version of KLayout? If you do and you use Linux, you should also check whether there is a process size limit set on your shell ("ulimit" or "limits").

    6GB probably won't load in the 32bit version because the process size is limited to 2GB on Windows (which is roughly the requirement for a 6GB GDS file). On Linux the limit is 3GB usually which may also be close to the requirements for a 6GB GDS file. On 64bit there is virtually no limit. I have reports of people loading files of 50GB and more and I myselef recently had a case of about 20GB (on Linux however). 20GB load in roughly 3 minutes.

    So there should not be an issue on 64bit, provided you have enough memory and there is no process limit set on Linux.

    Regards,

    Matthias

  • edited November -1
    Hello Matthias:

    I'm using Windows 32bit, so that seems to explain the 6gb issue. I'll try that later on a 64bit windows system.

    The ~100mb one is actually an .oas.gz file (sorry i mistakenly said gds earlier), but it also errored out for "bad allocation". For this case, do you think it's also a memory issue?

    Thanks,
    -Ken
  • edited November -1
    On Windows 64bit running Klayout 64bit, both files loaded fine. It is weird that on the 32bit setup, the smaller 100mb oasis file failed.

    -ken
  • edited October 2012

    Hi Ken,

    For OASIS the memory requirements are hard to predict. 100MB (zipped I assume) may easily correspond to a couple of gigabytes in GDS format.

    For OASIS it can make a huge difference whether you run KLayout in editor or viewer mode. In viewer mode certain OASIS features (i.e. shape arrays) are maintained while in editor mode these features are expanded to support editing operations. Hence in viewer mode, memory requirements may be much smaller, in particular for OASIS.

    Regards,

    Matthias

  • edited November -1
    Hi Matthias:

    Thanks for the insight. You're absolutely right.

    I re-tried the problem oas.gz file under viewer mode and it loaded just fine.

    Regards,
    -Ken
Sign In or Register to comment.