It looks like you're new here. If you want to get involved, click one of these buttons!
I have multiple oasis files that I want to combine and make a single oasis file that contains the layout for the whole reticle.
However when I try to do this, I run out of memory. (I run out of memory even if I try to do it on Azure Cloud HPC)
The total size of the oasis file reach around 30 GB.
The code I use to merge different oasis files is given below.
layout_paths_to_import = ['layout.oas','layout2.oas'] top_cell_names_to_import = ['top1','top2'] output_layout_path = 'merged_layout.oas' output_top_cell_name = 'output_top_cell' def make_cell_instance(in_cell, angle=0, mirror=0, x=0, y=0, scale=1): trans=pya.CplxTrans(scale, angle, mirror, x, y) tmp_inst = pya.CellInstArray(in_cell.cell_index(), trans) return tmp_inst def insert_cell_to_layout(layout,layout_path_to_import,top_cell_name_to_import,rotation=0,mirror=0,offset_x=0,offset_y=0,scale=1): top_cell = layout.top_cell() layout.read(layout_path_to_import) tmp_cell = layout.cell(top_cell_name_to_import) tmp_cellinst = make_cell_instance(tmp_cell, rotation, mirror, offset_x, offset_y, scale) top_cell.insert(tmp_cellinst) return layout output_layout = pya.Layout() output_layout.create_cell(output_top_cell_name) for layout_path_to_import, top_cell_name in zip(layout_paths_to_import, top_cell_names_to_import): output_layout = insert_cell_to_layout(output_layout, layout_path_to_import, top_cell_name) output_layout.write(output_layout_path)
Is there a more memory efficient way of doing this ?