Rank: 268594 based on 0 downloads (last 30 days) and 0 file submitted
photo

jian wang

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by jian View all
Updated File Comments Rating
09 Mar 2012 MATLAB interface for L-BFGS-B Matlab interface to the L-BFGS-B nonlinear optimization algorithm Author: Peter Carbonetto

I have successfully compiled the 32bit and 64bit version on Windows.
Some advice: It will be much easier if the compilers Microsoft Visual Studio and Intel Visual Fortran are used.
Thank Jorge Nocedal and Peter Carbonetto for making the L-BFGS-B available in matlab!

24 Jun 2011 MATLAB interface for L-BFGS-B Matlab interface to the L-BFGS-B nonlinear optimization algorithm Author: Peter Carbonetto

Is there anyone successfully compiled it on windsows64 platform ?

I have successed on win32 platform following Guillaume JACQUENOT's steps. But I find it so difficult to compile it on win64 platform. Howerver, after many trials I managed to go through and get the compiled "lbfgs.mexw64".But whenever I run "examplehs038",the matlab shut down without any warnings.

Here are the softwares I am using: gnumex2.01(need editing), tmd-gcc-4.5.2, gcc-fortran-4.5.2, matlab2010a.

Here are the .bat compile configuration files:

============mexopts_fortran.bat=================
@echo off
rem C:\Documents and Settings\user\Application Data\MathWorks\MATLAB\R2010a\mexopts_f.bat
rem Generated by gnumex.m script in d:\gnumex
rem gnumex version: 2.04
rem Compile and link options used for building MEX etc files with
rem the Mingw/Cygwin tools. Options here are:
rem Gnumex, version 2.04
rem MinGW linking
rem Mex (*.dll) creation
rem Libraries regenerated now
rem Language: Fortran 77
rem Optimization level: -O3 (full optimization)
rem Matlab version 7.10
rem
set MATLAB=D:\PROGRA~1\MATLAB\R2010a
set GM_PERLPATH=D:\PROGRA~1\MATLAB\R2010a\sys\perl\win32\bin\perl.exe
set GM_UTIL_PATH=d:\gnumex
set PATH=E:\MinGW64\bin;%PATH%
rem set PATH=%PATH%;C:\Cygwin\usr\local\gfortran\libexec\gcc\i686-pc-cygwin\4.3.0
set PATH=%PATH%;E:\MinGW64\libexec\gcc\x86_64-w64-mingw32\4.5.2
set LIBRARY_PATH=E:\MinGW64\lib
set G95_LIBRARY_PATH=E:\MinGW64\lib
rem
rem precompiled library directory and library files
set GM_QLIB_NAME=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
rem
rem directory for .def-files
set GM_DEF_PATH=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
rem
rem Type of file to compile (mex or engine)
set GM_MEXTYPE=mex
rem
rem Language for compilation
set GM_MEXLANG=f77
rem
rem File for exporting mexFunction symbol
set GM_MEXDEF=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex\fmex.def
rem
set GM_ADD_LIBS=
rem -lflibmx -lflibmex -lflibmat
rem
rem compiler options; add compiler flags to compflags as desired
set NAME_OBJECT=-o
set COMPILER=g++
rem set COMPFLAGS=-c -DMATLAB_MEX_FILE -fcase-upper -fno-underscoring
set COMPFLAGS=-c -DMATLAB_MEX_FILE -mrtd -fexceptions
set OPTIMFLAGS=-O3
set DEBUGFLAGS=-g
rem
rem NB Library creation commands occur in linker scripts
rem
rem Linker parameters
set LINKER=%GM_PERLPATH% %GM_UTIL_PATH%\linkmex.pl
set LINKFLAGS=
set LINKOPTIMFLAGS=-s
set LINKDEBUGFLAGS=-g -Wl,--image-base,0x28000000\n
set LINKFLAGS= -LC:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=-o %OUTDIR%%MEX_NAME%%MEX_EXT%
rem
rem Resource compiler parameters
set RC_COMPILER=%GM_PERLPATH% %GM_UTIL_PATH%\rccompile.pl -o %OUTDIR%mexversion.res
set RC_LINKER=

================mexopts.bat===================
@echo off
rem C:\Documents and Settings\user\Application Data\MathWorks\MATLAB\R2010a\mexopts_c.bat
rem Generated by gnumex.m script in d:\gnumex
rem gnumex version: 2.04
rem Compile and link options used for building MEX etc files with
rem the Mingw/Cygwin tools. Options here are:
rem Gnumex, version 2.04
rem MinGW linking
rem Mex (*.dll) creation
rem Libraries regenerated now
rem Language: C / C++
rem Optimization level: -O3 (full optimization)
rem Matlab version 7.10
rem
set MATLAB=D:\PROGRA~1\MATLAB\R2010a
set GM_PERLPATH=D:\PROGRA~1\MATLAB\R2010a\sys\perl\win32\bin\perl.exe
set GM_UTIL_PATH=d:\gnumex
set PATH=E:\MinGW64\bin;%PATH%
rem set PATH=%PATH%;C:\Cygwin\usr\local\gfortran\libexec\gcc\i686-pc-cygwin\4.3.0
set PATH=%PATH%;E:\MinGW64\libexec\gcc\x86_64-w64-mingw32\4.5.2
set LIBRARY_PATH=E:\MinGW64\lib
set G95_LIBRARY_PATH=E:\MinGW64\lib
rem
rem precompiled library directory and library files
set GM_QLIB_NAME=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
rem
rem directory for .def-files
set GM_DEF_PATH=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
rem
rem Type of file to compile (mex or engine)
set GM_MEXTYPE=mex
rem
rem Language for compilation
set GM_MEXLANG=c++
rem
rem File for exporting mexFunction symbol
set GM_MEXDEF=C:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex\mex.def
rem
set ML=C:\Documents and Settings\user\Application Data\MathWorks\MATLAB\R2010a\gnumex
set GM_ADD_LIBS=%ML%\libmx.lib %ML%\libmex.lib %ML%\libmat.lib E:\MinGW64\bin\libgfortran_64-3.dll
rem
rem compiler options; add compiler flags to compflags as desired
set NAME_OBJECT=-o
set COMPILER=g++
set COMPFLAGS=-c -DMATLAB_MEX_FILE
set OPTIMFLAGS=-O3
set DEBUGFLAGS=-g
rem set CPPCOMPFLAGS=%COMPFLAGS% -x c++
set CPPCOMPFLAGS=%COMPFLAGS%
set CPPOPTIMFLAGS=%OPTIMFLAGS%
set CPPDEBUGFLAGS=%DEBUGFLAGS%
rem
rem NB Library creation commands occur in linker scripts
rem
rem Linker parameters
set LINKER=%GM_PERLPATH% %GM_UTIL_PATH%\linkmex.pl
set LINKFLAGS=
set CPPLINKFLAGS=GM_ISCPP
set LINKOPTIMFLAGS=-s
set LINKDEBUGFLAGS=-g -Wl,--image-base,0x28000000\n
set LINKFLAGS= -LC:\DOCUME~1\user\APPLIC~1\MATHWO~1\MATLAB\R2010a\gnumex
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=-o %OUTDIR%%MEX_NAME%%MEX_EXT%
rem
rem Resource compiler parameters
set RC_COMPILER=%GM_PERLPATH% %GM_UTIL_PATH%\rccompile.pl -o %OUTDIR%mexversion.res
set RC_LINKER=

24 Jun 2011 MATLAB interface for L-BFGS-B Matlab interface to the L-BFGS-B nonlinear optimization algorithm Author: Peter Carbonetto

Correction: Here are the softwares I am using: tmd-gcc-4.5.2, gcc-fortran-4.5.2, matlab2010a.

Contact us