rmcgibbo / openmm-cmd

OpenMM Command Line Application
7 stars 3 forks source link

Saving restart file fails #12

Closed mpharrigan closed 11 years ago

mpharrigan commented 11 years ago

I got the following error when it tried to save a restart file.

Original exception was:
Traceback (most recent call last):
  File "/home/harrigan/opt/python2.7/bin/openmm", line 5, in <module>
    pkg_resources.run_script('openmm==0.1', 'openmm')
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
    execfile(script_filename, namespace, namespace)
  File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 1069, in <module>
    openmm.start()
  File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 923, in start
    simulation.step(self.simulation.n_steps)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/simtk/openmm/app/simulation.py", line 127, in step
    reporter.report(self, state)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/ipcfg/restartreporter.py", line 172, in report
    shutil.copy(self._fileName, backup)
  File "/usr/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 24] Too many open files: '/tmp/tmpc88sw5'
leeping commented 11 years ago

Hi Matt,

I think I seen that error somewhere before. The Linux operating system has a limit on the number of files that can be open, and I think the default is somewhere around 1000. Do you have a very large number of files open?

On Aug 26, 2013, at 10:03 AM, Matthew Harrigan notifications@github.com wrote:

I got the following error when it tried to save a restart file.

Original exception was: Traceback (most recent call last): File "/home/harrigan/opt/python2.7/bin/openmm", line 5, in pkg_resources.run_script('openmm==0.1', 'openmm') File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script execfile(script_filename, namespace, namespace) File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 1069, in openmm.start() File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 923, in start simulation.step(self.simulation.n_steps) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/simtk/openmm/app/simulation.py", line 127, in step reporter.report(self, state) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/ipcfg/restartreporter.py", line 172, in report shutil.copy(self._fileName, backup) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 24] Too many open files: '/tmp/tmpc88sw5' — Reply to this email directly or view it on GitHub.

mpharrigan commented 11 years ago

Hi Lee-Ping,

I have at most tens of files open

rmcgibbo commented 11 years ago

Did this happen right at the beginning or after the app had been running for a while?

-Robert Sent from my iPhone.

On Mon, Aug 26, 2013 at 10:05 AM, Matthew Harrigan notifications@github.com wrote:

I got the following error when it tried to save a restart file.

Original exception was:
Traceback (most recent call last):
  File "/home/harrigan/opt/python2.7/bin/openmm", line 5, in <module>
    pkg_resources.run_script('openmm==0.1', 'openmm')
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
    execfile(script_filename, namespace, namespace)
  File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 1069, in <module>
    openmm.start()
  File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 923, in start
    simulation.step(self.simulation.n_steps)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/simtk/openmm/app/simulation.py", line 127, in step
    reporter.report(self, state)
  File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/ipcfg/restartreporter.py", line 172, in report
    shutil.copy(self._fileName, backup)
  File "/usr/lib/python2.7/shutil.py", line 119, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 24] Too many open files: '/tmp/tmpc88sw5'

Reply to this email directly or view it on GitHub: https://github.com/rmcgibbo/openmm-cmd/issues/12

rmcgibbo commented 11 years ago

@leeping, my thought is that if the error occurred many hours into execution of the app, then we're probably forgetting to close file handles somewhere in this code.

-Robert Sent from my iPhone.

On Mon, Aug 26, 2013 at 10:48 AM, Lee-Ping notifications@github.com wrote:

Hi Matt, I think I seen that error somewhere before. The Linux operating system has a limit on the number of files that can be open, and I think the default is somewhere around 1000. Do you have a very large number of files open?

  • Lee-Ping On Aug 26, 2013, at 10:03 AM, Matthew Harrigan notifications@github.com wrote:

    I got the following error when it tried to save a restart file.

    Original exception was: Traceback (most recent call last): File "/home/harrigan/opt/python2.7/bin/openmm", line 5, in pkg_resources.run_script('openmm==0.1', 'openmm') File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script execfile(script_filename, namespace, namespace) File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 1069, in openmm.start() File "/home/harrigan/opt/python2.7/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/EGG-INFO/scripts/openmm", line 923, in start simulation.step(self.simulation.n_steps) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/simtk/openmm/app/simulation.py", line 127, in step reporter.report(self, state) File "/home/harrigan/opt/python2.7/local/lib/python2.7/site-packages/openmm-0.1-py2.7.egg/ipcfg/restartreporter.py", line 172, in report shutil.copy(self._fileName, backup) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 24] Too many open files: '/tmp/tmpc88sw5' — Reply to this email directly or view it on GitHub.

    Reply to this email directly or view it on GitHub: https://github.com/rmcgibbo/openmm-cmd/issues/12#issuecomment-23280466

mpharrigan commented 11 years ago

It's fixed now, right? Closing.