[MMTK] MMTK 2.2 with Python 2.2

Konrad Hinsen hinsen@cnrs-orleans.fr
21 Aug 2002 16:41:54 +0200


Berit Hinnemann <Berit.Hinnemann@fysik.dtu.dk> writes:

> has anybody used MMTK 2.2 together with Python 2.2? When I use it,

I have been using that combination for months without problems.

But I have had some reports of this problem, which I could not
reproduce on my machine.

> python keeps crashing, but it seems to me, as if python is the problem
> and not MMTK.
> For example, when I run the script "enterms.py" which reads the pdb-file
> 'gly2.pdb', I get the output

Here is what I get (without any crash):

58.6206188561
{'harmonic bond': 3.6368998786352358, 'electrostatic/ewald direct sum': 1164.6289245944686, 'electrostatic': 20.953643214638987, 'harmonic bond angle': 4.1739384058895146, 'electrostatic/ewald reciprocal sum': 372.0040546147543, 'Lennard-Jones': 14.767833207558489, 'cosine dihedral angle': 15.088304149375503, 'electrostatic/ewald self term': -1515.6793359945839}

> When I try to use the ConjugateGradientMinimizer, python crashes with
> the error message
> 
> Fatal Python error: GC object already in linked list
> Abort (core dumped)

That's an error message from the new cyclic garbage collector in
Python 2. MMTK doesn't use it (and doesn't need it), so this error
should not be caused by an MMTK object. Numeric uses it in newer
versions, and of course Python's builtin objects.

As a first test, add the following at the beginning of your script:

  import gc
  gc.disable()

That switches off the garbage collector completely. If that solves your
problem, you can recompile Python with the option --without-cycle-gc.

In any case, I'd be interested in the following information (also from
others who see strange crashes):

1) What system are you using?
2) Which versions of
    - Python
    - Numeric
3) Were any non-standard options used in compiling Python?
4) Does disabling the garbage collector help?

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------