You did not say which language you are using; GSL is awkward to use from Fortran, or if a C compiler other than GCC is used under Windows. Some of the algorithms, e.g., Fletcher-Reeves and Nelder-Mead, are quite old, and putting C wrappers around such old code does not make the algorithms work better. See https://www.lrz.de/services/software/mathematik/gsl/fortran/ .
You may find something that you can use at www.netlib.org/toms. On that page, search for "unconstrained".
If the function is general-nonlinear, without bounds on the variables, and you can compute the gradient, BFGS would be my choice. Once you write the code for the gradient, make sure to test it with several input values!
Andrey N, thanks for the link; I did not know that an unconstrained minimization routine was available in DAAL. I had briefly looked at DAAL when it was announced, but set it aside because it seemed not to be designed to be used from Fortran or even C.
I followed the link that you posted and tried to understand how to specify the objective function and call DAAL from Fortran or C. I could not find that information, so I looked at the example code (after installing DAAL for that very purpose) The example refers to some parameters of the objective function that are read from a CSV file, but that still leaves me in the dark about the mathematical form of the objective function. In short, what is the probem that the example code is supposed to solve?
Please point me to a page where the call to the minimizer is documented in, say, the same style as the MKL ?TRNLSP, if available. Thanks.
Hi, the description of the solvers is available in the section "Optimization Solvers" of the Developer Guide.
For example, the paragraphs https://software.intel.com/en-us/daal-programming-guide-iterative-solver and https://software.intel.com/en-us/daal-programming-guide-computation-6 discuss the general flow of the iterative solver and its parameters.
Paragraphs such as https://software.intel.com/en-us/daal-programming-guide-limited-memory-broyden-fletcher-goldfarb-sha... and https://software.intel.com/en-us/daal-programming-guide-computation-8 discuss details relevant to the specific solver, e.g., lBFGS.
Details related to the objective functions and their characteristics are available at https://software.intel.com/en-us/daal-programming-guide-objective-function.
Please, let me know, if the documentation contains sufficient level of the required details
What I find missing is the prototype declaration for a function (in Fortran, an interface) and a description of the parameters (in Fortran, dummy arguments to the subroutine/function). I want to know how to write the code for the function, and how to hook up the function to the solver.
I think part of the problem is the result of the object-oriented descriptions in C++ terminology not being comprehensible to a Fortran user who is procedure-oriented.
Here is an example of documentation that makes a solver accessible from more than one language:
It would, of course, be even better if Intel provided example DAAL codes in Fortran and C, as is done for MKL currently.
As you correctly mentioned the library provides C++ and Java API, python API is available as well, the library does not support Fortran.
API Reference manual that provides a brief description of the library's interfaces, in addition to the Developer Guide can be downloaded at https://software.intel.com/en-us/articles/daal-api-reference. You can choose daal_cpp_api_2019_beta.zip file. The info on the parameters of the solvers is available at Classes->Class List>daal->algorithms->optimization_solver. If you choose lbfgs->interface 1->Parameter you will see that one of the parameter constructor argument is a function of type sum_of_functions::BatchPtr See also 'Batch' available at the lbfgs->interface1
Let's have a look at lbfgs_dense_batch.cpp example: the first part of the example loads the data from csv data source to the memory, in the Numeric Table format. The second part of the example configures the parameters of the algorithm including the objective function:
// Run solver
// Extract the result with call