Dear Chenchen Tong,
I got the same error, when running compile_mex.m on Ubuntu 12.04, gcc-4.6 and MATLAB R2013a:
=== lbfgsb "driver1" test problem, 2D ===
`GFORTRAN_1.4' not found (required by
For me the problem was solved by running MATLAB with LD_PRELOAD and LD_LIBRARY_PATH, pointing to the system libraries:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgfortran.so.3 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu matlab
Could you please post detailed instructions for how to compile the lbfgsb_wrapper in Windows 7 64bit?
I was only able to compile in Linux and Mac OS X so far . I also linked with the OpenBlas library which is very fast ( if you have a multi-core cpu).
Thank you very much.
That's great it works! If you wouldn't mind, can you post detailed instructions here? I think many others would find them useful.
You're right about the typo in the nrhs. I'll fix that in the next update.
Right now, the gradient is necessary. The Python and R versions use large packages to get around this. They might have a finite-differences gradient approximation mode, but I suspect they are really doing automatic differentiation (the good news is that this is the exact gradient, no approximation. The bad news is that it can be sometimes slow). There are automatic differentiation packages for Matlab, but none that seem to be very "mature". So you could try some of those, but if you can work out an explicit function to compute the gradient, that is usually the simplest (no automatic differentiation packages to get working) and the fastest for computation.
I finally managed to run it on Win7 64 with mingw fortran and msvc c compilers.
Stephan, is it necessary to give the gradient in any case? I know that the Python and R versions can use numerical approximations to the gradient. Do you know of a function that does that for me?