New release of Optizelle v1.2.0

We’re pleased to announce the release of Optizelle v1.2.0! Anyone interested can read the release announcement here. In short, use the new code over the previous versions. The algorithms are better; it’s better tested; the error handling is more sane; the licensing for all dependencies is clearer. Basically, it should just work better.

Outside the new code, we also now distribute precompiled binaries for all major platforms. For users that are primarily interested in the MATLAB, Octave, and Python interfaces, this should mean that you can use Optizelle immediately without downloading additional tools or compiling out the libraries. Certainly, the installers are new for us, so if anyone experiences any issues, please let us know.

As a final note, thanks again to our contributers. We really appreciate the help! Everyone should be in AUTHORS.txt now.

Does this version only work with Matlab 2016b? I have 2015a and am getting an error with the mex files. I’m thinking this may have to do with my version. Thanks!

Hi Nate! If I recall correctly, everything should work fine with R2015a, but I built the one online with R2016b, so it’s likely that the mex files are linked to the wrong library for you. What operating system are you running on? Sometime around 2016, MathWorks changed how paths were handled on Windows, which made it much easier to generate installers. At that point, I just started using the most recent version because it meant a bit less work for me. Of course, that means I’m currently behind and should be on 2017…

Anyway, it’s probably that the mex files are linked to the wrong version, but let me know what operating system you’re on, which will give me a better idea of what needs to happen to make it work on your system.

Hi Joe, my OS is Windows 8.1. I’m trying to run the “quadratic.m” example.

The specific error I get is:

“Invalid MEX-file ‘C:\Program
Files\Optizelle\share\optizelle\matlab\optizelle\UnconstrainedStateCreate_.mexw64’: The
specified procedure could not be found.”

Which is the first mex file it tries to access I believe. Thanks so much for your help and great product!

Nate

Hi Nate! Quick update. I pulled down R2015a and, yes, the installer will definitely not work with that version. There’s a couple of reasons why I’d upgraded to newer versions:

  1. Sometime in 2016, MathWorks changed how MATLAB responds to environment variables on Windows. Basically, on MacOS and Linux, we could set MATLABPATH behind the scenes in order to insure that Optizelle was in the user path. Prior to the upgrade in 2016, MATLAB would break on Windows, badly, when this was done. Since then, it’s been fixed, which I’m grateful for.

  2. Prior to the environment variable change, the user needed to have their own startup.m file in some directory in order to add the Optizelle path. Workable, but I could never figure out a good way to automate this, so I documented it in a document that few people read. Basically, the takeaway was to automate it.

  3. MathWorks tends to lag support for compilers pretty far behind what’s available. I just checked and MinGW GCC 4.9 wasn’t supported on Windows until 2015b. GCC 4.9 wasn’t supported on Linux until 2016b. Prior to 2015b, there was no support for MinGW at all on Windows. Prior to 2016b, Linux was on GCC 4.7. Alright, so this was an issue because I recall there being a bug with the standard library on GCC 4.7 that was fixed somewhere around 4.8 or 4.9. As such, we needed newer compilers. In addition, although there was a way to compile with Visual Studio, we really needed MinGW on Windows because we needed a Fortran compiler to figure out the name mangling scheme in order to interact with LAPACK and BLAS. Technically, this can be done by hand and technically there’s a way to use GFortran with Visual Studio (or at least I think there is), but it’s a pain. Now, really, there were ways to make MinGW work prior to R2015b, but it needed to be done by hand, which is what we did then and do now. However, even then, this still caused issues on platforms like Linux. Basically, there were library incompatibilities between the different versions of libstdc++ because mex files used MATLAB’s version, which was pegged at 4.7 until R2016b. There was a way to get around this with LD_PRELOAD, but it was messy. Long story short, R2016b was the first version where all of the necessary compilers on all platforms finally lined up.

Alright, that’s probably more information than necessary, so here’s the technical question that I haven’t answered: On R2015a, does Optizelle work fine on Windows using MinGW 4.9 if the environment variables aren’t set behind the scenes? Probably. I’ve got a few things on my plate right now, so give me a bit more time to investigate.

Two more questions for you:

  1. Is your version of MATLAB fixed or could you just upgrade?

  2. Do you have a toolbox that requires MATLAB, or could you just use Octave on Windows?

Joe, thanks so much for your thorough reply! I can’t update my Windows version but I was able to install 2016b on a linux machine and I’m up and running. Also, it looks like my coworker got it running on 2015a on Windows 7. FYI, we are just exploring with matlab and our plan is to move to the C++ version soon.

Thanks again!

No problem! If something is acting funny, running poorly, or if you have a question, feel free to send a note. I’m in the middle of reworking all of the algorithms and recoding the library, so it’d be good to know of an ongoing concerns.