Error running RectLattice with >10.000.000 elements

@JDBE Sounds like you may be running out of memory. One thing you can try is turning off the creation of offset tables for material cells (unlikely to be needed in your case):

settings = openmc.Settings()
settings.material_cell_offsets = False