I would like to find a FORTRAN subroutine or a good way to minimize function numerically.So basically my function has 20 variables and I am able to provide analytic form of the first and the second derivative of the function. Basically what I want is: have the form of the function of 20 variables, I assign values to e.g. 14 variables and to find the set of values of the rest variables in order to have the minimized value of the function. Any tips how to do this or where to search for subroutine (trying to avoid local minima)?