Hi - Trying to run OVITOs 2.9 (stable) in scripting mode
to render one image per dump snapshot. The snapshots are
in different LAMMPS dump files, and each is a zoom in on a different region
of a big simulation (over time), so each snapshot is effectively unrelated to
the others. The rendering portion of my Python
script is below. Along with the error that occurs after
1000 images have been output.
1000 is the default limit for my Linux box as to how
many files can be open at the same time. So apparently
OVITO is keeping each file open. Is there a way to tell
it to close the snapshot file (each loop iteration), or maybe a better way to
handle this workflow with OVITO?
Thanks,
Steve
------------------------
# main loop over dump files
for i,infile in enumerate(files):
node = ovito.io.import_file(infile)
node.add_to_scene()
node.source.particle_properties.position.display.radius = radius
if GetImage == 1:
outfile = "%s/%s.png" % (outdir,os.path.basename(infile))
print("%s --> %s" % (infile,outfile))
vset = RenderSettings(filename=outfile,size=(512,512))
#vset.renderer = TachyonRenderer() # hi-res
#vset.renderer.shadows = True
vset.renderer = OpenGLRenderer() # lo-res
vp.zoom_all()
node.compute()
vp.render(vset)
node.remove_from_scene()
ERROR: Failed to open input file: Too many open files
Traceback (most recent call last):
File "process_render.py", line 101, in <module>
File "/home/sjplimp/tools/ovito-2.9.0-x86_64/bin/../lib/ovito/plugins/python/ovito/io/__init__.py", line 119, in import_file
File "/home/sjplimp/tools/ovito-2.9.0-x86_64/bin/../lib/ovito/plugins/python/ovito/__init__.py", line 173, in _ObjectNode_wait
RuntimeError: Data pipeline evaluation failed with the following error: Failed to open input file: Too many open files