Code Monkey home page Code Monkey logo

Comments (5)

jschueller avatar jschueller commented on June 1, 2024 2

I added cmake files for this purpose in #28 to install the fortran & C lib

from prima.

bellomia avatar bellomia commented on June 1, 2024 1

@zaikunzhang Thanks a lot for the very detailed clarification. We are more or less into the proper domain of applicability, but to be honest we are indeed still investigating on which minimizer would best fit our needs.

More in general we maintain https://github.com/QcmPlab/SciFortran and may potentially be interested in embedding PRIMA into the library. Would you be comfortable with us doing that? License wise it should be feasible, if I'm not missing
something obvious. Any comment or advice in this regard would be very welcome. Currently SciFor implements some of the methods in SciPy's minimize package, and Powell's methods have been for a long time in the TODO pipeline :)

@jschueller thanks a lot for the effort, much appreciated! I will look closely into the fate of that PR :)

from prima.

zaikunzhang avatar zaikunzhang commented on June 1, 2024

Hi, I saw this package some week ago in the Fortran-lang discourse. It rose a lot of interest in my group, as we have widespread needs for well written optimization packages. Now we are starting to explore a bit on a new project and came here to try adding PRIMA as a dependency. I know there are plans to make it buildable with fpm, but since we are not there yet, and I cannot see a CMake or other build systems around (except for the matlab-specific MEX setup), how can we deal with fortran source building? Looking at the actions for the testsuite has not helped so far, maybe we are missing something.

Hi @bellomia thank you for your interest. Would the Makefiles in fortran/examples help? You are right --- as mentioned on Fortran discourse, the Fortran building facility for this package is (totally) missing. My intention was first and foremost to make the solvers available under MATLAB and Python. Now I have very limited time, if any, to work on it.

Before you start exploring these solvers, I invite you to have a look at https://www.pdfo.net/docs.html#introduction (it is a webpage for PDFO, which provides the F77 version of the solvers). I want to make it crystal clear that these solvers are NOT intended to be used as general-purpose solvers. They are designed for a class of VERY SPECIAL problems, namely derivative-free / black-box optimization problems. For problems not in this category, MUCH BETTER solvers exist, and it is STRONGLY discouraged to use the solvers here. Below I quote the above mentioned webpage. See the first two sections of https://arxiv.org/pdf/2302.13246.pdf for more information.

"Professor Powell devised these solvers to tackle general nonlinear optimization problems of continuous variables with or without constraints using only function values but not derivatives of the objective function or nonlinear constraint functions. In practice, such functions are often black boxes defined by simulations. Consequently, the corresponding optimization problems are often categorized as black-box optimization or simulation-based optimization. Problem specified by explicit formulas can probably be handled by other methods more efficiently."

from prima.

zaikunzhang avatar zaikunzhang commented on June 1, 2024

Hi @bellomia ,

More in general we maintain https://github.com/QcmPlab/SciFortran and may potentially be interested in embedding PRIMA into the library. Would you be comfortable with us doing that?

Absolutely. I am very glad if you embed PRIMA in your library. This is why I work on PRIMA --- to make Powell's methods easily available to as many people as possible.

I am in academia, so citation and acknowledgment are all that matter to me. As long as you do the following, it is perfect for me.

  1. Acknowledge in your code and documentation that your library includes code (derived) from PRIMA, and make a link to https://github.com/libprima/prima .

  2. In any paper / technical report / manual about your library, cite PRIMA as follows:

    • Z. Zhang, PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration, available at http://www.libprima.net, 2023

I will write a paper on PRIMA later. When the paper is ready to cite, I will inform you to update the citation.

  1. Respect the license of PRIMA, which is 3-clause BSD. The same as you, I am flexible with the license. If it is not compatible with your need, let us discuss it.

We are more or less into the proper domain of applicability, but to be honest we are indeed still investigating on which minimizer would best fit our needs.

It will be super interesting to me if your optimization problem is a true derivative-free / black-box problem. If you are comfortable, I am interested in hearing more about this problem. I need interesting applications to support my research.

Thanks.

Best regards,
Zaikun

from prima.

zaikunzhang avatar zaikunzhang commented on June 1, 2024

Hi, @bellomia , I should give another comment about derivative-free optimization (DFO).

In DFO, we assume that the major cost comes from the evaluation of the objective / constraint functions, not from the numerical linear algebra of the solver. In practice, it is not uncommon that each function evaluation takes minutes, hours, or even days to finish. Therefore, the numerical linear algebra cost of the solver is negligible.

This justifies the following.

  1. In the benchmarking of PRIMA against Powell's F77 implementation, I use the number of function evaluations to measure the cost / performance of the solvers. If you measure the computing time, the results will be totally different, because the functions of the test problems (see MatCUTEst ) are inexpensive to evaluate.

  2. In PRIMA, I use matrix-vector procedures instead of loops, even if the former is less efficient in terms of computing time. When I need to choose between efficiency and simplicity&clarity of the code, I always choose simplicity&clarity. This is not a good choice if we were not dealing with DFO.

Thanks,
Zaikun

from prima.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.