jacobwilliams / powellopt Goto Github PK
View Code? Open in Web Editor NEWOptimization algorithms by M.J.D. Powell
License: Other
Optimization algorithms by M.J.D. Powell
License: Other
gfortran -std=f2018 kind_module.f90 bobyqa.f90 cobyla.f90 lincoa.f90 uobyqa.f90 newuoa.f90 powellopt.f90 tests\tests.f90
says
kind_module.f90:6:2:
6 | module kind_module
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
kind_module.f90:8:2:
8 | use iso_fortran_env
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
kind_module.f90:10:2:
10 | implicit none
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
kind_module.f90:12:2:
12 | private
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
kind_module.f90:17:2:
17 | integer,parameter,public :: wp = real64 !! double precision [default]
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
kind_module.f90:20:2:
20 | end module kind_module
| 1
Warning: Nonconforming tab character at (1) [-Wtabs]
lincoa.f90:71:27:
71 | real(wp),dimension(ia,*),intent(in) :: a !! a matrix whose columns are the constraint gradients, which are
| 1
Error: GNU Extension: Symbol 'ia' is used before it is typed at (1)
lincoa.f90:1133:34:
1133 | go to (50, 60, 280), iflag
| 1
Warning: Obsolescent feature: Computed GOTO at (1)
lincoa.f90:60:35:
60 | subroutine lincoa (n, npt, m, a, ia, b, x, rhobeg, rhoend, iprint, maxfun, calfun)
| 1
Error: Symbol 'a' at (1) has no IMPLICIT type
lincoa.f90:2290:76:
2290 | call lincoa(n,npt,m,a,ia,b,x,rhobeg,rhoend,iprint,maxfun,calfun)
| 1
Error: Type mismatch in argument 'a' at (1); passed REAL(8) to UNKNOWN
lincoa.f90:156:33:
156 | sum = sum + a (i, j) * x (i)
| 1
Error: Function 'a' at (1) has no IMPLICIT type
lincoa.f90:157:35:
157 | temp = temp + a (i, j) ** 2
| 1
Error: Function 'a' at (1) has no IMPLICIT type
lincoa.f90:170:30:
170 | w (iw) = a (i, j) / temp
| 1
Error: Function 'a' at (1) has no IMPLICIT type
powellopt.f90:9:9:
9 | use lincoa_module
| 1
Fatal Error: Cannot open module file 'lincoa_module.mod' for reading at (1): No such file or directory
compilation terminated.
+ gfortran -c ././src/cobyla.f90 -O3 -funroll-loops -Wimplicit-interface -fPIC -fmax-errors=1 -fcoarray=single -fimplicit-none -Werror=implicit-interface -ffree-form -J build/gfortran_2654F75F5833692A -Ibuild/gfortran_2654F75F5833692A -o build/gfortran_2654F75F5833692A/PowellOpt/src_cobyla.f90.o
././src/cobyla.f90:138:24:
138 | subroutine cobylb (n, m, mpp, x, rhobeg, rhoend, iprint, maxfun, con, sim, simi, &
| 1
Error: Symbol 'n' at (1) has no IMPLICIT type
compilation terminated due to -fmax-errors=1.
[ 25%] cobyla.f90 done.
././src/cobyla.f90:138:24:
138 | subroutine cobylb (n, m, mpp, x, rhobeg, rhoend, iprint, maxfun, con, sim, simi, &
| 1
Error: Symbol 'n' at (1) has no IMPLICIT type
compilation terminated due to -fmax-errors=1.
<ERROR> Compilation failed for object " src_cobyla.f90.o "
<ERROR> stopping due to failed compilation
STOP 1
Thanks for your project. For the *nix challenged (like me), I will point out that
gfortran kind_module.f90 bobyqa.f90 cobyla.f90 lincoa.f90 uobyqa.f90 newuoa.f90 powellopt.f90 tests\tests.f90
produces an executable.
I suggest that the abstract interface look as follows:
abstract interface
subroutine func (n, x, f) !! calfun interface
import :: wp
implicit none
integer , intent(in) :: n
real (wp), intent(in) :: x (*)
real (wp), intent(out) :: f
end subroutine func
end interface
Many repos for the topic "optimization" refer to compiler optimization.
For test problem 10 of Cobyla (hexagon problem) xopt(9)
is used without initialization. The variable should be set to zero (which is its expected value at the optimum point) before line 1262 of file cobyla.f90.
Hi, @jacobwilliams,
Thank you for your wonderful project!
The original sourcecode for LINCOA, BOBYQA, NEWUOA, UOBYQA, and COBYLA) was
written by M.J.D. Powell and released for use without restrictions or charges.
I am afraid that this is not precise. Before Professor Powell left, he had chosen LGPL as the license for his code. See the code at https://www.zhangzk.net/software.html and https://github.com/pdfo/pdfo/tree/master/fsrc/original for the licenses.
It would be much appreciated if you could update your LICENSE file accordingly. Many thanks for everything!
Best regards,
Zaikun
I suggest adding the topics constrained-optimization
, unconstrained-optimization
, nonlinear-optimization
in the About section in case someone searches those terms, especially the first.
I am successfully using newuoa.f90 in a program -- thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.