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
Bug in CVODES or its interface #1924
Comments
Nice catch! @jaeandersson interested to have a look? |
Can you try replacing "cvodes" with "idas"? |
@jgillis I can confirm it works for me as well. Now I'm getting errors regarding the |
So it works with idas but not with cvodes? I've seen that before. |
@jaeandersson Sorry for the brevity. Exactly as you say, it works with idas but not with cvodes. |
Looks like a bug in CVODES then, or in CasADi's interface to CVODES. I'd use IDAS instead until we figure out what it is. CVODES and IDAS are both from the SUNDIALS suite and use the same variable step-size, variable-order BDF method by default. |
I think I've fixed it now... the test suite gets the following error now though:
False positive, @jgillis ? |
I changed significant digits to 8... |
Can you post the ported code? |
What ported code? The changes to CasADi? |
I was talking more about original code topic starter posted. Ah well, I'll spend some time fixing (or porting? to newest casadi) it myself. |
I haven't changed that code, so you'd have to update it yourself. I isolated and solved this bug using a different example exhibiting the same behavior. |
@sashan13 I have posted that code right in the opening post (but there are still some mistakes in that "version"). Since then I have modified that code to integrate it into a bigger program (I'm doing some calculations for Kerbal Space Program). You can see it here: https://github.com/zegkljan/kos-stuff/blob/master/non-kos-tools/gturn/_gturn.py |
Thanks, that's what I was looking for.
Btw, running that code from original post withhot changing cvodes still
makes the script hang. I installed casadi using pip.
On Oct 16, 2017 11:31 PM, "Jan Žegklitz" <notifications@github.com> wrote:
@sashan13 <https://github.com/sashan13> I have posted that code right in
the opening post (but there are still some mistakes in that "version").
Since then I have modified that code to integrate it into a bigger program
(I'm doing some calculations for Kerbal Space Program). You can see it
here: https://github.com/zegkljan/kos-stuff/blob/master/non-kos-
tools/gturn/_gturn.py
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1924 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ASzWIjewXpPGtG-PVME1LBrDu3gXleRAks5ss8sbgaJpZM4LXRI1>
.
|
Hi, I was attempting to run this script and I found that the code still hangs with "cvodes" under # Build the DAE function comment. I also tried idas and I get the following error: At t = 0.000941595, , mxstep steps taken before reaching tout. Error in Function::operator() for 'fwd6_adj1_I' [MXFunction] at .../casadi/core/function.cpp:1368: Error in Function::operator() for 'fsens6_asens1_I' [IdasInterface] at .../casadi/core/function.cpp:1368: |
I was interested in the Gravity Turn Maneuver (found here). However, it is written for CasADi 2.4.2. I tried to modify it to work with 3.1.1 (see the code at the very end of this post). However, when I run it (in python 3.5.2), the solver seems to be stuck with one CPU core working at 100%. When I set the print_level option of IPOPT to 6, I get the following output:
and then I'm waiting forever.
However, using CasADi 2.4.2, it works fine and I get progress reports right away and after about 80 seconds it finishes and I get the results. Could this be me failing to properly convert the code to work with 3.1.1 or is it a bug? This is my very first time touching CasADi (in fact I came across the gravity turn rather than CasADi and I just wanted to get it working with the newest versions of everything...) so I won't be surprised if it is me. However, right now I have no idea. I can post additional info/data if instructed.
Contents of my
gturn3.py
file:The text was updated successfully, but these errors were encountered: