ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

Problems building the 3.1.0 release #191

Open whart222 opened 1 year ago

whart222 commented 1 year ago

I'm seeing a build error in /thirdparty/benchmark/src/benchmark.cc when I try building the 3.1.0 release:

thirdparty/benchmark/src/benchmark.cc:525:38: error: implicitly-declared ‘benchmark::internal::BenchmarkImp::BenchmarkImp(const benchmark::internal::BenchmarkImp&)’ is deprecated [-Werror=deprecated-copy]

This build failure is triggered by the -Werror compiler flag, which ampl/mp is specifying.

This directory is not in the development branch for ampl/mp, so I don't know what sort of resolution makes sense.

glebbelov commented 1 year ago

Where is ampl-mp used? Recently we discovered that conda was packaging mp only to extract ASL for IPOPT. In such a case, simply use ASL from https://github.com/ampl/asl, it has CMake.

Otherwise, is current develop working fine? I can add a tag.

whart222 commented 1 year ago

I'm exploring the use of ampl-mp to evaluate gradients and Hessians within the Coek modeling environment (see https://github.com/sandialabs/coek). I don't think the ampl-asl code include the ASLBuilder logic, so I'm not sure whether it's API is sufficient to translate Coek expressions to ASL expressions.

I haven't tried using the current develop branch. I'll look into that shortly.

glebbelov commented 1 year ago

Note ASL has a parallel evaluation version, see folder solvers2

whart222 commented 1 year ago

Thanks for the pointer! The parallel evaluation version is quite interesting. Does this work with ampl-mp? I only see solvers2 in the ASL repo.

glebbelov commented 1 year ago

The parallel version is in src/solvers2. It is as well checked out in MP, but ASLBuilder uses ASL1 expressions, while ASL2 does not store expressions internally - it seems to only store operation lists optimized for evaluation. It might require some work to adapt ASLBuilder to ASL2.

There is some documentation on ASL2 in Dave's "Hooking your solver" paper, in the end, and in his 2018 paper "Revisiting Expression Representations".