openpathsampling: Strange random errors

I am trying to run a couple toy systems, for 100000 steps each. (I am running 12 of them at the same time, so it might very well be that all these errors are something due to netcdf/IO/storage fucking up. They did fail/succeeded at different times though) In total: 5 completed, and 7 died (all more than 15000 steps) with the following errors:

2 times this stack trace, click to expand

Traceback (most recent call last):
 File "RETIS_analytical_0.py", line 190, in <module>
   calc.run(steps)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathsimulators/path_sampling.py", line 258, in run
   self.sample_set.sanity_check()
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/sample.py", line 243, in sanity_check
   assert(sample.ensemble(sample.trajectory))
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2868, in __call__
   return super(TISEnsemble, self).__call__(trajectory, trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2328, in __call__
   return self._new_ensemble(self._alter(trajectory), trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1339, in __call__
   fname="__call__"
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1309, in _generalized_short_circuit
   a = f1(trajectory, trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1585, in __call__
   transitions = self.transition_frames(trajectory, trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1556, in transition_frames
   subtraj_first, ens_num)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1639, in _find_subtraj_final
   while ((ens.can_append(subtraj, trusted=True) or
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2335, in can_append
   trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1349, in can_append
   fname="can_append"
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1327, in _generalized_short_circuit
   b = f2(trajectory, trusted)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2190, in can_append
   return self._trusted_call(trajectory, self._cache_can_append)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2180, in _trusted_call
   cache.contents['previous'] = self._volume(frame)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 204, in __call__
   return not self.volume(snapshot)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 135, in __call__
   a = self.volume1(snapshot)
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 402, in __call__
   l = self.collectivevariable(snapshot).__float__()
 File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 204, in __call__
   return not self.volume(snapshot)
AttributeError: 'FunctionCV' object has no attribute 'volume'

It looks like, somehow, the __call__ signature of a FunctionCV get’s overwritten by the one of NegatedVolume

or for 2 others it got overwritten by the __call__ of CVDefinedVolume:

Stack trace for 2 others, click to expand

Working on Monte Carlo cycle number 15203
Running for 2 days 23 hours 59 minutes 54 seconds - 17.05 seconds per step
Estimated time remaining: 16 days 17.61 hours
Traceback (most recent call last):
  File "RETIS_langevin_0.py", line 213, in <module>
    calc.run(steps)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathsimulators/path_sampling.py", line 258, in run
    self.sample_set.sanity_check()
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/sample.py", line 243, in sanity_check
    assert(sample.ensemble(sample.trajectory))
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2328, in __call__
    return self._new_ensemble(self._alter(trajectory), trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1339, in __call__
    fname="__call__"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1327, in _generalized_short_circuit
    b = f2(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2216, in __call__
    if not self._volume(frame):
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 204, in __call__
    return not self.volume(snapshot)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 402, in __call__
    l = self.collectivevariable(snapshot).__float__()
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 402, in __call__
    l = self.collectivevariable(snapshot).__float__()
AttributeError: 'FunctionCV' object has no attribute 'collectivevariable'
Error in sys.excepthook:

Another error I encountered, len() is deferred to snapshot instead of trajectory by netcdf:

Netcdf stacktrace

Working on Monte Carlo cycle number 14283
Running for 2 days 19 hours 16 minutes 42 seconds - 16.96 seconds per step
Estimated time remaining: 16 days 19.79 hours
Traceback (most recent call last):
  File "RETIS_langevin_45.py", line 212, in <module>
    calc.run(steps)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathsimulators/path_sampling.py", line 258, in run
    self.sample_set.sanity_check()
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/sample.py", line 243, in sanity_check
    assert(sample.ensemble(sample.trajectory))
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2868, in __call__
    return super(TISEnsemble, self).__call__(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2328, in __call__
    return self._new_ensemble(self._alter(trajectory), trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1339, in __call__
    fname="__call__"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1309, in _generalized_short_circuit
    a = f1(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1585, in __call__
    transitions = self.transition_frames(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1556, in transition_frames
    subtraj_first, ens_num)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1639, in _find_subtraj_final
    while ((ens.can_append(subtraj, trusted=True) or
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2335, in can_append
    trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1349, in can_append
    fname="can_append"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1327, in _generalized_short_circuit
    b = f2(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2190, in can_append
    return self._trusted_call(trajectory, self._cache_can_append)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2180, in _trusted_call
    cache.contents['previous'] = self._volume(frame)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 204, in __call__
    return not self.volume(snapshot)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2203, in __call__
    if len(trajectory) == 0:
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/netcdfplus/proxy.py", line 82, in __len__
    return len(self.__subject__)
TypeError: object of type 'ToySnapshot' has no len()
Error in sys.excepthook:

Original exception was:

Even more weird stuff: the call of a UnionVolume on a snapshot is somehow resulting in a __getitem__ call from chaindict

random chaindict call

Working on Monte Carlo cycle number 18580
Running for 1 day 17 hours 20 minutes 7 seconds -  8.01 seconds per step
Estimated time remaining: 7 days 13.15 hours
Traceback (most recent call last):
  File "TIS_langevin_0.py", line 210, in <module>
    calc.run(steps)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathsimulators/path_sampling.py", line 258, in run
    self.sample_set.sanity_check()
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/sample.py", line 243, in sanity_check
    assert(sample.ensemble(sample.trajectory))
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2868, in __call__
    return super(TISEnsemble, self).__call__(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2328, in __call__
    return self._new_ensemble(self._alter(trajectory), trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1339, in __call__
    fname="__call__"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1309, in _generalized_short_circuit
    a = f1(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1601, in __call__
    if not self.ensembles[subtraj_i](subtraj):
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2328, in __call__
    return self._new_ensemble(self._alter(trajectory), trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1339, in __call__
    fname="__call__"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1327, in _generalized_short_circuit
    b = f2(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2216, in __call__
    if not self._volume(frame):
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/volume.py", line 204, in __call__
    return not self.volume(snapshot)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/netcdfplus/chaindict.py", line 229, in __getitem__
    return self._post[items]
AttributeError: 'UnionVolume' object has no attribute '_post'
Error in sys.excepthook:

Original exception was:

And the same happened to NegatedVolume as well:

NegatedVolume._post error

Working on Monte Carlo cycle number 37098
Running for 1 day 13 minutes 28 seconds  -  2.35 seconds per step
Estimated time remaining: 1 day 17.08 hours
Traceback (most recent call last):
  File "2WTSRETIS_langevin_45.py", line 177, in <module>
    calc.run(steps)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathsimulators/path_sampling.py", line 228, in run
    movepath = self._mover.move(self.sample_set, step=self.step)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 2559, in move
    self.mover.move(sample_set),
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 1582, in move
    subchange = mover.move(sample_set)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 1582, in move
    subchange = mover.move(sample_set)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 1582, in move
    subchange = mover.move(sample_set)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 613, in move
    change = self.move_core(samples)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 640, in move_core
    trials, call_details = self(*samples)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 786, in __call__
    shooting_index)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 2360, in _run
    mid_traj_shoot_idx)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/pathmover.py", line 2260, in _make_forward_trajectory
    running=[fwd_ens.can_append])
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/engines/dynamics_engine.py", line 423, in generate
    for trajectory in it:
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/engines/dynamics_engine.py", line 610, in iter_generate
    continue_conditions=running)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/engines/dynamics_engine.py", line 377, in stop_conditions
    can_continue = condition(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2335, in can_append
    trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1349, in can_append
    fname="can_append"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1309, in _generalized_short_circuit
    a = f1(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1349, in can_append
    fname="can_append"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1327, in _generalized_short_circuit
    b = f2(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1859, in can_append
    return self._generic_can_append(trajectory, trusted, strict=False)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1752, in _generic_can_append
    trajectory, subtraj_first, ens_num, last_checked
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1639, in _find_subtraj_final
    while ((ens.can_append(subtraj, trusted=True) or
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1349, in can_append
    fname="can_append"
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 1309, in _generalized_short_circuit
    a = f1(trajectory, trusted)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2190, in can_append
    return self._trusted_call(trajectory, self._cache_can_append)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2168, in _trusted_call
    reset_value = self(trajectory[:-1], trusted=False)
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/ensemble.py", line 2216, in __call__
    if not self._volume(frame):
  File "/home/sander/miniconda3/envs/tstis/lib/python3.6/site-packages/openpathsampling/netcdfplus/chaindict.py", line 229, in __getitem__
    return self._post[items]
AttributeError: 'NegatedVolume' object has no attribute '_post'
Error in sys.excepthook:

Original exception was:

Do you have any tips on how to debug/solve this further?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 29 (29 by maintainers)

Most upvoted comments

Alright, (hopefully) final update on this from me, a simulation that only had #975 and #976 ran 166_770 steps without a storage, followed by a 100_000 step production run (with a storage). I will run 10 more (similar) simulations over the following weeks, which are run with #978 as well.

I feel fairly certain those PRs pushed the occurrences of these bugs far enough back that it should not matter for most simulations.

It seems (from the PRs that fixed this) to have something to do with the UUID/hash space not being as big as we think it is, but I have no clue why, and no bandwidth to investigate this further.

A summary of things that weren’t it in my case:

  • storage did not matter as these bugs surfaced without any storage attached to the simulations
  • It was not a memory issue, as the bug surface at ~10% memory utilization with only a single process running
  • I wasn’t running python in 32 bit precision (which will cut hashing values to 32 bits), can be checked by running len(bin(sys.maxsize))
  • the __uuid__ and __hash__ space should be big enough for all intents and purposes.

So, this bug seems fixed enough for me that I can close this issue. Someone searching for these errors should end up here at some point. I will reopen this if any of the other 10 simulations fail. @dwhswenson Thanks for all the feedback helping debugging here.