Below is a list of changes and improvements made to levmar in reverse chronological order:


  • November 29, 2011: levmar version 2.6 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: An extra argument (dscl) was added to xlevmar_bc_der(), which supports diagonal scaling for projected gradient steps. The scaling argument dscl is a vector whose elements should contain “typical” magnitudes for the corresponding element of the parameter vector p. Such scaling can improve convergence when the starting point is far from the true minimizer. Passing a value of NULL implies no scaling. Thanks to William Gandler for reporting a test case that failed to converge due to the scaling issue.
    • Added a linear systems solver supporting parallel Cholesky decomposition with PLASMA, the high-performance linear algebra library for multicore processors. To use it, the HAVE_PLASMA macro in levmar.h should be defined prior to compiling and the invocations of AX_EQ_B_PLASMA_CHOL() uncommented.
    • Fixed linear solvers so that they operate on lower triangles of symmetric matrices which results in better cache performance.
    • Revised the CMake configuration files for building levmar.
    • Made several other minor changes.

  • December 04, 2009: levmar version 2.5 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: For better consistency and avoidance of conflicts, the name of levmar's header file was changed from lm.h to levmar.h; please update your source files accordingly.
    • Added support for minimization under simultaneous box, linear equation and inequality constraints (see functions xlevmar_bleic_der() & xlevmar_bleic_dif()).
    • Implemented convenience wrappers to xlevmar_bleic_der() & xlevmar_bleic_dif() dealing with simpler constrained cases, e.g. xlevmar_blic_der() & xlevmar_blic_dif() support minimization under box and linear inequality constraints only.
    • Added a linear systems solver based on the UDUt decomposition (i.e., sqrt-free Cholesky).
    • Removed some unnecessary memory copying from most linear solvers.
    • Added a new data-fitting test problem (Osborne).
    • Made a few other minor changes.

  • April 29, 2009: levmar version 2.4 released
    • CAUTION FOR PREVIOUS VERSIONS USERS: The size of the info argument (i.e., LM_INFO_SZ) was increased by one to accomodate a new return field (i.e., info[9]) that corresponds to the total number of linear systems solved during the course of the minimization. The indices of previously returned fields in the info array remain unchanged.
    • Implemented a more cache-efficient scheme for computing the approximate Hessian J^T*J and J^T*e for small-sized minimization problems.
    • Ensured that any working memory retained between invocations of the linear solvers is released upon the termination of levmar routines.
    • Ensured that linear solvers employ the minimum required amount of auxiliary memory, avoiding occasional over-allocations.
    • Implemented a loop unrolling scheme for speeding up the computation of e=x-hx.
    • Fixed a couple of issues with memory alignment on 64 bit systems.
    • Added functions for the computation of the coefficient of determination.
    • Dealt with a few minor issues.

  • May 9, 2008: levmar version 2.3 released This is a maintenance release, correcting a few errors and adding some functionalities:
    • Improved the support for problems with zero measurement vectors: Often, the sum of squares of a function needs to be minimized rather than the sum of squared differences between the measurement vector and the function. In such cases, a zero measurement vector can now be conveniently specified by passing a NULL value as the corresponding argument (i.e. x) of the levmar functions. Of course, supplying a non-NULL measurement vector with elements explicitly set to zero will also work. Thanks to Ralf Goertz for suggesting.
    • Memory that is retained among invocations of the linear solvers is now released when levmar's non linear minimization routines terminate; for more details on the memory retainment feature see the comments on the LINSOLVERS_RETAIN_MEMORY macro for ver. 1.2 below.
    • Introduced the LM_SNGL_PREC and LM_DBL_PREC macros which allow respectively only the single or only the double precision functions of levmar to be compiled.
    • Introduced the new error code 7 that signals infinite (i.e. NaN and Inf) values in the objective function provided by the user. Such erroneous values could cause indefinite looping. Thanks to Steve Danauskas for reporting.
    • Fixed a problem related to the handling of infinite values in the line search procedure of lmbc_core.c. Thanks to Ryan Woodard for reporting.
    • Added a check ensuring a maximum allowed number of iterations in the line search procedure of lmbc_core.c. Thanks to Christoph Schmidt-Hieber for reporting.
    • Slightly increased the size returned by the LM_DIF_WORKSZ macro. Also, separate macros for calculating the workspace size of the constrained variants where introduced: LM_BC_DER_WORKSZ, LM_BC_DIF_WORKSZ, LM_LEC_DER_WORKSZ, LM_LEC_DIF_WORKSZ, LM_BLEC_DER_WORKSZ and LM_BLEC_DIF_WORKSZ.
    • Updated the CMakeLists.txt file to facilitate cross-platform compilation through the CMake build system.
    • Added a detailed example on using levmar for fitting a non-linear model to noisy data measurements.

  • December 17, 2007: levmar version 2.2 released
    • Added routines for minimization under simultaneous box and linear equation constraints.
    • levmar now includes a matlab MEX interface. A first MEX-file for levmar was sent to me by Alexander Schiftner; later on the current MEX-file was written from scratch.
    • Improved error handling in various routines. Instead of an immediate exit, tolerable errors result in a return with value LM_ERROR (-1).
    • Disabled retaining memory in linear solvers when levmar is compiled with OpenMP. Thanks to Steve Danauskas for reporting.
    • Fixed an error in the computation of the damping factor of levmar_dif() in lm_core.c. Thanks to John Ervin for reporting.
    • Fixed an error in the computation of the gradient magnitude in lmbc_core.c. Thanks to Pascal Mercier for spotting this.
    • Fixed a minor error in a malloc() error check in lmlec_core.c. Thanks to Alexander Schiftner for noticing.
    • Fixed an error with the linking order in the Makefiles that was causing errors under cygwin.

  • January 16, 2006: levmar version 2.1.3 released
    • Added provisions for a BLAS name mangling glitch regarding xGEMM. Thanks to Kim Mittendorf for reporting.

  • January 09, 2006: levmar version 2.1.2 released
    • Fixed an error regarding the workspace size of xORGQR in lmlec_core.c. Thanks to Frederic Bellencontre for noticing.
    • Added a Makefile for Intel's C++ Compiler. See Makefile.icc.

  • November 22, 2005: levmar version 2.1.1 released
    • Added a few lines of code that allow matrix products of the form J^T J to be computed using LAPACK/BLAS - if the former is available. Otherwise, those products are computed using blocking; see comments on ver. 1.2 below. BLAS-based matrix multiplication (esp. vendor tuned flavors) should be faster compared to the generic implementation in misc_core.c.

  • April 20, 2005: levmar version 2.1 released This is a maintenance release, correcting a few errors:
    • A makefile for Microsoft's Visual Studio C compiler has been created. See Makefile.vc. Thanks to Michael Johnson for pointing me to MSVC sample makefiles.
    • Fixed an error in xlevmar_bc_dif() that prevented any user-supplied data from being passed correctly to the user-supplied objective function. Thanks to Andreas Wiratanaya for noticing this bug.
    • Fixed a minor error that sometimes caused unnecessary warnings regarding the feasibility of starting points in lmlec_core.c
    • Fixed two errors in the specification of Hock - Schittkowski problem #51 in lmdemo.c: Wrong number of constraints was passed to dlevmar_lec_der(); also, the last element of the constraints matrix A had a wrong sign.
    • Added a FAQ with common questions regarding levmar.

  • February 11, 2005: levmar version 2.0 released Lots of new features, hence a new major release number.
    • CAUTION FOR PREVIOUS VERSIONS USERS: The following changes were made to the API:
      1. Added the new argument covar that upon return contains the computed covariance of a fit. Pass NULL if you do not need it.
      2. The size of the opts argument was increased to accomodate a new stopping threshold \epsilon_3 that causes a (premature) return when the sum of squares drops below it. info[6] code 6 is signaled in this case.
      3. Introduced the new info[6] codes 5 and 6.
    • Added routines for carrying out constrained minimization under linear equation and/or box constraints.
    • Added code to compute the covariance of a fit.
    • Added routines for verifying the correctness of a Jacobian implementation (dlevmar_chkjac()/slevmar_chkjac()).
    • Added a routine for approximating Jacobians using central differences.
    • All linear solvers now release any retained memory if called with a NULL first argument.
    • Added code to check for overflows when inreasing the damping term; old code could loop endlessly for close to singular matrices, new code exits with the new info[6] code 5. Thanks to Frank Jordan.
    • Added more test problems.
    • Updated levmar.pdf

  • October 29, 2004: levmar version 1.2 released
    • A brief explanation on the theory behind the Levenberg-Marquardt algorithm implemented by levmar has been added (see levmar.pdf).
    • A cache-friendly scheme based on blocking is now used to efficiently compute the matrix product J^T J approximating the Hessian. For problems involving many free variables, this scheme is several times faster compared to the previous naive implementation. Thanks to John Nitao of the Lawrence Livermore Lab for pointing out this performance problem.
    • Added the LINSOLVERS_RETAIN_MEMORY defined symbol which controls whether routines in Axb_core.c retain working memory between calls: To avoid repetitive malloc's and free's during the iterations of LM, the default behaviour of the linear solver routines is to retain working memory for future reuse. If, however, this is not desirable (e.g. levmar is used in a multi-threaded context, or as a shared library), it can be avoided by undefining LINSOLVERS_RETAIN_MEMORY in levmar.h.
    • Added dAx_eq_b_SVD() and sAx_eq_b_SVD(), two LAPACK-based linear systems solvers based on SVD.
    • Added the helical valley function as a test function in lmdemo.c.

  • August 6, 2004: levmar version 1.1 released
    • Added dAx_eq_b_LU_noLapack() and sAx_eq_b_LU_noLapack(), two LAPACK-free linear systems solvers based on LU decomposition. This makes levmar self-contained by no longer requiring LAPACK for solving the augmented normal equations. Choice between the LAPACK-free routines and the LAPACK-based ones is controlled by the HAVE_LAPACK defined symbol.
    • Made minor less important changes.

  • July 23, 2004: levmar version 1.0 released (first public release)