[MMTK] Pyrex evaluator backtrace

khinsen@cea.fr khinsen at cea.fr
Tue Jan 31 12:47:38 CET 2006


On Jan 27, 2006, at 23:49, Iordan Hristov wrote:

> here is the backtrace from running mdtest.py. If I run just test.py  
> everything works fine. It's only in MD or minimization runs that  
> the evaluator crashes right away.

In that situation I get a crash as well, and I suspect that it is the  
same problem that was noticed earlier with energy terms implemented  
in Python. As I said back then, this will take a while to sort out,  
as it might well require an investigation of undocumented features of  
the Python interpreter.

However, there is no problem as long as no Python routines are called  
inside the energy calculation. If you rewrite your function test1()  
such that it fully translates to C, it works fine:

     cdef int test1(self):
         cdef int a, i
         a = 0
         for i from 1 <= i <=3:
             a = a + i
         return a

Of course you also need to remove the "print" statement, but that was  
probably for demonstration only anyway. If you do need to get output,  
call the C function printf().

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
---------------------------------------------------------------------





More information about the mmtk mailing list