Casadi 3.4 with Octave 4.2.2:

77 views
Skip to first unread message

Dave Goel

unread,
Mar 21, 2018, 12:11:44 AM3/21/18
to CasADi

Casadi 3.4 with Octave 4.2.2:

I feel so silly asking this. Debian stretch-backports updated my octave to 4.2.2 [I know, I should have checked!] and casadi stopped working properly.
I can't seem to figure out how to get octave's  4.2.1 package from backports.

And, with casadi (3.4), I get weird errors:

octave:4> MX(1,2)
error: invalid assignment to cs-list outside multiple assignment
error: called from
    MX at line 111 column 21

Joris Gillis

unread,
Mar 21, 2018, 3:53:10 AM3/21/18
to CasADi
Ouch, I didn't expect our interface to depend so closely on octave version..

I'll have to investigate this.
I do suggest you continue to look for the older package, as I will not have time to look for a solution until next week..

Best regards,
  Joris

Dave Goel

unread,
Mar 24, 2018, 11:26:40 PM3/24/18
to CasADi
Unfortunately, I still can't seem to figure out how to download octave 4.2.1 for stretch backports.  I feel so dumb. 

In the meanwhile, I got around the MX(2,2) problem by using stuff like MX.zeros(2,2).

But, that was a general sign of things. I keep getting weird errors simply upon trying to print some variables.  This error pops up everywhere:

error: invalid assignment to cs-list outside multiple assignment

But, the other bugs were deep inside my code. Other than the above MX(2,2) example, I can't seem to find a SSCCE/MRE of the problem. 

Andres Codas Duarte

unread,
Apr 12, 2018, 1:13:25 PM4/12/18
to CasADi
Hi Joris and Dave,

   Is this issue resolved in Casadi 3.4.1?  Particularly, the default in OSX with brew is octave 4.2.2 and I cannot find an easy way to install octave 4.2.1.

   Regards,
   Andres

Joris Gillis

unread,
Apr 12, 2018, 1:25:58 PM4/12/18
to CasADi
our mac builds make use of homebrew as well, so yes this is fixed. But not for linux..

Andres Codas Duarte

unread,
Apr 12, 2018, 5:40:12 PM4/12/18
to CasADi
The issue persists on my OSX high sierra with octave 4.2.2 installed via brew with octave 3.4.1

Funny fact:

octave:1> a = casadi.MX(2,1)
a =

zeros(2x1,0nz)

octave:2> b = MX(2,1)

error: invalid assignment to cs-list outside multiple assignment
error: called from
    MX at line 111 column 21

The issue does not appear if you switch to octave 4.0.3 (https://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2016-07-11-binary-octave-4.0.3/octave_gui_403_appleblas.dmg/download) with same configurations.
I also tested on an ubuntu machine with octave 4.2.1 and there is no problem there.

I made all the substitutions so that I use casadi.MX() but there are still inconsistencies.  I did not manage to get a minimum failing example :(

I hope this feedback somehow helps...

Joris Gillis

unread,
Apr 16, 2018, 2:14:44 PM4/16/18
to CasADi
Issue fixed on develop branch.
CasADi 4.2.2 to be expected soon..

   Joris

Joris Gillis

unread,
Apr 24, 2018, 8:30:30 AM4/24/18
to CasADi
I meant CasADi 3.4.2, obviously. It's out now with support for octave 4.2.2

   Joris

Andres Codas Duarte

unread,
Apr 24, 2018, 5:46:21 PM4/24/18
to CasADi
Hi Joris

   I'm still facing issues on octave 4.2.2 with CasADi 3.4.2, with both linux and OSX.

   Consider the LP object:

LP.m
classdef LP

properties
    eqs
    A
end

methods
   
function problem = LP(eqs)
        problem
.eqs = eqs;
   
end
   
function n = numel(problem)
        n
= numel(problem.eqs);
   
end

end
end

  If I run the following script:



p
= LP(1);
p
.A = 1;  % ok


mx
= casadi.MX.sym('mx',3,1);
p
= LP(mx);
p
.A = 1;  % not ok



I get:

error: invalid assignment to cs-list outside multiple assignment

on the last line.  This the minimal failing example I manage for the moment, I hope it is sufficient to help

Regards,
Andres

Joris Gillis

unread,
Apr 24, 2018, 11:10:04 PM4/24/18
to CasADi
Dear Andres,

I think you just constructed an example that fails regardless of casadi (replace mx by zeros(2,1))?
If so, consider posting it to https://savannah.gnu.org/bugs/?46571 No need to mention casadi there..

Best,
Joris

Reply all
Reply to author
Forward
0 new messages