Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed tests #2

Open
rajeev2010 opened this issue Jul 22, 2013 · 1 comment
Open

failed tests #2

rajeev2010 opened this issue Jul 22, 2013 · 1 comment

Comments

@rajeev2010
Copy link

I just installed odespy on a ubuntu machine using anaconda. Most of the examples in the tests folder have failed. I was wondering if there is some problem with my installation. Here are some details -

$ anaconda demo_AdaptiveResidual.py
Traceback (most recent call last):
  File "demo_AdaptiveResidual.py", line 24, in <module>
    u,t = m.solve(time_points, print_info=True)
TypeError: solve() got an unexpected keyword argument 'print_info'


$ anaconda demo_basics_complex_Pi.py 
 Scalar ODE with complex value
 u' =  1./(t - 10 + 1j) 
Failed when solver is AdamsBashMoulton2
Failed when solver is AdamsBashMoulton3
... (a long list here, all failed)


$ anaconda demo_basics_exponential.py 
Scalar ODE: Exponential u = exp(-t), u' = -u
... (lot of them succeed)
Succeed when solver is RKFehlberg
Segmentation fault (core dumped)

the last one fails with same message for demo_basics_sine.py and demo_basics_van_der_pol.py.

$ anaconda demo_MyRungeKutta.py 
Traceback (most recent call last):
  File "demo_MyRungeKutta.py", line 44, in <module>
    orders += [method.get_order()]
  File "/home/rajeev/software/general/anaconda/lib/python2.7/site-packages/odespy/RungeKutta.py", line 96, in get_order
    order = [_calculate_order_1_level(table_1),
  File "/home/rajeev/software/general/anaconda/lib/python2.7/site-packages/odespy/RungeKutta.py", line 14, in _calculate_order_1_level
    u,t = test.solve([0., .1, 1.1])
  File "/home/rajeev/software/general/anaconda/lib/python2.7/site-packages/odespy/solvers.py", line 1030, in solve
    self.validate_data()
  File "/home/rajeev/software/general/anaconda/lib/python2.7/site-packages/odespy/RungeKutta.py", line 379, in validate_data
    The shape of your input array is (%d, %d).''' % (m,n)
ValueError:         The dimension of 2d-array <method_yours_array> should be:
        1. Either (n, n), --> For 1-level RungeKutta methods
        2. Or (n+1, n),   --> For 2-levels RungeKutta methods
        The shape of your input array is (3, 4).

segmentation fault for all the radau5 tests.

$ anaconda demo_RKC_1.py 
Traceback (most recent call last):
  File "demo_RKC_1.py", line 61, in <module>
    raise Exception('Reimplement this test for variable grid size and debug RKFehlberg then.')
Exception: Reimplement this test for variable grid size and debug RKFehlberg then.
@rajeev2010
Copy link
Author

I figured out the issue with one of the tests, namely, demo_basics_complex_Pi.py

method = eval(solver)(f, atol=1e-6)

should be

method = eval(solver)(f, atol=1e-6, complex_valued=True)

all the solvers succeed now except 'AdaptiveResidual' which took very long so I killed it before ending!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant