Home Forums Nazca RAM usage

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5947
    ale35
    Member

    Dear Nazca team,

    I am facing some issues when generating a full wafer layout multiple times with Nazca. It seems that the memory consumption per run is quite high (about 500 MB) and deleting the variable space is not sufficient to free the RAM. Regenerating the layout a handful of times quickly consumes all the available memory.

    The only solution I have found is to fully restart the Python kernel. However, frequently doing this becomes a time consuming procedure. I am using Spyder IDE under Windows 10.

    I would like to ask whether there is another way of freeing up the memory used during each layout generation, and, more in general, if there is any guideline you would recommend in order to minimize the employed RAM.

    Thank you

    #5949
    Ronald
    Keymaster

    Dear Ale35,

    With deleting the variable space, do you mean checking the option (Spyder 3.3.6):

    Spyder-menu/Tools/PreferenceRun/General settings/Remove all variable before execution

    This is also discussed with a screenshot in the following post
    https://stackoverflow.com/questions/45853595/spyder-clear-variable-explorer-along-with-variables-from-memory

    Do you reuse the python console rather than spawning new ones? In the latter case consoles may stick around in memory, but I haven’t looked into that explicitly.

    If the above does not resolve the issue you may also try to delete some Nazca arrays explicitly in your code and rely on Python’s garbage collection.

    import nazca as nd
    nd.clear_layout()
    nd.clear_layers()
    nd.clear_xsections()

    Ronald

    #5991
    ale35
    Member

    Thank you for your answer Ronald.

    Unfortunately ticking the ‘Remove all variable before execution’ box does not solve the issue, and neither I could solve it with magic commands. Deleting the Nazca arrays frees a bit of memory, but leaves the majority accumulating.

    Indeed I reuse the same iPython console, i.e. I just rerun my script in Spyder. the only way I can free my RAM is by manually closing the console every few run.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.