
[Sponsors] 
public domain f77 separable nonlinear least squares solver wanted 

LinkBack  Thread Tools  Display Modes 
January 26, 2000, 06:00 
public domain f77 separable nonlinear least squares solver wanted

#1 
Guest
Posts: n/a

Hi,
I need a public domain f77 subroutine for solving the following problem: minimize f_1**2+...+f_m**2 where f_i(x_1,...,x_n,y_1,...,y_m) are linear in x_k and nonlinear in y_l. n=32, m=8 or 16 or 34, f_i are simple, so, may be, pure nonlinear optimizer will do. I tried lmdif1 from MINPACK but when n>8 it gives incorrect results. Any suggestions? Sergei 

January 26, 2000, 21:50 
Re: public domain f77 separable nonlinear least squares solver wanted

#2 
Guest
Posts: n/a

Try to use the book, Numerical Recipies in Fortran77 2nd ed. Are you talking about optimization?
Zhong 

January 27, 2000, 06:01 
Re: public domain f77 separable nonlinear least squares solver wanted

#3 
Guest
Posts: n/a

Hi, Zhong,
Thank you. Subroutines in Numerical Ricipes are not in public domain, you have to pay for them, 50$ per one cheepestkind license per subroutine. Well, my problem is a specific case of data fitting. But this is quite close to optimization, of course. Rgds, Sergei. 

January 27, 2000, 12:01 
Re: public domain f77 separable nonlinear least squares solver wanted

#4 
Guest
Posts: n/a

Hi Sergei!
Try the following ftpserver. ftp://elib.zib.de/netlib/slatec The file toc.gz contains all f77 subroutines (public domain). For minimizing RMS of a multidimensional polynom I used the subroutine called "SNLS1.F" resp. "DNLS1.F" for double precission. Both are modifications of the LevenbergMarquardt algorithm. Mostly the source codes are explained well! Joerg 

January 27, 2000, 12:24 
Re: public domain f77 separable nonlinear least squares solver wanted

#5 
Guest
Posts: n/a

Hi, Joerg,
Thank you. I tried them, or, more exactly, SNLS1E.f, which is a driver for SNLS1.f. I also tried LMDIF1.f which is an earlier version. Note that I do not want to calculate the derivatives. Well, both perform badly, the older version just giving erroneous results while the newer one gives spurious error messages and stops, or just gives erroneuos results, too. And this is with comparatively simple functions with good Jacobean. I do not think I use them incorrectly since for other functions they work all right. Just their criteria for stopping iterations are far from perfect. So, I wrote my own code, after all. Not state of the art, but it works in the specific case I have, allthough I would like to have something better. Thanks again, Sergei 

January 28, 2000, 08:44 
Re: public domain f77 separable nonlinear least squares solver wanted

#6 
Guest
Posts: n/a

Hi Sergei!
That seems really strange to me. I used SNLS1.f for fitting a 4 dimensional polynom (each dimension has a order from 4 to 7) with approx 700 quadrupels. And I got really good results. I run the subroutine with IOPT=1 (means do not calculate jacobian matrix, because I don't need this). The criteria for stopping the iterations were 1E5 for single precission. Perhaps the suggested criteria (R1MACH(4)sqrt of machine precission) is a possibility for your problem? Good luck Joerg 

January 28, 2000, 12:19 
Re: public domain f77 separable nonlinear least squares solver wanted

#7 
Guest
Posts: n/a

Hi, Joerg,
Well, I made one more attempt. I downloaded slatec from the site you indicated, and run the checks supplied there. And it does not pass the checks! This can something to do with machine constants. I'll try to find a program which will determine all those constants for my specific computer. Thanks, Sergei 

January 28, 2000, 14:32 
Re: public domain f77 separable nonlinear least squares solver wanted

#8 
Guest
Posts: n/a

If you have a F90 compiler on your machine you can print out these values using F90 functions. That's how I found & used my machine numbers with netlib functions.
Adrin Gharakhani 

January 28, 2000, 14:37 
Re: public domain f77 separable nonlinear least squares solver wanted

#9 
Guest
Posts: n/a

Hi, Adrin,
Thanks, I did not know that f90 had such functions. I'll investigate. Rgds, Sergei 

January 28, 2000, 14:54 
Re: public domain f77 separable nonlinear least squares solver wanted

#10 
Guest
Posts: n/a

Look for the explanation for the following functions:
bit_size() digits() epsilon() exponent() fraction() huge() maxexponent() minexponent() precision() radix() range() rrspacing() spacing() tiny() You will not need all of these, but they are nice functions to know Adrin Gharakhani 

January 28, 2000, 14:56 
Re: public domain f77 separable nonlinear least squares solver wanted

#11 
Guest
Posts: n/a

Thanks


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Working directory via command line  Luiz  CFX  4  March 6, 2011 21:02 
why the solver reject it? Anyone with experience?  bearcat  CFX  6  April 28, 2008 14:08 
Case for nonlinear elastodynamic solver  florian_krause  OpenFOAM Running, Solving & CFD  1  April 10, 2008 17:49 
CFX Solver Memory Error  mike  CFX  1  March 19, 2008 08:22 
Solver error message!!!  IoSa  CFX  1  September 14, 2006 04:48 