Rank: 6282 based on 14 downloads (last 30 days) and 1 file submitted
photo

Christoph Ortner

E-mail

Personal Profile:
Professional Interests:
Numerical Analysis, PDEs, Mathematical Modelling

 

Watch this Author's files

 

Files Posted by Christoph
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 May 2007 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner optimization, large scale, unconstrained, box constrained, nnls 14 7
  • 4.75
4.8 | 4 ratings
Comments and Ratings on Christoph's Files View all
Updated File Comment by Comments Rating
22 Aug 2012 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner Paul

I used Stephen's command verbatim to compile on 64 bit OS X (Snow Leopard). mex complained about "assignment from incompatible pointer type" in the copy_H function of mtron.c. So in addition to Son Le's modifications to mtron.c, I also had to change

in mtron.c, line 108: mwIndex *irt, *jct;

Now it seems to work great. (Bizarrely, the code occasionally worked before the line 108 modification, but was very slow.)

15 Feb 2012 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner Becker, Stephen

edit: my sentence about BLAS was confusing. What I mean to say is that the TRON fortran package includes a BLAS implementation. You need BLAS, but do not use their implementation. Use your computer's BLAS library, which is (hopefully) optimized.

15 Feb 2012 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner Becker, Stephen

I just got this to work on 64-bit linux too (before looking at the above comments). My fix is basically the same as the above. First, you edit the .c file to change ir and jc to mwSize. For compilation, you can do as Son Le described, or just skip the Makefile step altogether and do everything with mex (since mex will use -fPIC automatically). And you should not use the BLAS with the fortran file, since that defeats the purpose of using BLAS. If you have libblas, use it; if not, use libmwblas, which comes with Matlab. So my mex compilation was:

mex mtron.c ...
tron/src/tron/dbreakpt.f tron/src/tron/dgpstep.f tron/src/tron/dsetsp.f tron/src/tron/dtron.f ...
tron/src/tron/dcauchy.f tron/src/tron/dmid.f tron/src/tron/dspcg.f tron/src/tron/dtrpcg.f ...
tron/src/tron/dgpnrm2.f tron/src/tron/dprsrch.f tron/src/tron/dsphesd.f tron/src/tron/dtrqsol.f ...
tron/src/icf/dicf.f tron/src/icf/dsel2.f tron/src/icf/ihsort.f ...
tron/src/icf/dicfs.f tron/src/icf/dssyax.f tron/src/icf/insort.f ...
tron/src/icf/dpcg.f tron/src/icf/dstrsol.f tron/src/icf/srtdat2.f ...
tron/src/coloring/degr.f tron/src/coloring/idog.f tron/src/coloring/seq.f tron/src/coloring/slog.f ...
tron/src/coloring/dssm.f tron/src/coloring/numsrt.f tron/src/coloring/setr.f tron/src/coloring/srtdat.f ...
tron/src/coloring/ido.f tron/src/coloring/sdpt.f tron/src/coloring/slo.f ...
-lblas -lgfortran -largeArrayDims

By the way, this code was tested in the paper http://www.cs.utexas.edu/users/inderjit/public_papers/pqnj_sisc10.pdf
They suggest that it's no longer one of the best NNLS codes.

29 Nov 2011 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner Le, Son

Couple comments to make it works on x86_64:

- add -fPIC to the CFLAGS/FFLAGS of all Makefile when compiling tron.
- compile using gfortran if you have more recent GCC
- change -lg2c to "-lgfortran -largeArrayDims"
- in mtron.c:154 int dims[] => mwSize dims[]
- mtron.c:306/307 =>
mwIndex *t = mxGetJc(prhs[7]);
nnz = (t[n] + 100) * 2;

11 Jan 2011 MTRON MTRON is a Matlab wrapper for the Fortran software TRON (a large scale trust region Newton method). Author: Christoph Ortner Nicholas

In regards to memory issues and 64-bit compatibility:

The only changes that need to be made are to replace the int type declarations corresponding to ir and jc in the main routine with mwSize type declarations. Also, in the create_nfo function the int type for the dims array must be replced by an mwSize type.

Contact us