#10142: Frequent crash in ode_solver
------------------------------+---------------------------------------------
   Reporter:  mister.wardrop  |       Owner:  burcin
       Type:  defect          |      Status:  new   
   Priority:  critical        |   Milestone:        
  Component:  calculus        |    Keywords:        
     Author:                  |    Upstream:  N/A   
   Reviewer:                  |      Merged:        
Work_issues:                  |  
------------------------------+---------------------------------------------
 I have been using Sagemath (several versions, but must recently, 4.5.2;
 but this bug existed in previous versions as well) for my Honours thesis
 in quantum mechanics, and have been making heavy use of the integration
 routines. The ode_solver regularly crashes for specific step-sizes. I have
 not been able to work out a systematic pattern, but if it doesn't work
 once, it continues not to work no matter how many times you try. It can
 crash for any step size; sometimes even for integers. It does, however,
 usually only crash on the final step. It also seems to be independent of
 the numerical solver.

 When it crashes, it reports something like:

 ERROR: An unexpected error occurred while tokenizing input[[BR]]The
 following traceback may be corrupted or invalid[[BR]]The error message is:
 ('EOF in multi-line statement', (60,
 
0))[[BR]][[BR]]---------------------------------------------------------------------------[[BR]]!ValueError                               
 Traceback (most recent call
 last)[[BR]][[BR]]/home/themadhatter/Honours/modelling/<ipython console> in
 <module>()[[BR]][[BR]]/home/themadhatter/Honours/modelling/lib/sequences.pyc
 in evolution(self, period, step, perturbations, carryon)[[BR]]     16    
 [[BR]]     17     def
 evolution(self,period=100,step=1,perturbations=None,carryon=False):[[BR]]--->
 18         return
 
self.SYSTEM.integrate_numerically(perturbation=perturbations,self_entangle=True,step=step,period=period,projector=self.PROJECTOR,time_dependence=self.TIME_DEPENDENCE,carryon=carryon)[[BR]]    
 19     [[BR]]     20     def
 
fidelity(self,period=100,step=1,perturbations=None,carryon=False):[[BR]][[BR]]/home/themadhatter/Honours/modelling/lib/hamiltonian.pyc
 in integrate_numerically(self, y_0, period, step, perturbations,
 error_rel, error_abs, self_entangle, projector, time_dependence, function,
 increase_dim, noise, carryon, **params)[[BR]]    560        
 else:[[BR]]    561             integrator =
 
self.Integrator(self,y_0,self_entangle=self_entangle,noise=noise,increase_dim=increase_dim,perturbations=perturbations,time_dependence=time_dependence,cache='numerical',error_rel=error_rel,error_abs=error_abs)[[BR]]-->
 562             return integrator.start(period,step)[[BR]]    563    
 #[[BR]]    564     # Integrate a given initial state using the Hamiltonian
 and compare to ideal
 evolution[[BR]][[BR]]/home/themadhatter/Honours/modelling/lib/hamiltonian.pyc
 in start(self, period, step)[[BR]]    521         [[BR]]    522        
 def start(self,period=100,step=1):[[BR]]--> 523             self.results =
 self.integrate(self.y_0,period=period,step=step)[[BR]]    524            
 if self.multiple:[[BR]]    525                 return
 
self.results[[BR]][[BR]]/home/themadhatter/Honours/modelling/lib/hamiltonian.pyc
 in integrate(self, y_0, period, step, t_offset)[[BR]]    512            
 [[BR]]    513             for y_0 in y_0s:[[BR]]--> 514                
 
T.ode_solve(y_0=y_0,t_span=[0,period],params=params,num_points=int(period/step))[[BR]]   
 515                 results.append(T.solution)[[BR]]    516            
  pb_run+=1[[BR]][[BR]]/home/themadhatter/sage/local/lib/python2.6/site-
 packages/sage/gsl/ode.so in sage.gsl.ode.ode_solver.ode_solve
 (sage/gsl/!ode.c:4558)() [[BR]][[BR]]!ValueError: error solving

 I have been very careful in checking my code, and am confident that it is
 not a fault in my code. I have been working around it by changing the
 step-size adhoc... but when doing a series of runs; it is VERY annoying.
 ><

 If you need more information, let me know. I am quite happy to give you my
 entire code; along with specific instructions on how to trigger the crash.

 Please fix this!

 Kind Regards,[[BR]]Matthew

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10142>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to