libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
296 stars 38 forks source link

error in matlab mex bulid #18

Closed xichaoqiang closed 1 year ago

xichaoqiang commented 1 year ago

Dear Sir, I meet an error in mex build.

Can you help me fix it?

OS: Windows 11

MATLAB version: R2023a

image

xichaoqiang commented 1 year ago

Here is build verbose message. mex_build_log.txt

zaikunzhang commented 1 year ago

Hello, @xichaoqiang

This iis due to some changes that I am currently making. It is not working yet. Please use the released version at

https://github.com/libprima/prima/releases/tag/v0.3

Tell me whether this solves your problem or not.

Thanks.

Zaikun

xichaoqiang commented 1 year ago

Thanks, Dr Zhang.

When I copy out.f from gateway folder to fortran folder,it can compile successfully.

image

Best regards, Xi

zaikunzhang commented 1 year ago

OK, fine. That kind of copying would not be necessary if you use the released version or if I finish the update today. Thanks,

xichaoqiang commented 1 year ago

Dear Dr Zhang, I have a question about method.

How many parameters is zeroth-order-method suitable for fitting?

Dozens, hundreds or thousands?

Best regards, Xi

zaikunzhang commented 1 year ago

Hello Xi,

For the current methods in PRIMA, tens to hundreds.

I have other methods that can solve problems up to 50,000, but it is not included in PRIMA yet.

What kind of constraints does your problem have? Bounds, linear, nonlinear, or none?

Thanks.

Zaikun

xichaoqiang commented 1 year ago

Dear Dr Zhang

My problem is bound-constrained, but the compute is too time consuming.

Best regards, Xi

zaikunzhang commented 1 year ago

Then how many variables?

xichaoqiang commented 1 year ago

hundreds or thousands

zaikunzhang commented 1 year ago

Then PRIMA should work. However, I hesitate to claim anything without knowing more about your problem.

zaikunzhang commented 1 year ago

Out of curiosity: was it easy for you to set up MEX? Did you use https://github.com/equipez/setup_mex ?

xichaoqiang commented 1 year ago

Out of curiosity: was it easy for you to set up MEX? Did you use https://github.com/equipez/setup_mex ?

I just install intel oneapi 2022 and matlab R2023a.Without additional steps.

xichaoqiang commented 1 year ago

那么PRIMA应该可以工作。但是,在没有进一步了解您的问题的情况下,我犹豫要不要提出任何要求。

My problem is tomography in geophysics community.

image

I can calculate the Jacobian matrix of my problem.

I'm curious about the zeroth-order-method.

zaikunzhang commented 1 year ago

I can calculate the Jacobian matrix of my problem.

If you have access to any kind of first-order information about your problem, using zeroth-order methods is generally discouraged (and most likely wrong).

First-order information is precious, and it should be well exploited. Otherwise, it is like walking when a car is available. It may work, but it is very unlikely a good strategy.