64 bit, error: expected expression befor...

Help
Mathis
2012-12-01
2013-11-04
  • Mathis

    Mathis - 2012-12-01

    Hi again, I tried to switch my integrator method to dopri or radau to speed it up. I got the radau and dopri tests to work with the following steps:
    1)Remove -m32 flag in
    Generator/Dopri_ODEsystem.py 
    Generator/Radau_ODEsystem.py
    PyCont/ContClass.py
    2) remove radau and dopri temp folders in the working directory
    3) install gfortran and swig
    Now except for a non-terminal events found warning, both the dopri_event_test.py and radau_event_test.py run smoothly.
    When I try to employ these integrators in my actual code, I stumble into the following error messages:

    {
    /home/mathis/python/myenv/Kibble-Zurek/radau5_temp/Kibble_vf.c: In function ‘F’:
    /home/mathis/python/myenv/Kibble-Zurek/radau5_temp/Kibble_vf.c:243: error: expected expression before ‘[’ token
    }

    {
    /home/mathis/python/myenv/Kibble-Zurek/dopri853_temp/Kibble_vf.c: In function ‘F’:
    /home/mathis/python/myenv/Kibble-Zurek/dopri853_temp/Kibble_vf.c:243: error: expected expression before ‘[’ token
    }

    The cited code is:

    {
    return [-5*__y1__+2*sqrt(2)*J(__t__, p_, wk_, xv_)*sin(2*3.141592653589793/L*k)*    __y2__,5*__y0__+2*sqrt(2)*J(__t__, p_, wk_, xv_)*sin(2*3.141592653589793/L*k)*__    y3__,-(2*sqrt(2)*J(__t__, p_, wk_, xv_)*sin(2*3.141592653589793/L*k))*__y0__+((m    u-2*J(__t__, p_, wk_, xv_)*cos(2*3.141592653589793/L*k)+U-mu-4*J(__t__, p_, wk_,     xv_)*cos(2*3.141592653589793/L*k))-5)*__y3__,(-(2*sqrt(2)*J(__t__, p_, wk_, xv_    )*sin(2*3.141592653589793/L*k))*__y1__)-((mu-2*J(__t__, p_, wk_, xv_)*cos(2*3.14    1592653589793/L*k)+U-mu-4*J(__t__, p_, wk_, xv_)*cos(2*3.141592653589793/L*k))-5    )*__y2__] ;
    }
    

    The problem occurs when creating the ODE: ode = Generator.Dopri_ODEsystem. Vode runs through smoothly.
    The error is persistent over 2 machines with very different configurations, one is running nixos, one ubuntu.
    Do I have to handle dopri and radau somehow differently from vode? Let me know if I can supply any more information.
    Thanks in advance. All the best, Mathis

     
  • Rob Clewley

    Rob Clewley - 2012-12-01

    Hi,

    I'll be happy to take a look. Please email me your full model code. I will need to introspect PyDSTool while it's running. Also, there is a built-in constant pi so that you don't have to type it out like that.

     
  • Mathis

    Mathis - 2012-12-03

    Thanks so much for the offer. After some more testing the error somehow vanished. Afterwards I repeatedly got the segfault error and now the error behaviour seems to be very random.
    I use IPython.parallel to calculate the ODE for different initial conditions. Sometimes some of the CPU's crash, sometimes they don't. Their is no structure visible, the number of crashing CPU's as well as their number given by ipython is completely arbitrary.
    The one constant behaviour, which is very weird, is that if it works once on a fixed set of those CPU's, it will continue to work. I am trying to "initialise" them somehow by giving them a different problem, but so far it is still complete chaos.
    I do not know whether PyDSTool is responsible or whether it is IPython and it is driving me crazy.
    I will continue to experiment some more and will come back with a status update.
    The dopri integrator only takes about half of the time of vode and it would be really great to get it running reliably.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks